org.optaplanner.core.impl.localsearch.decider.forager
Class AcceptedForager
java.lang.Object
org.optaplanner.core.impl.solver.event.SolverLifecycleListenerAdapter
org.optaplanner.core.impl.localsearch.event.LocalSearchPhaseLifecycleListenerAdapter
org.optaplanner.core.impl.localsearch.decider.forager.AbstractForager
org.optaplanner.core.impl.localsearch.decider.forager.AcceptedForager
- All Implemented Interfaces:
- EventListener, Forager, LocalSearchPhaseLifecycleListener, SolverLifecycleListener
public class AcceptedForager
- extends AbstractForager
An AcceptedForager is a Forager which forages accepted moves and ignores unaccepted moves.
- See Also:
Forager
,
Acceptor
deciderScoreComparatorFactory
protected final DeciderScoreComparatorFactory deciderScoreComparatorFactory
pickEarlyType
protected final LocalSearchPickEarlyType pickEarlyType
acceptedCountLimit
protected final int acceptedCountLimit
scoreComparator
protected Comparator<Score> scoreComparator
selectedMoveCount
protected long selectedMoveCount
acceptedMoveCount
protected long acceptedMoveCount
maxScoreAcceptedList
protected List<LocalSearchMoveScope> maxScoreAcceptedList
maxAcceptedScore
protected Score maxAcceptedScore
maxScoreUnacceptedList
protected List<LocalSearchMoveScope> maxScoreUnacceptedList
maxUnacceptedScore
protected Score maxUnacceptedScore
earlyPickedMoveScope
protected LocalSearchMoveScope earlyPickedMoveScope
AcceptedForager
public AcceptedForager(DeciderScoreComparatorFactory deciderScoreComparatorFactory,
LocalSearchPickEarlyType pickEarlyType,
int acceptedCountLimit)
phaseStarted
public void phaseStarted(LocalSearchPhaseScope phaseScope)
- Specified by:
phaseStarted
in interface LocalSearchPhaseLifecycleListener
- Overrides:
phaseStarted
in class LocalSearchPhaseLifecycleListenerAdapter
stepStarted
public void stepStarted(LocalSearchStepScope stepScope)
- Specified by:
stepStarted
in interface LocalSearchPhaseLifecycleListener
- Overrides:
stepStarted
in class LocalSearchPhaseLifecycleListenerAdapter
supportsNeverEndingMoveSelector
public boolean supportsNeverEndingMoveSelector()
addMove
public void addMove(LocalSearchMoveScope moveScope)
checkPickEarly
protected void checkPickEarly(LocalSearchMoveScope moveScope)
addToMaxScoreAcceptedList
protected void addToMaxScoreAcceptedList(LocalSearchMoveScope moveScope)
addToMaxScoreUnacceptedList
protected void addToMaxScoreUnacceptedList(LocalSearchMoveScope moveScope)
isQuitEarly
public boolean isQuitEarly()
pickMove
public LocalSearchMoveScope pickMove(LocalSearchStepScope stepScope)
pickMaxScoreMoveScope
protected LocalSearchMoveScope pickMaxScoreMoveScope(LocalSearchStepScope stepScope)
stepEnded
public void stepEnded(LocalSearchStepScope stepScope)
- Specified by:
stepEnded
in interface LocalSearchPhaseLifecycleListener
- Overrides:
stepEnded
in class LocalSearchPhaseLifecycleListenerAdapter
phaseEnded
public void phaseEnded(LocalSearchPhaseScope phaseScope)
- Specified by:
phaseEnded
in interface LocalSearchPhaseLifecycleListener
- Overrides:
phaseEnded
in class LocalSearchPhaseLifecycleListenerAdapter
toString
public String toString()
- Overrides:
toString
in class Object
Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.