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_>
public class BestSolutionRecaller<Solution_> extends PhaseLifecycleListenerAdapter<Solution_>
Remembers thebest solutionthat aSolverencounters. 
- 
- 
Field Summary
Fields Modifier and Type Field Description protected booleanassertBestScoreIsUnmodifiedprotected booleanassertInitialScoreFromScratchprotected booleanassertShadowVariablesAreNotStaleprotected SolverEventSupport<Solution_>solverEventSupport 
- 
Constructor Summary
Constructors Constructor Description BestSolutionRecaller() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidprocessWorkingSolutionDuringMove(Score score, AbstractStepScope<Solution_> stepScope)voidprocessWorkingSolutionDuringStep(AbstractStepScope<Solution_> stepScope)voidsetAssertBestScoreIsUnmodified(boolean assertBestScoreIsUnmodified)voidsetAssertInitialScoreFromScratch(boolean assertInitialScoreFromScratch)voidsetAssertShadowVariablesAreNotStale(boolean assertShadowVariablesAreNotStale)voidsetSolverEventSupport(SolverEventSupport<Solution_> solverEventSupport)voidsolvingStarted(SolverScope<Solution_> solverScope)voidupdateBestSolution(SolverScope<Solution_> solverScope)protected voidupdateBestSolution(SolverScope<Solution_> solverScope, Score bestScore, Solution_ bestSolution)- 
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 
 - 
 
 - 
 
- 
- 
Field Detail
- 
assertInitialScoreFromScratch
protected boolean assertInitialScoreFromScratch
 
- 
assertShadowVariablesAreNotStale
protected boolean assertShadowVariablesAreNotStale
 
- 
assertBestScoreIsUnmodified
protected boolean assertBestScoreIsUnmodified
 
- 
solverEventSupport
protected SolverEventSupport<Solution_> solverEventSupport
 
 - 
 
- 
Method Detail
- 
setAssertInitialScoreFromScratch
public void setAssertInitialScoreFromScratch(boolean assertInitialScoreFromScratch)
 
- 
setAssertShadowVariablesAreNotStale
public void setAssertShadowVariablesAreNotStale(boolean assertShadowVariablesAreNotStale)
 
- 
setAssertBestScoreIsUnmodified
public void setAssertBestScoreIsUnmodified(boolean assertBestScoreIsUnmodified)
 
- 
setSolverEventSupport
public void setSolverEventSupport(SolverEventSupport<Solution_> solverEventSupport)
 
- 
solvingStarted
public void solvingStarted(SolverScope<Solution_> solverScope)
- Specified by:
 solvingStartedin interfaceSolverLifecycleListener<Solution_>- Overrides:
 solvingStartedin classSolverLifecycleListenerAdapter<Solution_>
 
- 
processWorkingSolutionDuringStep
public void processWorkingSolutionDuringStep(AbstractStepScope<Solution_> stepScope)
 
- 
processWorkingSolutionDuringMove
public void processWorkingSolutionDuringMove(Score score, AbstractStepScope<Solution_> stepScope)
 
- 
updateBestSolution
public void updateBestSolution(SolverScope<Solution_> solverScope)
 
- 
updateBestSolution
protected void updateBestSolution(SolverScope<Solution_> solverScope, Score bestScore, Solution_ bestSolution)
 
 - 
 
 -