org.drools.planner.core.localsearch.decider.acceptor.tabu
Class AbstractTabuAcceptor

java.lang.Object
  extended by org.drools.planner.core.localsearch.decider.acceptor.AbstractAcceptor
      extended by org.drools.planner.core.localsearch.decider.acceptor.tabu.AbstractTabuAcceptor
All Implemented Interfaces:
Acceptor, LocalSearchSolverLifecycleListener
Direct Known Subclasses:
MoveTabuAcceptor, PropertyTabuAcceptor, SolutionTabuAcceptor

public abstract class AbstractTabuAcceptor
extends AbstractAcceptor

Abstract superclass for all Tabu Acceptors.

See Also:
Acceptor

Field Summary
protected  boolean aspirationEnabled
           
protected  int completeTabuSize
           
protected  int partialTabuSize
           
protected  List<Object> tabuSequenceList
           
protected  Map<Object,Integer> tabuToStepIndexMap
           
 
Fields inherited from class org.drools.planner.core.localsearch.decider.acceptor.AbstractAcceptor
logger
 
Constructor Summary
AbstractTabuAcceptor()
           
 
Method Summary
 double calculateAcceptChance(MoveScope moveScope)
          TODO the use for an acceptChance between 0.0 and 1.0 is unproven.
protected  double calculatePartialTabuAcceptChance(int partialTabuTime)
           
protected abstract  Collection<? extends Object> findNewTabu(LocalSearchStepScope localSearchStepScope)
           
protected abstract  Collection<? extends Object> findTabu(MoveScope moveScope)
           
 int getCompleteTabuSize()
           
 void setAspirationEnabled(boolean aspirationEnabled)
           
 void setCompleteTabuSize(int completeTabuSize)
           
 void setPartialTabuSize(int partialTabuSize)
           
 void solvingStarted(LocalSearchSolverScope localSearchSolverScope)
           
 void stepTaken(LocalSearchStepScope localSearchStepScope)
           
 
Methods inherited from class org.drools.planner.core.localsearch.decider.acceptor.AbstractAcceptor
beforeDeciding, solvingEnded, stepDecided
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

completeTabuSize

protected int completeTabuSize

partialTabuSize

protected int partialTabuSize

aspirationEnabled

protected boolean aspirationEnabled

tabuToStepIndexMap

protected Map<Object,Integer> tabuToStepIndexMap

tabuSequenceList

protected List<Object> tabuSequenceList
Constructor Detail

AbstractTabuAcceptor

public AbstractTabuAcceptor()
Method Detail

getCompleteTabuSize

public int getCompleteTabuSize()

setCompleteTabuSize

public void setCompleteTabuSize(int completeTabuSize)

setPartialTabuSize

public void setPartialTabuSize(int partialTabuSize)

setAspirationEnabled

public void setAspirationEnabled(boolean aspirationEnabled)

solvingStarted

public void solvingStarted(LocalSearchSolverScope localSearchSolverScope)
Specified by:
solvingStarted in interface LocalSearchSolverLifecycleListener
Overrides:
solvingStarted in class AbstractAcceptor

calculateAcceptChance

public double calculateAcceptChance(MoveScope moveScope)
Description copied from interface: Acceptor
TODO the use for an acceptChance between 0.0 and 1.0 is unproven. A boolean instead of a double is sufficient?

Parameters:
moveScope - not null
Returns:
never negative; if rejected 0.0; if accepted higher than 0.0 (usually 1.0)

calculatePartialTabuAcceptChance

protected double calculatePartialTabuAcceptChance(int partialTabuTime)

stepTaken

public void stepTaken(LocalSearchStepScope localSearchStepScope)
Specified by:
stepTaken in interface LocalSearchSolverLifecycleListener
Overrides:
stepTaken in class AbstractAcceptor

findTabu

protected abstract Collection<? extends Object> findTabu(MoveScope moveScope)

findNewTabu

protected abstract Collection<? extends Object> findNewTabu(LocalSearchStepScope localSearchStepScope)


Copyright © 2001-2011 JBoss Inc.. All Rights Reserved.