Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/drkenreid/simulatedannealingexample
An example Simulated Annealing in Java.
https://github.com/drkenreid/simulatedannealingexample
algorithm evolutionary metaheuristics simulated-annealing
Last synced: about 1 month ago
JSON representation
An example Simulated Annealing in Java.
- Host: GitHub
- URL: https://github.com/drkenreid/simulatedannealingexample
- Owner: DrKenReid
- Created: 2018-08-19T19:51:20.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-08-23T08:54:43.000Z (over 6 years ago)
- Last Synced: 2024-11-08T10:50:26.969Z (3 months ago)
- Topics: algorithm, evolutionary, metaheuristics, simulated-annealing
- Language: Java
- Homepage:
- Size: 1.09 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# SimulatedAnnealingExample
An example Simulated Annealing. Requires a set of libraries, including Apache POI, described in the pom.xml for Maven users. Non maven users should check out the same file for the JARs to download.Simply put, the following String is the "problem" to be solved:
1-7-3-4-6-7-3-2-1-4-7-6-Charlie-3-2-7-8-9-7-7-7-6-4-3-Tango-7-3-2-Victor-7-3-1-1-7-8-8-8-7-3-2-4-7-6-7-8-9-7-6-4-3-7-6
SA will generate a String of the same length (assumed Hard Constraint), and will repeatedly replace characters until
the end time condition/s are met.In this example there is a single simple Soft Constraint (SC) which considers fitness as similarity to the solution
in terms of number of characters correct thus far. A better example might be to generate random Strings of random
lengths, and have a soft constraint to consider length. This could also be further advanced with unicode consideration.
And of course, less "insider knowledge" for the SC.This also contains some output using the Apache POI library, fairly useful for examining results from the SA.
For more optimised statistical analysis the Output.java file should be modified for outputting CSV files,
for use in R etc.For anyone who gets the "problem" reference:
![]()