Class ExponentialCoolDown<M extends Move<S,I>,S extends Solution<S,I>,I extends Instance>

java.lang.Object
es.urjc.etsii.grafo.improve.sa.cd.ExponentialCoolDown<M,S,I>
Type Parameters:
M - Move type
S - Your solution class
I - 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 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 interface CoolDownControl<M extends Move<S,I>,S extends Solution<S,I>,I extends Instance>
      Parameters:
      solution - current best solution
      neighborhood - neighborhood used in the SA
      currentTemperature - current temperature (before cooldown)
      iteration - current iteration
      Returns:
      new temperature