Class AcceptedLocalSearchForager<Solution_>
java.lang.Object
ai.timefold.solver.core.impl.solver.event.SolverLifecycleListenerAdapter<Solution_>
ai.timefold.solver.core.impl.localsearch.event.LocalSearchPhaseLifecycleListenerAdapter<Solution_>
ai.timefold.solver.core.impl.localsearch.decider.forager.AbstractLocalSearchForager<Solution_>
ai.timefold.solver.core.impl.localsearch.decider.forager.AcceptedLocalSearchForager<Solution_>
- All Implemented Interfaces:
LocalSearchForager<Solution_>,LocalSearchPhaseLifecycleListener<Solution_>,SolverLifecycleListener<Solution_>,EventListener
public final class AcceptedLocalSearchForager<Solution_>
extends AbstractLocalSearchForager<Solution_>
A
LocalSearchForager which forages accepted moves and ignores unaccepted moves.- See Also:
-
Field Summary
Fields inherited from class ai.timefold.solver.core.impl.localsearch.decider.forager.AbstractLocalSearchForager
logger -
Constructor Summary
ConstructorsConstructorDescriptionAcceptedLocalSearchForager(FinalistPodium<Solution_> finalistPodium, LocalSearchPickEarlyType pickEarlyType, int acceptedCountLimit, boolean breakTieRandomly) -
Method Summary
Modifier and TypeMethodDescriptionvoidaddMove(LocalSearchMoveScope<Solution_> moveScope) booleanvoidphaseEnded(LocalSearchPhaseScope<Solution_> phaseScope) voidphaseStarted(LocalSearchPhaseScope<Solution_> phaseScope) pickMove(LocalSearchStepScope<Solution_> stepScope) voidsolvingEnded(SolverScope<Solution_> solverScope) voidsolvingStarted(SolverScope<Solution_> solverScope) voidstepEnded(LocalSearchStepScope<Solution_> stepScope) voidstepStarted(LocalSearchStepScope<Solution_> stepScope) booleantoString()Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface ai.timefold.solver.core.impl.solver.event.SolverLifecycleListener
solvingError
-
Constructor Details
-
AcceptedLocalSearchForager
public AcceptedLocalSearchForager(FinalistPodium<Solution_> finalistPodium, LocalSearchPickEarlyType pickEarlyType, int acceptedCountLimit, boolean breakTieRandomly)
-
-
Method Details
-
solvingStarted
- Specified by:
solvingStartedin interfaceSolverLifecycleListener<Solution_>- Overrides:
solvingStartedin classSolverLifecycleListenerAdapter<Solution_>
-
phaseStarted
- Specified by:
phaseStartedin interfaceLocalSearchPhaseLifecycleListener<Solution_>- Overrides:
phaseStartedin classLocalSearchPhaseLifecycleListenerAdapter<Solution_>
-
stepStarted
- Specified by:
stepStartedin interfaceLocalSearchPhaseLifecycleListener<Solution_>- Overrides:
stepStartedin classLocalSearchPhaseLifecycleListenerAdapter<Solution_>
-
supportsNeverEndingMoveSelector
public boolean supportsNeverEndingMoveSelector()- Returns:
- true if it can be combined with a
Selector.isNeverEnding()that returns true.
-
addMove
- Parameters:
moveScope- never null
-
isQuitEarly
public boolean isQuitEarly()- Returns:
- true if no further moves should be selected (and evaluated) for this step.
-
pickMove
- Parameters:
stepScope- never null- Returns:
- sometimes null, for example if no move is selected
-
stepEnded
- Specified by:
stepEndedin interfaceLocalSearchPhaseLifecycleListener<Solution_>- Overrides:
stepEndedin classLocalSearchPhaseLifecycleListenerAdapter<Solution_>
-
phaseEnded
- Specified by:
phaseEndedin interfaceLocalSearchPhaseLifecycleListener<Solution_>- Overrides:
phaseEndedin classLocalSearchPhaseLifecycleListenerAdapter<Solution_>
-
solvingEnded
- Specified by:
solvingEndedin interfaceSolverLifecycleListener<Solution_>- Overrides:
solvingEndedin classSolverLifecycleListenerAdapter<Solution_>
-
toString
-