java.lang.Object
es.urjc.etsii.grafo.improve.sa.cd.ExponentialCoolDown<M,S,I>
- Type Parameters:
M
- Move typeS
- Your solution classI
- Your instance class
- All Implemented Interfaces:
CoolDownControl<M,
S, I>
public class ExponentialCoolDown<M extends Move<S,I>,S extends Solution<S,I>,I extends Instance>
extends Object
implements CoolDownControl<M,S,I>
Exponential coolDown strategy
-
Constructor Summary
ConstructorsConstructorDescriptionExponentialCoolDown
(double ratio) Create a new ExponentialCoolDown with the provided cooldown ratio. -
Method Summary
-
Constructor Details
-
ExponentialCoolDown
public ExponentialCoolDown(double ratio) Create a new ExponentialCoolDown with the provided cooldown ratio. NewTemperature = OldTemperature * ratio- Parameters:
ratio
- cooldown ratio.
-
-
Method Details
-
coolDown
public double coolDown(S solution, Neighborhood<M, S, I> neighborhood, double currentTemperature, int iteration) Set temperature for the next iteration of simulated annealing- Specified by:
coolDown
in interfaceCoolDownControl<M extends Move<S,
I>, S extends Solution<S, I>, I extends Instance> - Parameters:
solution
- current best solutionneighborhood
- neighborhood used in the SAcurrentTemperature
- current temperature (before cooldown)iteration
- current iteration- Returns:
- new temperature
-