Class AbstractNearbySelector<Solution_,ChildSelector_ extends PhaseLifecycleListener<Solution_>,ReplayingSelector_ extends PhaseLifecycleListener<Solution_>>
- java.lang.Object
-
- ai.timefold.solver.core.impl.heuristic.selector.AbstractSelector<Solution_>
-
- ai.timefold.solver.core.impl.heuristic.selector.AbstractDemandEnabledSelector<Solution_>
-
- ai.timefold.solver.core.impl.heuristic.selector.common.nearby.AbstractNearbySelector<Solution_,ChildSelector_,ReplayingSelector_>
-
- All Implemented Interfaces:
Selector<Solution_>,PhaseLifecycleListener<Solution_>,SolverLifecycleListener<Solution_>,EventListener
- Direct Known Subclasses:
NearEntityNearbyEntitySelector,NearEntityNearbyValueSelector,NearSubListNearbyDestinationSelector,NearSubListNearbySubListSelector,NearValueNearbyDestinationSelector,NearValueNearbyValueSelector
public abstract class AbstractNearbySelector<Solution_,ChildSelector_ extends PhaseLifecycleListener<Solution_>,ReplayingSelector_ extends PhaseLifecycleListener<Solution_>> extends AbstractDemandEnabledSelector<Solution_>
-
-
Field Summary
Fields Modifier and Type Field Description protected ChildSelector_childSelectorprotected NearbyDistanceMatrix<Object,Object>nearbyDistanceMatrixprotected NearbyDistanceMeter<?,?>nearbyDistanceMeterprotected NearbyRandomnearbyRandomprotected booleanrandomSelectionprotected ReplayingSelector_replayingSelector-
Fields inherited from class ai.timefold.solver.core.impl.heuristic.selector.AbstractSelector
logger, phaseLifecycleSupport, workingRandom
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedAbstractNearbySelector(ChildSelector_ childSelector, Object replayingSelector, NearbyDistanceMeter<?,?> nearbyDistanceMeter, NearbyRandom nearbyRandom, boolean randomSelection)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract ReplayingSelector_castReplayingSelector(Object uncastReplayingSelector)protected abstract AbstractNearbyDistanceMatrixDemand<?,?,?,?>createDemand()booleanequals(Object other)AbstractNearbyDistanceMatrixDemand<?,?,?,?>getNearbyDistanceMatrixDemand()inthashCode()booleanisNeverEnding()Is true ifSelector.isCountable()is false or if this selector is in random order (for most cases).voidphaseEnded(AbstractPhaseScope<Solution_> phaseScope)voidphaseStarted(AbstractPhaseScope<Solution_> phaseScope)StringtoString()-
Methods inherited from class ai.timefold.solver.core.impl.heuristic.selector.AbstractSelector
getCacheType, solvingEnded, solvingStarted, stepEnded, stepStarted
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface ai.timefold.solver.core.impl.heuristic.selector.Selector
isCountable
-
Methods inherited from interface ai.timefold.solver.core.impl.solver.event.SolverLifecycleListener
solvingError
-
-
-
-
Field Detail
-
childSelector
protected final ChildSelector_ extends PhaseLifecycleListener<Solution_> childSelector
-
replayingSelector
protected final ReplayingSelector_ extends PhaseLifecycleListener<Solution_> replayingSelector
-
nearbyDistanceMeter
protected final NearbyDistanceMeter<?,?> nearbyDistanceMeter
-
nearbyRandom
protected final NearbyRandom nearbyRandom
-
randomSelection
protected final boolean randomSelection
-
nearbyDistanceMatrix
protected NearbyDistanceMatrix<Object,Object> nearbyDistanceMatrix
-
-
Constructor Detail
-
AbstractNearbySelector
protected AbstractNearbySelector(ChildSelector_ childSelector, Object replayingSelector, NearbyDistanceMeter<?,?> nearbyDistanceMeter, NearbyRandom nearbyRandom, boolean randomSelection)
-
-
Method Detail
-
castReplayingSelector
protected abstract ReplayingSelector_ castReplayingSelector(Object uncastReplayingSelector)
-
createDemand
protected abstract AbstractNearbyDistanceMatrixDemand<?,?,?,?> createDemand()
-
getNearbyDistanceMatrixDemand
public final AbstractNearbyDistanceMatrixDemand<?,?,?,?> getNearbyDistanceMatrixDemand()
-
phaseStarted
public final void phaseStarted(AbstractPhaseScope<Solution_> phaseScope)
- Specified by:
phaseStartedin interfacePhaseLifecycleListener<Solution_>- Overrides:
phaseStartedin classAbstractSelector<Solution_>
-
phaseEnded
public void phaseEnded(AbstractPhaseScope<Solution_> phaseScope)
- Specified by:
phaseEndedin interfacePhaseLifecycleListener<Solution_>- Overrides:
phaseEndedin classAbstractSelector<Solution_>
-
isNeverEnding
public final boolean isNeverEnding()
Description copied from interface:SelectorIs true ifSelector.isCountable()is false or if this selector is in random order (for most cases). Is never true when this selector is in shuffled order (which is less scalable but more exact).- Returns:
- true if the
Iterator.hasNext()of theIteratorcreated byIterable.iterator()never returns false (except when it's empty).
-
equals
public final boolean equals(Object other)
- Specified by:
equalsin classAbstractDemandEnabledSelector<Solution_>
-
hashCode
public final int hashCode()
- Specified by:
hashCodein classAbstractDemandEnabledSelector<Solution_>
-
-