Package org.moeaframework.algorithm.sa
Class GeometricCoolingSchedule
java.lang.Object
org.moeaframework.algorithm.sa.GeometricCoolingSchedule
- All Implemented Interfaces:
CoolingSchedule
,Configurable
Geometric reduction rule for simulated annealing. The next temperature is calculated as
t = t * a
-
Constructor Summary
ConstructorDescriptionConstructs a new geometric cooling schedule.GeometricCoolingSchedule
(double alpha) Constructs a new geometric cooling schedule. -
Method Summary
Modifier and TypeMethodDescriptiondouble
getAlpha()
Returns the cooling rate.double
nextTemperature
(double currentTemperature) Returns the next temperature based on the current temperature.void
setAlpha
(double alpha) Sets the cooling rate.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.moeaframework.core.configuration.Configurable
applyConfiguration, getConfiguration
-
Constructor Details
-
GeometricCoolingSchedule
public GeometricCoolingSchedule()Constructs a new geometric cooling schedule. -
GeometricCoolingSchedule
public GeometricCoolingSchedule(double alpha) Constructs a new geometric cooling schedule.- Parameters:
alpha
- the cooling rate
-
-
Method Details
-
getAlpha
public double getAlpha()Returns the cooling rate.- Returns:
- the cooling rate
-
setAlpha
public void setAlpha(double alpha) Sets the cooling rate.- Parameters:
alpha
- the cooling rate
-
nextTemperature
public double nextTemperature(double currentTemperature) Description copied from interface:CoolingSchedule
Returns the next temperature based on the current temperature.- Specified by:
nextTemperature
in interfaceCoolingSchedule
- Parameters:
currentTemperature
- the current temperature- Returns:
- the next temperature
-