JavaCbc
Work in progress... version 0.1
Download the files
The javacbc archive is located here.
Installation instruction
These instructions assume you have installed Cbc in $HOME/coin-cbc, if not, you will have to manually alter some files. Similarly, Java 6 is assumed to be installed in (or have that symlink) /usr/lib/jvm/java-6-sun.
- If you haven't already, download and install Cbc 2.4 in $HOME/coin-cbc. Installation instructions can be found on the Cbc homepage. In the end, your coin-cbc folder should contain (among others) a bin, include and lib directory.
- Download javacbc.tar.gz and move it inside $HOME/coin-cbc.
- Extract the archive using tar xf javacbc.tar.gz, it will create a javacbc directory.
- Go to the javacbc directory and edit the Makefile to match the path to the Cbc folder, and to your Java folder.
- Open a terminal inside the javacbc folder, and run make. This will generate the wrapper files and classes, and compile a small Java test app named javacbc_test. In order for the app to run properly, the LD_LIBRARY_PATH environement variable must contain the directory where the library is located, a small helper script is given (runJavaCbc.sh) that will set it and then run the test app.
Requirements
- Cbc (2.4) and all its requirements (You may compile Cbc using Lapack, Blas and glpk. Currently, compiling with ASL causes javacbc to not work.)
- Sun Java 6 SDK
- Swig
Les Fourmis !
Un applet en ligne (en C!) permet maintenant de tester la simulation de fourmis, avec une liberté quasiment totale quant aux paramètres, position des fourmis, des nids, du sucre.
Le projet simulation de fourmi vise à simuler de manière simplifiée le comportement de fourmis qui cherchent du sucre, et qui, une fois le sucre trouvé, rentrent au nid. Pour cela, on représente le terrain par une grille, et les fourmis se déplacent sur cette grille dans les 8 directions possibles. Sur cette grille se trouvent les nids (en bleu) et les tas de sucre (en orange). Les fourmis se repèrent grâce à deux mécanismes :
- des phéromones émanant du nid, qui donnent en fait une sorte de gradient grâce auquel les fourmis connaissent la direction du plus proche nid,
- en laissant derrière elles des phéromones (différentes de celles du nid) lorsqu'elles ont trouvé du sucre. Ainsi, une fourmi en quête de sucre peut remonter la piste de phéromones (en s'éloignant du nid) et a ainsi de grandes chances de trouver le tas de sucre découvert par une autre fourmi auparavant. Ces phéromones ont aussi comme particularité de s'évaporer au cours du temps, ce qui évite aux fourmis de tenter de trouver un tas de sucre épuisé.