Class DefaultLocalSearchPhase<Solution_>
- java.lang.Object
-
- org.optaplanner.core.impl.phase.AbstractPhase<Solution_>
-
- org.optaplanner.core.impl.localsearch.DefaultLocalSearchPhase<Solution_>
-
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotation
- All Implemented Interfaces:
EventListener
,LocalSearchPhaseLifecycleListener<Solution_>
,LocalSearchPhase<Solution_>
,PhaseLifecycleListener<Solution_>
,Phase<Solution_>
,SolverLifecycleListener<Solution_>
public class DefaultLocalSearchPhase<Solution_> extends AbstractPhase<Solution_> implements LocalSearchPhase<Solution_>, LocalSearchPhaseLifecycleListener<Solution_>
Default implementation ofLocalSearchPhase
.
-
-
Field Summary
Fields Modifier and Type Field Description protected LocalSearchDecider<Solution_>
decider
-
Fields inherited from class org.optaplanner.core.impl.phase.AbstractPhase
assertExpectedStepScore, assertShadowVariablesAreNotStaleAfterStep, assertStepScoreFromScratch, bestSolutionRecaller, logger, logIndentation, phaseIndex, phaseLifecycleSupport, solverPhaseLifecycleSupport, termination
-
-
Constructor Summary
Constructors Constructor Description DefaultLocalSearchPhase(int phaseIndex, String logIndentation, BestSolutionRecaller<Solution_> bestSolutionRecaller, Termination<Solution_> termination)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
doStep(LocalSearchStepScope<Solution_> stepScope)
LocalSearchDecider<Solution_>
getDecider()
String
getPhaseTypeString()
void
phaseEnded(LocalSearchPhaseScope<Solution_> phaseScope)
void
phaseStarted(LocalSearchPhaseScope<Solution_> phaseScope)
void
setDecider(LocalSearchDecider<Solution_> decider)
void
solve(SolverScope<Solution_> solverScope)
void
solvingEnded(SolverScope<Solution_> solverScope)
void
solvingStarted(SolverScope<Solution_> solverScope)
void
stepEnded(LocalSearchStepScope<Solution_> stepScope)
void
stepStarted(LocalSearchStepScope<Solution_> stepScope)
-
Methods inherited from class org.optaplanner.core.impl.phase.AbstractPhase
addPhaseLifecycleListener, assertWorkingSolutionInitialized, calculateWorkingStepScore, getPhaseIndex, getTermination, isAssertExpectedStepScore, isAssertShadowVariablesAreNotStaleAfterStep, isAssertStepScoreFromScratch, phaseEnded, phaseStarted, predictWorkingStepScore, removePhaseLifecycleListener, setAssertExpectedStepScore, setAssertShadowVariablesAreNotStaleAfterStep, setAssertStepScoreFromScratch, setSolverPhaseLifecycleSupport, stepEnded, stepStarted
-
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.phase.Phase
addPhaseLifecycleListener, removePhaseLifecycleListener, setSolverPhaseLifecycleSupport
-
Methods inherited from interface org.optaplanner.core.impl.phase.event.PhaseLifecycleListener
phaseEnded, phaseStarted, stepEnded, stepStarted
-
-
-
-
Field Detail
-
decider
protected LocalSearchDecider<Solution_> decider
-
-
Constructor Detail
-
DefaultLocalSearchPhase
public DefaultLocalSearchPhase(int phaseIndex, String logIndentation, BestSolutionRecaller<Solution_> bestSolutionRecaller, Termination<Solution_> termination)
-
-
Method Detail
-
getDecider
public LocalSearchDecider<Solution_> getDecider()
-
setDecider
public void setDecider(LocalSearchDecider<Solution_> decider)
-
getPhaseTypeString
public String getPhaseTypeString()
- Specified by:
getPhaseTypeString
in classAbstractPhase<Solution_>
-
solve
public void solve(SolverScope<Solution_> solverScope)
-
doStep
protected void doStep(LocalSearchStepScope<Solution_> stepScope)
-
solvingStarted
public void solvingStarted(SolverScope<Solution_> solverScope)
- Specified by:
solvingStarted
in interfaceSolverLifecycleListener<Solution_>
- Overrides:
solvingStarted
in classAbstractPhase<Solution_>
-
phaseStarted
public void phaseStarted(LocalSearchPhaseScope<Solution_> phaseScope)
- Specified by:
phaseStarted
in interfaceLocalSearchPhaseLifecycleListener<Solution_>
-
stepStarted
public void stepStarted(LocalSearchStepScope<Solution_> stepScope)
- Specified by:
stepStarted
in interfaceLocalSearchPhaseLifecycleListener<Solution_>
-
stepEnded
public void stepEnded(LocalSearchStepScope<Solution_> stepScope)
- Specified by:
stepEnded
in interfaceLocalSearchPhaseLifecycleListener<Solution_>
-
phaseEnded
public void phaseEnded(LocalSearchPhaseScope<Solution_> phaseScope)
- Specified by:
phaseEnded
in interfaceLocalSearchPhaseLifecycleListener<Solution_>
-
solvingEnded
public void solvingEnded(SolverScope<Solution_> solverScope)
- Specified by:
solvingEnded
in interfaceSolverLifecycleListener<Solution_>
- Overrides:
solvingEnded
in classAbstractPhase<Solution_>
-
-