Class SimulatedAnnealingAcceptor<Solution_>
- java.lang.Object
-
- org.optaplanner.core.impl.solver.event.SolverLifecycleListenerAdapter<Solution_>
-
- org.optaplanner.core.impl.localsearch.event.LocalSearchPhaseLifecycleListenerAdapter<Solution_>
-
- org.optaplanner.core.impl.localsearch.decider.acceptor.AbstractAcceptor<Solution_>
-
- org.optaplanner.core.impl.localsearch.decider.acceptor.simulatedannealing.SimulatedAnnealingAcceptor<Solution_>
-
- All Implemented Interfaces:
EventListener,Acceptor<Solution_>,LocalSearchPhaseLifecycleListener<Solution_>,SolverLifecycleListener<Solution_>
public class SimulatedAnnealingAcceptor<Solution_> extends AbstractAcceptor<Solution_>
The time gradient implementation of simulated annealing.
-
-
Field Summary
Fields Modifier and Type Field Description protected intlevelsLengthprotected ScorestartingTemperatureprotected double[]startingTemperatureLevelsprotected double[]temperatureLevelsprotected doubletemperatureMinimum-
Fields inherited from class org.optaplanner.core.impl.localsearch.decider.acceptor.AbstractAcceptor
logger
-
-
Constructor Summary
Constructors Constructor Description SimulatedAnnealingAcceptor()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanisAccepted(LocalSearchMoveScope<Solution_> moveScope)voidphaseEnded(LocalSearchPhaseScope<Solution_> phaseScope)voidphaseStarted(LocalSearchPhaseScope<Solution_> phaseScope)voidsetStartingTemperature(Score startingTemperature)voidstepStarted(LocalSearchStepScope<Solution_> stepScope)-
Methods inherited from class org.optaplanner.core.impl.localsearch.event.LocalSearchPhaseLifecycleListenerAdapter
stepEnded
-
Methods inherited from class org.optaplanner.core.impl.solver.event.SolverLifecycleListenerAdapter
solvingEnded, solvingStarted
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.optaplanner.core.impl.localsearch.event.LocalSearchPhaseLifecycleListener
stepEnded
-
Methods inherited from interface org.optaplanner.core.impl.solver.event.SolverLifecycleListener
solvingEnded, solvingStarted
-
-
-
-
Field Detail
-
startingTemperature
protected Score startingTemperature
-
levelsLength
protected int levelsLength
-
startingTemperatureLevels
protected double[] startingTemperatureLevels
-
temperatureLevels
protected double[] temperatureLevels
-
temperatureMinimum
protected double temperatureMinimum
-
-
Method Detail
-
setStartingTemperature
public void setStartingTemperature(Score startingTemperature)
-
phaseStarted
public void phaseStarted(LocalSearchPhaseScope<Solution_> phaseScope)
- Specified by:
phaseStartedin interfaceLocalSearchPhaseLifecycleListener<Solution_>- Overrides:
phaseStartedin classLocalSearchPhaseLifecycleListenerAdapter<Solution_>
-
phaseEnded
public void phaseEnded(LocalSearchPhaseScope<Solution_> phaseScope)
- Specified by:
phaseEndedin interfaceLocalSearchPhaseLifecycleListener<Solution_>- Overrides:
phaseEndedin classLocalSearchPhaseLifecycleListenerAdapter<Solution_>
-
isAccepted
public boolean isAccepted(LocalSearchMoveScope<Solution_> moveScope)
- Parameters:
moveScope- not null- Returns:
- true if accepted
-
stepStarted
public void stepStarted(LocalSearchStepScope<Solution_> stepScope)
- Specified by:
stepStartedin interfaceLocalSearchPhaseLifecycleListener<Solution_>- Overrides:
stepStartedin classLocalSearchPhaseLifecycleListenerAdapter<Solution_>
-
-