Class AbstractPossiblyInitializingPhase<Solution_>
java.lang.Object
ai.timefold.solver.core.impl.phase.AbstractPhase<Solution_>
ai.timefold.solver.core.impl.phase.AbstractPossiblyInitializingPhase<Solution_>
- All Implemented Interfaces:
PhaseLifecycleListener<Solution_>,Phase<Solution_>,PossiblyInitializingPhase<Solution_>,SolverLifecycleListener<Solution_>,EventListener
- Direct Known Subclasses:
DefaultConstructionHeuristicPhase,DefaultCustomPhase
public abstract class AbstractPossiblyInitializingPhase<Solution_>
extends AbstractPhase<Solution_>
implements PossiblyInitializingPhase<Solution_>
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classNested classes/interfaces inherited from class ai.timefold.solver.core.impl.phase.AbstractPhase
AbstractPhase.AbstractPhaseBuilder<Solution_>Nested classes/interfaces inherited from interface ai.timefold.solver.core.impl.phase.PossiblyInitializingPhase
PossiblyInitializingPhase.TerminationStatus -
Field Summary
Fields inherited from class ai.timefold.solver.core.impl.phase.AbstractPhase
assertExpectedStepScore, assertPhaseScoreFromScratch, assertShadowVariablesAreNotStaleAfterStep, assertStepScoreFromScratch, logger, logIndentation, phaseIndex, phaseLifecycleSupport, phaseTermination -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedAbstractPossiblyInitializingPhase(AbstractPossiblyInitializingPhase.AbstractPossiblyInitializingPhaseBuilder<Solution_> builder) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidensureCorrectTermination(AbstractPhaseScope<Solution_> phaseScope, org.slf4j.Logger logger) final booleanCheck if a phase should trigger the first initialized solution event.protected static PossiblyInitializingPhase.TerminationStatustranslateEarlyTermination(AbstractPhaseScope<?> phaseScope, @Nullable PossiblyInitializingPhase.TerminationStatus earlyTerminationStatus, boolean hasMoreSteps) Methods inherited from class ai.timefold.solver.core.impl.phase.AbstractPhase
addPhaseLifecycleListener, assertWorkingSolutionInitialized, calculateWorkingStepScore, getPhaseIndex, getPhaseTermination, getPhaseTypeString, isAssertExpectedStepScore, isAssertShadowVariablesAreNotStaleAfterStep, isAssertStepScoreFromScratch, isNested, phaseEnded, phaseStarted, predictWorkingStepScore, removePhaseLifecycleListener, solvingEnded, solvingStarted, stepEnded, stepStartedMethods 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, solveMethods inherited from interface ai.timefold.solver.core.impl.phase.event.PhaseLifecycleListener
phaseEnded, phaseStarted, stepEnded, stepStartedMethods inherited from interface ai.timefold.solver.core.impl.phase.PossiblyInitializingPhase
getTerminationStatusMethods inherited from interface ai.timefold.solver.core.impl.solver.event.SolverLifecycleListener
solvingEnded, solvingError, solvingStarted
-
Constructor Details
-
AbstractPossiblyInitializingPhase
protected AbstractPossiblyInitializingPhase(AbstractPossiblyInitializingPhase.AbstractPossiblyInitializingPhaseBuilder<Solution_> builder)
-
-
Method Details
-
isLastInitializingPhase
public final boolean isLastInitializingPhase()Description copied from interface:PossiblyInitializingPhaseCheck if a phase should trigger the first initialized solution event. The first initialized solution immediately precedes the firstLocalSearchPhase.- Specified by:
isLastInitializingPhasein interfacePossiblyInitializingPhase<Solution_>- Returns:
- true if the phase is the final phase before the first local search phase.
- See Also:
-
translateEarlyTermination
protected static PossiblyInitializingPhase.TerminationStatus translateEarlyTermination(AbstractPhaseScope<?> phaseScope, @Nullable PossiblyInitializingPhase.TerminationStatus earlyTerminationStatus, boolean hasMoreSteps) -
ensureCorrectTermination
protected void ensureCorrectTermination(AbstractPhaseScope<Solution_> phaseScope, org.slf4j.Logger logger)
-