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 thePlanningSolutionannotation
- All Implemented Interfaces:
EventListener,PhaseLifecycleListener<Solution_>,SolverLifecycleListener<Solution_>
Remembers the
best solution that a Solver encounters.-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected booleanprotected booleanprotected SolverEventSupport<Solution_> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidprocessWorkingSolutionDuringMove(Score score, AbstractStepScope<Solution_> stepScope) voidvoidsetAssertBestScoreIsUnmodified(boolean assertBestScoreIsUnmodified) voidsetAssertInitialScoreFromScratch(boolean assertInitialScoreFromScratch) voidsetAssertShadowVariablesAreNotStale(boolean assertShadowVariablesAreNotStale) voidsetSolverEventSupport(SolverEventSupport<Solution_> solverEventSupport) voidsolvingStarted(SolverScope<Solution_> solverScope) voidupdateBestSolutionAndFire(SolverScope<Solution_> solverScope) voidupdateBestSolutionAndFireIfInitialized(SolverScope<Solution_> solverScope) Methods inherited from class org.optaplanner.core.impl.phase.event.PhaseLifecycleListenerAdapter
phaseEnded, phaseStarted, stepEnded, stepStartedMethods inherited from class org.optaplanner.core.impl.solver.event.SolverLifecycleListenerAdapter
solvingEndedMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
solvingStartedin interfaceSolverLifecycleListener<Solution_>- Overrides:
solvingStartedin classSolverLifecycleListenerAdapter<Solution_>
-
processWorkingSolutionDuringConstructionHeuristicsStep
public void processWorkingSolutionDuringConstructionHeuristicsStep(AbstractStepScope<Solution_> stepScope) -
processWorkingSolutionDuringStep
-
processWorkingSolutionDuringMove
-
updateBestSolutionAndFire
-
updateBestSolutionAndFireIfInitialized
-