# SuanShu, a Java numerical and statistical library

com.numericalmethod.suanshu.optimization.multivariate.unconstrained.annealing

## Class SimulatedAnnealingMinimizer

• java.lang.Object
• com.numericalmethod.suanshu.optimization.multivariate.unconstrained.annealing.SimulatedAnnealingMinimizer
• ### Constructor Summary

Constructors
Constructor and Description
SimulatedAnnealingMinimizer(int dim, double initialTemperature, StopCondition stopCondition, RandomLongGenerator uniform)
SimulatedAnnealingMinimizer(TemperatureFunction temperatureFunction, AnnealingFunction annealingFunction, TemperedAcceptanceProbabilityFunction probabilityFunction, int markovLength, StopCondition stopCondition, RandomLongGenerator uniform)
Constructs a new instance.
• ### Method Summary

All Methods
Modifier and Type Method and Description
IterativeSolution<Vector> solve(OptimProblem problem)
Solve an optimization problem, e.g., OptimProblem.
• ### Methods inherited from class java.lang.Object

clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
• ### Constructor Detail

• #### SimulatedAnnealingMinimizer

public SimulatedAnnealingMinimizer(TemperatureFunction temperatureFunction,
AnnealingFunction annealingFunction,
TemperedAcceptanceProbabilityFunction probabilityFunction,
int markovLength,
StopCondition stopCondition,
RandomLongGenerator uniform)
Constructs a new instance.
Parameters:
temperatureFunction - a function that for a given iteration i gives T_i, where 0 < i < temperature_levels. The function must be monotonically increasing with i
probabilityFunction - gives the acceptance probability for a state transition at a given temperature
annealingFunction - proposes next states
markovLength - the number of times we attempt a state change per iteration (per temperature)
stopCondition - the StopCondition
uniform - the rlg to be used to control the stochastic element of the algorithm
• ### Method Detail

• #### solve

public IterativeSolution<Vector> solve(OptimProblem problem)
throws Exception
Description copied from interface: Optimizer
Solve an optimization problem, e.g., OptimProblem.
Specified by:
solve in interface Optimizer<OptimProblem,IterativeSolution<Vector>>
Parameters:
problem - an optimization problem
Returns:
a solution to the optimization problem
Throws:
Exception - when there is an error solving the problem