Class DefaultConstructionHeuristicPhase<Solution_>
java.lang.Object
ai.timefold.solver.core.impl.phase.AbstractPhase<Solution_>
ai.timefold.solver.core.impl.constructionheuristic.DefaultConstructionHeuristicPhase<Solution_>
- Type Parameters:
Solution_- the solution type, the class with thePlanningSolutionannotation
- All Implemented Interfaces:
ConstructionHeuristicPhase<Solution_>,PhaseLifecycleListener<Solution_>,Phase<Solution_>,SolverLifecycleListener<Solution_>,EventListener
public class DefaultConstructionHeuristicPhase<Solution_>
extends AbstractPhase<Solution_>
implements ConstructionHeuristicPhase<Solution_>
Default implementation of
ConstructionHeuristicPhase.-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested classes/interfaces inherited from class ai.timefold.solver.core.impl.phase.AbstractPhase
AbstractPhase.Builder<Solution_> -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final ConstructionHeuristicDecider<Solution_>protected final EntityPlacer<Solution_>Fields inherited from class ai.timefold.solver.core.impl.phase.AbstractPhase
assertExpectedStepScore, assertShadowVariablesAreNotStaleAfterStep, assertStepScoreFromScratch, logger, logIndentation, phaseIndex, phaseLifecycleSupport, phaseTermination, solver, triggerFirstInitializedSolutionEvent -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedDefaultConstructionHeuristicPhase(DefaultConstructionHeuristicPhase.DefaultConstructionHeuristicPhaseBuilder<Solution_> builder) -
Method Summary
Modifier and TypeMethodDescriptionprotected ConstructionHeuristicPhaseScope<Solution_>buildPhaseScope(SolverScope<Solution_> solverScope, int phaseIndex) voidphaseEnded(ConstructionHeuristicPhaseScope<Solution_> phaseScope) voidphaseStarted(ConstructionHeuristicPhaseScope<Solution_> phaseScope) voidsolve(SolverScope<Solution_> solverScope) voidsolvingEnded(SolverScope<Solution_> solverScope) voidsolvingError(SolverScope<Solution_> solverScope, Exception exception) Invoked in case of an exception in theSolverrun.voidsolvingStarted(SolverScope<Solution_> solverScope) voidstepEnded(ConstructionHeuristicStepScope<Solution_> stepScope) voidstepStarted(ConstructionHeuristicStepScope<Solution_> stepScope) Methods inherited from class ai.timefold.solver.core.impl.phase.AbstractPhase
addPhaseLifecycleListener, assertWorkingSolutionInitialized, calculateWorkingStepScore, getPhaseIndex, getPhaseTermination, getSolver, isAssertExpectedStepScore, isAssertShadowVariablesAreNotStaleAfterStep, isAssertStepScoreFromScratch, isNested, phaseEnded, phaseStarted, predictWorkingStepScore, removePhaseLifecycleListener, setSolver, stepEnded, stepStarted, triggersFirstInitializedSolutionEventMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ai.timefold.solver.core.impl.phase.Phase
addPhaseLifecycleListener, removePhaseLifecycleListener, triggersFirstInitializedSolutionEventMethods inherited from interface ai.timefold.solver.core.impl.phase.event.PhaseLifecycleListener
phaseEnded, phaseStarted, stepEnded, stepStarted
-
Field Details
-
decider
-
entityPlacer
-
-
Constructor Details
-
DefaultConstructionHeuristicPhase
protected DefaultConstructionHeuristicPhase(DefaultConstructionHeuristicPhase.DefaultConstructionHeuristicPhaseBuilder<Solution_> builder)
-
-
Method Details
-
getEntityPlacer
-
getPhaseTypeString
- Specified by:
getPhaseTypeStringin classAbstractPhase<Solution_>
-
solve
-
buildPhaseScope
protected ConstructionHeuristicPhaseScope<Solution_> buildPhaseScope(SolverScope<Solution_> solverScope, int phaseIndex) -
solvingStarted
- Specified by:
solvingStartedin interfaceSolverLifecycleListener<Solution_>- Overrides:
solvingStartedin classAbstractPhase<Solution_>
-
phaseStarted
-
stepStarted
-
stepEnded
-
phaseEnded
-
solvingEnded
- Specified by:
solvingEndedin interfaceSolverLifecycleListener<Solution_>- Overrides:
solvingEndedin classAbstractPhase<Solution_>
-
solvingError
Description copied from interface:SolverLifecycleListenerInvoked in case of an exception in theSolverrun. In that case, theSolverLifecycleListener.solvingEnded(SolverScope)is never called. For internal purposes only.- Specified by:
solvingErrorin interfaceSolverLifecycleListener<Solution_>
-