Class DefaultExhaustiveSearchPhase<Solution_>
- java.lang.Object
-
- org.optaplanner.core.impl.phase.AbstractPhase<Solution_>
-
- org.optaplanner.core.impl.exhaustivesearch.DefaultExhaustiveSearchPhase<Solution_>
-
- Type Parameters:
Solution_
- the solution type, the class with thePlanningSolution
annotation
- All Implemented Interfaces:
EventListener
,ExhaustiveSearchPhase<Solution_>
,PhaseLifecycleListener<Solution_>
,Phase<Solution_>
,SolverLifecycleListener<Solution_>
public class DefaultExhaustiveSearchPhase<Solution_> extends AbstractPhase<Solution_> implements ExhaustiveSearchPhase<Solution_>
Default implementation ofExhaustiveSearchPhase
.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
DefaultExhaustiveSearchPhase.Builder<Solution_>
-
Field Summary
Fields Modifier and Type Field Description protected boolean
assertExpectedWorkingSolutionScore
protected boolean
assertWorkingSolutionScoreFromScratch
protected ExhaustiveSearchDecider<Solution_>
decider
protected EntitySelector<Solution_>
entitySelector
protected Comparator<ExhaustiveSearchNode>
nodeComparator
-
Fields inherited from class org.optaplanner.core.impl.phase.AbstractPhase
assertExpectedStepScore, assertShadowVariablesAreNotStaleAfterStep, assertStepScoreFromScratch, logger, logIndentation, phaseIndex, phaseLifecycleSupport, phaseTermination, solver
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getPhaseTypeString()
void
phaseEnded(ExhaustiveSearchPhaseScope<Solution_> phaseScope)
void
phaseStarted(ExhaustiveSearchPhaseScope<Solution_> phaseScope)
protected void
restoreWorkingSolution(ExhaustiveSearchStepScope<Solution_> stepScope)
void
solve(SolverScope<Solution_> solverScope)
void
solvingEnded(SolverScope<Solution_> solverScope)
void
solvingStarted(SolverScope<Solution_> solverScope)
void
stepEnded(ExhaustiveSearchStepScope<Solution_> stepScope)
void
stepStarted(ExhaustiveSearchStepScope<Solution_> stepScope)
-
Methods inherited from class org.optaplanner.core.impl.phase.AbstractPhase
addPhaseLifecycleListener, assertWorkingSolutionInitialized, calculateWorkingStepScore, getPhaseIndex, getPhaseTermination, getSolver, isAssertExpectedStepScore, isAssertShadowVariablesAreNotStaleAfterStep, isAssertStepScoreFromScratch, phaseEnded, phaseStarted, predictWorkingStepScore, removePhaseLifecycleListener, setSolver, 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
-
Methods inherited from interface org.optaplanner.core.impl.phase.event.PhaseLifecycleListener
phaseEnded, phaseStarted, stepEnded, stepStarted
-
-
-
-
Field Detail
-
nodeComparator
protected final Comparator<ExhaustiveSearchNode> nodeComparator
-
entitySelector
protected final EntitySelector<Solution_> entitySelector
-
decider
protected final ExhaustiveSearchDecider<Solution_> decider
-
assertWorkingSolutionScoreFromScratch
protected final boolean assertWorkingSolutionScoreFromScratch
-
assertExpectedWorkingSolutionScore
protected final boolean assertExpectedWorkingSolutionScore
-
-
Method Detail
-
getPhaseTypeString
public String getPhaseTypeString()
- Specified by:
getPhaseTypeString
in classAbstractPhase<Solution_>
-
solve
public void solve(SolverScope<Solution_> solverScope)
-
solvingStarted
public void solvingStarted(SolverScope<Solution_> solverScope)
- Specified by:
solvingStarted
in interfaceSolverLifecycleListener<Solution_>
- Overrides:
solvingStarted
in classAbstractPhase<Solution_>
-
phaseStarted
public void phaseStarted(ExhaustiveSearchPhaseScope<Solution_> phaseScope)
-
stepStarted
public void stepStarted(ExhaustiveSearchStepScope<Solution_> stepScope)
-
restoreWorkingSolution
protected void restoreWorkingSolution(ExhaustiveSearchStepScope<Solution_> stepScope)
-
stepEnded
public void stepEnded(ExhaustiveSearchStepScope<Solution_> stepScope)
-
phaseEnded
public void phaseEnded(ExhaustiveSearchPhaseScope<Solution_> phaseScope)
-
solvingEnded
public void solvingEnded(SolverScope<Solution_> solverScope)
- Specified by:
solvingEnded
in interfaceSolverLifecycleListener<Solution_>
- Overrides:
solvingEnded
in classAbstractPhase<Solution_>
-
-