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
ConstructorsConstructorDescriptionConstructs a new geometric cooling schedule.GeometricCoolingSchedule(double alpha) Constructs a new geometric cooling schedule. -
Method Summary
Modifier and TypeMethodDescriptiondoublegetAlpha()Returns the cooling rate.doublenextTemperature(double currentTemperature) Returns the next temperature based on the current temperature.voidsetAlpha(double alpha) Sets the cooling rate.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:CoolingScheduleReturns the next temperature based on the current temperature.- Specified by:
nextTemperaturein interfaceCoolingSchedule- Parameters:
currentTemperature- the current temperature- Returns:
- the next temperature
-