Class TemperatureBasedTerminationCondition

java.lang.Object
org.moeaframework.algorithm.sa.TemperatureBasedTerminationCondition
All Implemented Interfaces:
Configurable, TerminationCondition

public class TemperatureBasedTerminationCondition extends Object implements TerminationCondition, Configurable
Terminates a simulated annealing algorithm when the temperature drops below a stopping, or minimum, temperature.
  • Constructor Details

    • TemperatureBasedTerminationCondition

      public TemperatureBasedTerminationCondition()
      Constructs a new termination condition based on the simulated annealing temperature.
    • TemperatureBasedTerminationCondition

      public TemperatureBasedTerminationCondition(double stoppingTemperature)
      Constructs a new termination condition based on the simulated annealing temperature.
      Parameters:
      stoppingTemperature - the stopping temperature
  • Method Details

    • getStoppingTemperature

      public double getStoppingTemperature()
      Returns the stopping, or minimum, temperature at which point the algorithm stops.
      Returns:
      the stopping temperature
    • setStoppingTemperature

      public void setStoppingTemperature(double stoppingTemperature)
      Sets the stopping, or minimum, temperature at which point the algorithm stops.
      Parameters:
      stoppingTemperature - the stopping temperature
    • initialize

      public void initialize(Algorithm algorithm)
      Description copied from interface: TerminationCondition
      Invoked when the algorithm is created to collect any initial conditions. Note that the algorithm may not have been initialized at this point.
      Specified by:
      initialize in interface TerminationCondition
      Parameters:
      algorithm - the algorithm
    • shouldTerminate

      public boolean shouldTerminate(Algorithm algorithm)
      Description copied from interface: TerminationCondition
      Invoked after every step to check if the algorithm should terminate.
      Specified by:
      shouldTerminate in interface TerminationCondition
      Parameters:
      algorithm - the algorithm
      Returns:
      true if the algorithm should terminate; false otherwise