Class DefaultConstructionHeuristicForager
- java.lang.Object
-
- org.optaplanner.core.impl.solver.event.SolverLifecycleListenerAdapter<Solution_>
-
- org.optaplanner.core.impl.constructionheuristic.event.ConstructionHeuristicPhaseLifecycleListenerAdapter
-
- org.optaplanner.core.impl.constructionheuristic.decider.forager.AbstractConstructionHeuristicForager
-
- org.optaplanner.core.impl.constructionheuristic.decider.forager.DefaultConstructionHeuristicForager
-
- All Implemented Interfaces:
EventListener,ConstructionHeuristicForager,ConstructionHeuristicPhaseLifecycleListener,SolverLifecycleListener
public class DefaultConstructionHeuristicForager extends AbstractConstructionHeuristicForager
-
-
Field Summary
Fields Modifier and Type Field Description protected ConstructionHeuristicMoveScopeearlyPickedMoveScopeprotected ConstructionHeuristicMoveScopemaxScoreMoveScopeprotected ConstructionHeuristicPickEarlyTypepickEarlyTypeprotected Comparator<Score>scoreComparatorprotected longselectedMoveCount
-
Constructor Summary
Constructors Constructor Description DefaultConstructionHeuristicForager(ConstructionHeuristicPickEarlyType pickEarlyType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddMove(ConstructionHeuristicMoveScope moveScope)protected voidcheckPickEarly(ConstructionHeuristicMoveScope moveScope)booleanisQuitEarly()ConstructionHeuristicMoveScopepickMove(ConstructionHeuristicStepScope stepScope)voidstepEnded(ConstructionHeuristicStepScope stepScope)voidstepStarted(ConstructionHeuristicStepScope stepScope)-
Methods inherited from class org.optaplanner.core.impl.constructionheuristic.event.ConstructionHeuristicPhaseLifecycleListenerAdapter
phaseEnded, phaseStarted
-
Methods inherited from class org.optaplanner.core.impl.solver.event.SolverLifecycleListenerAdapter
solvingEnded, solvingStarted
-
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.constructionheuristic.event.ConstructionHeuristicPhaseLifecycleListener
phaseEnded, phaseStarted
-
Methods inherited from interface org.optaplanner.core.impl.solver.event.SolverLifecycleListener
solvingEnded, solvingStarted
-
-
-
-
Field Detail
-
pickEarlyType
protected final ConstructionHeuristicPickEarlyType pickEarlyType
-
scoreComparator
protected final Comparator<Score> scoreComparator
-
selectedMoveCount
protected long selectedMoveCount
-
earlyPickedMoveScope
protected ConstructionHeuristicMoveScope earlyPickedMoveScope
-
maxScoreMoveScope
protected ConstructionHeuristicMoveScope maxScoreMoveScope
-
-
Constructor Detail
-
DefaultConstructionHeuristicForager
public DefaultConstructionHeuristicForager(ConstructionHeuristicPickEarlyType pickEarlyType)
-
-
Method Detail
-
stepStarted
public void stepStarted(ConstructionHeuristicStepScope stepScope)
- Specified by:
stepStartedin interfaceConstructionHeuristicPhaseLifecycleListener- Overrides:
stepStartedin classConstructionHeuristicPhaseLifecycleListenerAdapter
-
stepEnded
public void stepEnded(ConstructionHeuristicStepScope stepScope)
- Specified by:
stepEndedin interfaceConstructionHeuristicPhaseLifecycleListener- Overrides:
stepEndedin classConstructionHeuristicPhaseLifecycleListenerAdapter
-
addMove
public void addMove(ConstructionHeuristicMoveScope moveScope)
-
checkPickEarly
protected void checkPickEarly(ConstructionHeuristicMoveScope moveScope)
-
isQuitEarly
public boolean isQuitEarly()
-
pickMove
public ConstructionHeuristicMoveScope pickMove(ConstructionHeuristicStepScope stepScope)
-
-