scratch.scott.optimization
Class SimulatedAnnealer
java.lang.Object
edu.uci.ics.jung.algorithms.IterativeProcess
scratch.scott.optimization.SimulatedAnnealer
public class SimulatedAnnealer
- extends IterativeProcess
A general implementation of simulated annealing.
Requires the user to provide his/her own Configuration
implementation representing the current best solution
instance. In addition several parameters are required to instruct the annealer how best to proceed. These include:
- the starting temperature where the annealer should begin its annealing process
- the freezinng point at which the annealer should no more annealing can take place
- cooling rate indicating how fast the annealer should cool down after each iteration
- how many times the annealer should look for a new solution between iterations
- the acceptance rate threshold
In most cases, significant tweaking of the parameters is required before fast convergence is achieved.
- Author:
- Scott White
Constructor Summary |
SimulatedAnnealer(Configuration solution,
double startingTemperature,
double freezingPoint,
double coolingRate,
double nTries,
double acceptanceRate,
int seed)
|
Methods inherited from class edu.uci.ics.jung.algorithms.IterativeProcess |
evaluate, finalizeIterations, getDesiredPrecision, getIterations, getMaximumIterations, getPrecision, hasConverged, initializeIterations, reinitialize, relativePrecision, setDesiredPrecision, setMaximumIterations |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SimulatedAnnealer
public SimulatedAnnealer(Configuration solution,
double startingTemperature,
double freezingPoint,
double coolingRate,
double nTries,
double acceptanceRate,
int seed)
evaluateIteration
protected double evaluateIteration()
- Description copied from class:
IterativeProcess
- Evaluate the result of the current interation.
- Specified by:
evaluateIteration
in class IterativeProcess
- Returns:
- the estimated precision of the result.
getBestConfiguration
public Configuration getBestConfiguration()
- Returns the best solution found so far.
- Returns:
- the solution configuration