Jannealer home page
Jannealer contains simulated annealing on top
of a downhill simplex optimisation in multiple dimensions.
Example of use. Also download the package and look at the test
classes in the net.sourceforge.jannealer.test package.
Download from the SourceForge project page
It is directly based upon the freely available JSimul package,
but it aims to be slightly easier to integrate into an
applications. It does not depend on any advanced modules or
features like Swing, Apache Log4J, reflection, etc. JSimul traces its
origin back to the downhill simplex from the "Numerical Recipies
in FORTRAN/C/C++" books.
If you are looking for something with a GUI to play around
with, perhaps JSimul is a better starting point. Also, the
JSimul package has a nice web-site with references to work
done on simulated annealing.
Jannealing features
- A couple of lines of code is all that it takes to invoke the annealing.
- Tiny package
- Easy to subclass/modify for specific purposes
Tips and tricks
- You need to adjust the starting parameters for simulated annealing to work well.
This can sometimes be done by using simulated annealing, see net.sourceforge.jannealer.test/ConfigureAnnealing.java
- Objective functions frequently have ranges to its parameters.
There is no way to specify ranges for the parameters, but you can fudge this by
e.g. returning large numbers outside valid range. You should not return a constant, but rather
create a "hill" down into the legal range.
- The algorithm does not like a "staircase" response from the ObjectiveFunction. If you have an integer parameters to your
objective functions, you might run into problems. Consider using double instead of integer to create a
"smooth hill" instead of a "staircase" in the ObjectiveFunction. The AnnealingSchemes coolingRate was converted to
a double from an integer in order to get a "smooth hill" for the ConfigureAnnealing.java case.
- The arguments to the ObjectiveFunction must be on the same scale, consider scaling each argument to be between 0..1.
Help wanted
If you have improvements to the code/docs or some cool examples, I'd
like nothing better than to include them.
Send mail to "gowinex@users.sourceforge.net"
Links