org.drools.planner.core.localsearch.decider.forager
Class AcceptedForager

java.lang.Object
  extended by org.drools.planner.core.localsearch.event.LocalSearchSolverPhaseLifecycleListenerAdapter
      extended by org.drools.planner.core.localsearch.decider.forager.AbstractForager
          extended by 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

Field Summary
protected  List<MoveScope> acceptedList
           
protected  AcceptedMoveScopeComparator acceptedMoveScopeComparator
           
protected  MoveScope earlyPickedMoveScope
           
protected  boolean listSorted
           
protected  Score maxScore
           
protected  List<MoveScope> maxScoreAcceptedList
           
protected  int minimalAcceptedSelection
           
protected  PickEarlyType pickEarlyType
           
protected  int selectedCount
           
 
Fields inherited from class org.drools.planner.core.localsearch.decider.forager.AbstractForager
logger
 
Constructor Summary
AcceptedForager(PickEarlyType pickEarlyType, int minimalAcceptedSelection)
           
 
Method Summary
 void addMove(MoveScope moveScope)
           
protected  void addMoveScopeToAcceptedList(MoveScope moveScope)
           
 void beforeDeciding(LocalSearchStepScope localSearchStepScope)
           
protected  void checkPickEarly(MoveScope moveScope)
           
 int getAcceptedMovesSize()
           
 List<Move> getTopList(int topSize)
           
 boolean isQuitEarly()
           
protected  MoveScope pickMaxScoreMoveScopeFromAcceptedList(LocalSearchStepScope localSearchStepScope)
           
 MoveScope pickMove(LocalSearchStepScope localSearchStepScope)
           
protected  void sortAcceptedList()
           
 
Methods inherited from class org.drools.planner.core.localsearch.event.LocalSearchSolverPhaseLifecycleListenerAdapter
phaseEnded, phaseStarted, stepDecided, stepTaken
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.drools.planner.core.localsearch.event.LocalSearchSolverPhaseLifecycleListener
phaseEnded, phaseStarted, stepDecided, stepTaken
 

Field Detail

pickEarlyType

protected final PickEarlyType pickEarlyType

minimalAcceptedSelection

protected final int minimalAcceptedSelection

acceptedMoveScopeComparator

protected AcceptedMoveScopeComparator acceptedMoveScopeComparator

selectedCount

protected int selectedCount

acceptedList

protected List<MoveScope> acceptedList

maxScoreAcceptedList

protected List<MoveScope> maxScoreAcceptedList

listSorted

protected boolean listSorted

maxScore

protected Score maxScore

earlyPickedMoveScope

protected MoveScope earlyPickedMoveScope
Constructor Detail

AcceptedForager

public AcceptedForager(PickEarlyType pickEarlyType,
                       int minimalAcceptedSelection)
Method Detail

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)

sortAcceptedList

protected void sortAcceptedList()


Copyright © 2001-2011 JBoss by Red Hat. All Rights Reserved.