org.drools.planner.core.localsearch.decider.forager
Class AcceptedForager
java.lang.Object
org.drools.planner.core.localsearch.event.LocalSearchSolverPhaseLifecycleListenerAdapter
org.drools.planner.core.localsearch.decider.forager.AbstractForager
org.drools.planner.core.localsearch.decider.forager.AcceptedForager
- All Implemented Interfaces:
- EventListener, Forager, LocalSearchSolverPhaseLifecycleListener
public class AcceptedForager
- extends AbstractForager
An AcceptedForager is a Forager which forages accepted moves and ignores unaccepted moves.
- See Also:
Forager
,
Acceptor
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
deciderScoreComparatorFactory
protected DeciderScoreComparatorFactory deciderScoreComparatorFactory
pickEarlyType
protected final PickEarlyType pickEarlyType
minimalAcceptedSelection
protected final int minimalAcceptedSelection
scoreComparator
protected Comparator<Score> scoreComparator
acceptedMoveScopeComparator
protected AcceptedMoveScopeComparator acceptedMoveScopeComparator
selectedCount
protected int selectedCount
acceptedList
protected List<MoveScope> acceptedList
maxScoreAcceptedList
protected List<MoveScope> maxScoreAcceptedList
maxScore
protected Score maxScore
earlyPickedMoveScope
protected MoveScope earlyPickedMoveScope
AcceptedForager
public AcceptedForager(PickEarlyType pickEarlyType,
int minimalAcceptedSelection)
setDeciderScoreComparatorFactory
public void setDeciderScoreComparatorFactory(DeciderScoreComparatorFactory deciderScoreComparator)
phaseStarted
public void phaseStarted(LocalSearchSolverPhaseScope localSearchSolverPhaseScope)
- Specified by:
phaseStarted
in interface LocalSearchSolverPhaseLifecycleListener
- Overrides:
phaseStarted
in class LocalSearchSolverPhaseLifecycleListenerAdapter
beforeDeciding
public void beforeDeciding(LocalSearchStepScope localSearchStepScope)
- Specified by:
beforeDeciding
in interface LocalSearchSolverPhaseLifecycleListener
- Overrides:
beforeDeciding
in class LocalSearchSolverPhaseLifecycleListenerAdapter
addMove
public void addMove(MoveScope moveScope)
checkPickEarly
protected void checkPickEarly(MoveScope moveScope)
addMoveScopeToAcceptedList
protected void addMoveScopeToAcceptedList(MoveScope moveScope)
isQuitEarly
public boolean isQuitEarly()
pickMove
public MoveScope pickMove(LocalSearchStepScope localSearchStepScope)
pickMaxScoreMoveScopeFromAcceptedList
protected MoveScope pickMaxScoreMoveScopeFromAcceptedList(LocalSearchStepScope localSearchStepScope)
getAcceptedMovesSize
public int getAcceptedMovesSize()
getTopList
public List<Move> getTopList(int topSize)
stepTaken
public void stepTaken(LocalSearchStepScope localSearchStepScope)
- Specified by:
stepTaken
in interface LocalSearchSolverPhaseLifecycleListener
- Overrides:
stepTaken
in class LocalSearchSolverPhaseLifecycleListenerAdapter
phaseEnded
public void phaseEnded(LocalSearchSolverPhaseScope localSearchSolverPhaseScope)
- Specified by:
phaseEnded
in interface LocalSearchSolverPhaseLifecycleListener
- Overrides:
phaseEnded
in class LocalSearchSolverPhaseLifecycleListenerAdapter
Copyright © 2001-2012 JBoss by Red Hat. All Rights Reserved.