Class BestSolutionRecaller<Solution_>
java.lang.Object
org.optaplanner.core.impl.solver.event.SolverLifecycleListenerAdapter<Solution_>
org.optaplanner.core.impl.phase.event.PhaseLifecycleListenerAdapter<Solution_>
org.optaplanner.core.impl.solver.recaller.BestSolutionRecaller<Solution_>
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotation
- All Implemented Interfaces:
EventListener
,PhaseLifecycleListener<Solution_>
,SolverLifecycleListener<Solution_>
Remembers the
best solution
that a Solver
encounters.-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected boolean
protected boolean
protected SolverEventSupport<Solution_>
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
processWorkingSolutionDuringMove
(Score score, AbstractStepScope<Solution_> stepScope) void
void
setAssertBestScoreIsUnmodified
(boolean assertBestScoreIsUnmodified) void
setAssertInitialScoreFromScratch
(boolean assertInitialScoreFromScratch) void
setAssertShadowVariablesAreNotStale
(boolean assertShadowVariablesAreNotStale) void
setSolverEventSupport
(SolverEventSupport<Solution_> solverEventSupport) void
solvingStarted
(SolverScope<Solution_> solverScope) void
updateBestSolutionAndFire
(SolverScope<Solution_> solverScope) void
updateBestSolutionAndFireIfInitialized
(SolverScope<Solution_> solverScope) Methods inherited from class org.optaplanner.core.impl.phase.event.PhaseLifecycleListenerAdapter
phaseEnded, phaseStarted, stepEnded, stepStarted
Methods inherited from class org.optaplanner.core.impl.solver.event.SolverLifecycleListenerAdapter
solvingEnded
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.solver.event.SolverLifecycleListener
solvingEnded, solvingError
-
Field Details
-
assertInitialScoreFromScratch
protected boolean assertInitialScoreFromScratch -
assertShadowVariablesAreNotStale
protected boolean assertShadowVariablesAreNotStale -
assertBestScoreIsUnmodified
protected boolean assertBestScoreIsUnmodified -
solverEventSupport
-
-
Constructor Details
-
BestSolutionRecaller
public BestSolutionRecaller()
-
-
Method Details
-
setAssertInitialScoreFromScratch
public void setAssertInitialScoreFromScratch(boolean assertInitialScoreFromScratch) -
setAssertShadowVariablesAreNotStale
public void setAssertShadowVariablesAreNotStale(boolean assertShadowVariablesAreNotStale) -
setAssertBestScoreIsUnmodified
public void setAssertBestScoreIsUnmodified(boolean assertBestScoreIsUnmodified) -
setSolverEventSupport
-
solvingStarted
- Specified by:
solvingStarted
in interfaceSolverLifecycleListener<Solution_>
- Overrides:
solvingStarted
in classSolverLifecycleListenerAdapter<Solution_>
-
processWorkingSolutionDuringConstructionHeuristicsStep
public void processWorkingSolutionDuringConstructionHeuristicsStep(AbstractStepScope<Solution_> stepScope) -
processWorkingSolutionDuringStep
-
processWorkingSolutionDuringMove
-
updateBestSolutionAndFire
-
updateBestSolutionAndFireIfInitialized
-