Class BestSolutionRecaller<Solution_>

Type Parameters:
Solution_ - the solution type, the class with the PlanningSolution annotation
All Implemented Interfaces:
PhaseLifecycleListener<Solution_>, SolverLifecycleListener<Solution_>, EventListener

public class BestSolutionRecaller<Solution_> extends PhaseLifecycleListenerAdapter<Solution_>
Remembers the best solution that a Solver encounters.
  • Field Details

    • assertInitialScoreFromScratch

      protected boolean assertInitialScoreFromScratch
    • assertShadowVariablesAreNotStale

      protected boolean assertShadowVariablesAreNotStale
    • assertBestScoreIsUnmodified

      protected boolean assertBestScoreIsUnmodified
    • solverEventSupport

      protected SolverEventSupport<Solution_> 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

      public void setSolverEventSupport(SolverEventSupport<Solution_> solverEventSupport)
    • solvingStarted

      public void solvingStarted(SolverScope<Solution_> solverScope)
      Specified by:
      solvingStarted in interface SolverLifecycleListener<Solution_>
      Overrides:
      solvingStarted in class SolverLifecycleListenerAdapter<Solution_>
    • processWorkingSolutionDuringConstructionHeuristicsStep

      public void processWorkingSolutionDuringConstructionHeuristicsStep(AbstractStepScope<Solution_> stepScope)
    • processWorkingSolutionDuringStep

      public <Score_ extends Score<Score_>> void processWorkingSolutionDuringStep(AbstractStepScope<Solution_> stepScope)
    • processWorkingSolutionDuringMove

      public <Score_ extends Score<Score_>> void processWorkingSolutionDuringMove(InnerScore<Score_> moveScore, AbstractStepScope<Solution_> stepScope)
    • updateBestSolutionAndFire

      public void updateBestSolutionAndFire(SolverScope<Solution_> solverScope)
    • updateBestSolutionAndFireIfInitialized

      public void updateBestSolutionAndFireIfInitialized(SolverScope<Solution_> solverScope)