description    screenshots    features    download    installation    launching    using    versions    references    contact   

JSimul

Charles Mégnin

Description

JSimul is a JAVA-based simulated annealing package consisting of three layers:
1. A SWING-based user interface that provides intuitive access to the tuning of the algorithm's parameters.
2. A simulated annealing algorithm coupled with a downhill simplex, essentially a JAVA object wrapper around two Numerical Recipes algorithms (1) (ameba & amotsa). The driver is largely inspired from the example book(2) and I've added a clustering scheme to test for convergence.
3. Examples of a third layer (ie: test objective functions to minimize) are provided with the release. Refer to the directory structure section for their location. Presently, this third layer must be written in JAVA. Adding the flexibility of connecting the package to native C or Fortran code through JNI is high on the TODO list.

Follow this link to a detailed description of the Numerical Recipes algorithm.

Credits

JSimul was developed, compiled and tested on RedHat 7.1 through 7.3, using

ScreenShots

Follow this link to screen shots.

Features

Installation

To install JSimul, you need the jdk (ie: JAVA), as well as ant (an xml-based build tool to compile and run the code).

Install the JDK

To install the jdk under /usr/local/java:
mkdir /usr/local/java
mv j2sdk-{version}.bin /usr/local/java
cd /usr/local/java

and run the binary:
./j2sdk-{version}.bin

The JDK will extract under its own directory (named j2sdk-{version})
To make versioning easier, create a symlink:
ln -s j2sdk-{version} jdk

set the following environment variable in your .tcshrc (or .cshrc or whatever)
setenv JAVA_HOME /usr/local/java/jdk

Install Ant

Uncompress and run the binary:
cd /usr/local/java/
Linux:
tar zxvf jakarta-ant.{version}.tar.gz
Solaris:
gunzip jakarta-ant-{version}.tar.gz
tar xvf jakarta-ant-{version}.tar

./jakarta-ant-{version}-bin

You may also want to create a symlink to the ant directory:
ln -s ./jakarta-ant-{version} ant

The following sets up the environment:
setenv ANT_HOME /usr/local/java/ant

Finally, adding the following to your path will allow you to call ant and java from anywhere on your system:
setenv PATH $PATH/:$JAVA_HOME/bin/:$ANT_HOME/bin/:

Suggested JSimul install

After installing ant & the JDK, place the jar file in your home directory:
mkdir $HOME/dev/src/JSimul
mv JSimul-{build}.jar $HOME/dev/src/JSimul
cd $HOME/src

Extract the source code:
jar xvf JSimul-{build}.jar

Create a classes directory in $HOME/dev/classes/JSimul (this is where the compiled JAVA bytecode will go)
mkdir $HOME/dev/classes/JSimul

and add the following line to your .tcshrc
setenv CLASSPATH $CLASSPATH:$HOME/dev/classes/JSimul

Compile the source code:
cd $HOME/dev/src/JSimul/org/theblueplanet
ant -buildfile buildJSimul.xml build

Launching JSimul

The easiest way is to create an alias - (make sure that the CLASSPATH is set in the .tcshrc):
alias JSimul java org.theblueplanet.annealing.ui.UILauncher
and to launch with:
JSimul

or if you enjoy typing:
java org.theblueplanet.annealing.ui.UILauncher

Launching can also be done through an ant call:
cd $HOME/src/org/theblueplanet
ant -buildfile buildJSimul.xml JSimul-run

Using JSimul

First screen

Method/function selection
class path selector - use the fully qualified classpath of the class containing the objective function (must agree with the package statement in the class)
method selector - the function name

Logging to file
Yes, append - append results to ~/JSimul.log. Do not overwrite the former log file
Yes, overwrite - overwrite results to ~/JSimul.log. Contents of the former log file are lost
No - Do not append to log file

The slider allows to set the number of iterations after which logging to file and console occurs. It is disabled when logging is unselected. Range: 1-1000.

Second screen

Initial offset selector (left-handside)
Enter the initial simplex vertices for each dimension of the objective function
After the first interation, these values self-update to the best solution of the previous iteration.

Annealing scheme selector (right-handside)
Temperature selector : the temperature at which to start the annealing (log10 scale). Range: 1 - 109 K

Cooling rate selector: the cooling rate applied. Range: 0-100 %

Number of iterations selector: the number of iterations after which cooling is applied. Range: 0-100

Fractional tolerance selector: sets the convergence criterion for the cluster of solutions (log10 scale).
A low value corresponds to low tolerance (ie: convergence is slow). Range: 10-20 - 0.1

The values chosen with the sliders are simultaneously updated in the summary panel at the bottom of the screen.

Directory structure

Extracting the JSimul package will create 4 directories:

Versions

  1. 1.0.1 - code cleanup
  2. 1.0

Related software

JGAP: The Java Genetic Algorithms Package.



References

(1) Press, W.H., S.A. Teukolsky, W.T. Vetterling and B.P. Flannery, Numerical Recipes in C, 2nd edition, Cambridge University Press, 1994.
(2) Press, W.H., S.A. Teukolsky, W.T. Vetterling and B.P. Flannery, Numerical Recipes example book [C], 2nd edition, Cambridge University Press, 1994.



Questions/suggestions? Send an email to charly at theblueplanet dot org



home    description    screenshots    features    download    installation    launching    references    using    versions    contact   




Copyright © 2001 Charles Mégnin, All Rights Reserved.