Interface AnnealingSchedule

All Superinterfaces:
Splittable<AnnealingSchedule>
All Known Implementing Classes:
AcceptanceTracker, ExponentialCooling, LinearCooling, LogarithmicCooling, ModifiedLam, ModifiedLamOriginal, ParameterFreeExponentialCooling, ParameterFreeLinearCooling, SelfTuningLam

public interface AnnealingSchedule extends Splittable<AnnealingSchedule>
This interface specifies the required functionality for implementations of annealing schedules. Classes that implement this interface are in charge of managing simulated annealing's temperature parameter. Adaptive annealing schedules may have additional state data to maintain.
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    accept(double neighborCost, double currentCost)
    Determine whether or not to accept a neighboring solution based on its cost and the current cost, both passed as parameters.
    void
    init(int maxEvals)
    Perform any initialization necessary for the annealing schedule at to the start of a run of simulated annealing.

    Methods inherited from interface org.cicirello.search.concurrent.Splittable

    split
  • Method Details

    • init

      void init(int maxEvals)
      Perform any initialization necessary for the annealing schedule at to the start of a run of simulated annealing. This includes initializing the temperature parameter. This method is called once by implementations of simulated annealing at the start of the run. Implementations of simulated annealing that perform reannealing will also call this once at the start of each reanneal.
      Parameters:
      maxEvals - The maximum length of the run of simulated annealing about to start. Some annealing schedules depend upon prior knowledge of run length. For those annealing schedules that don't depend upon run length, this parameter is ignored.
    • accept

      boolean accept(double neighborCost, double currentCost)
      Determine whether or not to accept a neighboring solution based on its cost and the current cost, both passed as parameters. Lower cost indicates better solution. This method must also update the temperature and any other state data related to the annealing schedule.
      Parameters:
      neighborCost - The cost of the neighboring solution under consideration.
      currentCost - The cost of the current solution.
      Returns:
      true if simulated annealing should accept the neighbor, and false otherwise.