Package org.opt4j.optimizers.sa
Class CoolingScheduleExponential
java.lang.Object
org.opt4j.optimizers.sa.CoolingScheduleExponential
- All Implemented Interfaces:
CoolingSchedule
The CoolingScheduleExponential is a CoolingSchedule for the
SimulatedAnnealing.
tn - final temperature
t0 - initial temperature
i - current iteration
n - maximal number of iterations
a - alpha value
The current temperature is calculated by tn + t0 * a^i.
-
Constructor Summary
ConstructorsConstructorDescriptionCoolingScheduleExponential(double t0, double tn, double alpha) Constructs a newCoolingScheduleExponential. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetTemperature(int i, int n) Returns the temperature for the iterationiof the maximal number of iterationsn.
-
Constructor Details
-
CoolingScheduleExponential
Constructs a newCoolingScheduleExponential.- Parameters:
t0- the initial temperature (using namespaceCoolingSchedule)tn- the final temperature (using namespaceCoolingSchedule) )alpha- the alpha value
-
-
Method Details
-
getTemperature
Description copied from interface:CoolingScheduleReturns the temperature for the iterationiof the maximal number of iterationsn.- Specified by:
getTemperaturein interfaceCoolingSchedule- Parameters:
i- the current iterationn- the maximal number of iterations- Returns:
- the temperature for the current iteration
-