org.optaplanner.core.impl.localsearch.decider.acceptor.tabu
Class AbstractTabuAcceptor
java.lang.Object
org.optaplanner.core.impl.solver.event.SolverLifecycleListenerAdapter
org.optaplanner.core.impl.localsearch.event.LocalSearchPhaseLifecycleListenerAdapter
org.optaplanner.core.impl.localsearch.decider.acceptor.AbstractAcceptor
org.optaplanner.core.impl.localsearch.decider.acceptor.tabu.AbstractTabuAcceptor
- All Implemented Interfaces:
- EventListener, Acceptor, LocalSearchPhaseLifecycleListener, SolverLifecycleListener
- Direct Known Subclasses:
- EntityTabuAcceptor, MoveTabuAcceptor, SolutionTabuAcceptor, ValueTabuAcceptor
public abstract class AbstractTabuAcceptor
- extends AbstractAcceptor
Abstract superclass for all Tabu Acceptors.
- See Also:
Acceptor
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
tabuSizeStrategy
protected TabuSizeStrategy tabuSizeStrategy
fadingTabuSizeStrategy
protected TabuSizeStrategy fadingTabuSizeStrategy
aspirationEnabled
protected boolean aspirationEnabled
assertTabuHashCodeCorrectness
protected boolean assertTabuHashCodeCorrectness
tabuToStepIndexMap
protected Map<Object,Integer> tabuToStepIndexMap
tabuSequenceList
protected List<Object> tabuSequenceList
workingTabuSize
protected int workingTabuSize
workingFadingTabuSize
protected int workingFadingTabuSize
AbstractTabuAcceptor
public AbstractTabuAcceptor()
setTabuSizeStrategy
public void setTabuSizeStrategy(TabuSizeStrategy tabuSizeStrategy)
setFadingTabuSizeStrategy
public void setFadingTabuSizeStrategy(TabuSizeStrategy fadingTabuSizeStrategy)
setAspirationEnabled
public void setAspirationEnabled(boolean aspirationEnabled)
setAssertTabuHashCodeCorrectness
public void setAssertTabuHashCodeCorrectness(boolean assertTabuHashCodeCorrectness)
phaseStarted
public void phaseStarted(LocalSearchPhaseScope phaseScope)
- Specified by:
phaseStarted
in interface LocalSearchPhaseLifecycleListener
- Overrides:
phaseStarted
in class LocalSearchPhaseLifecycleListenerAdapter
phaseEnded
public void phaseEnded(LocalSearchPhaseScope phaseScope)
- Specified by:
phaseEnded
in interface LocalSearchPhaseLifecycleListener
- Overrides:
phaseEnded
in class LocalSearchPhaseLifecycleListenerAdapter
stepEnded
public void stepEnded(LocalSearchStepScope stepScope)
- Specified by:
stepEnded
in interface LocalSearchPhaseLifecycleListener
- Overrides:
stepEnded
in class LocalSearchPhaseLifecycleListenerAdapter
adjustTabuList
protected void adjustTabuList(int tabuStepIndex,
Collection<? extends Object> tabus)
isAccepted
public boolean isAccepted(LocalSearchMoveScope moveScope)
- Parameters:
moveScope
- not null
- Returns:
- true if accepted
calculateFadingTabuAcceptChance
protected double calculateFadingTabuAcceptChance(int fadingTabuStepCount)
- Parameters:
fadingTabuStepCount
- 0 < fadingTabuStepCount <= fadingTabuSize
- Returns:
- 0.0 < acceptChance < 1.0
findTabu
protected abstract Collection<? extends Object> findTabu(LocalSearchMoveScope moveScope)
findNewTabu
protected abstract Collection<? extends Object> findNewTabu(LocalSearchStepScope stepScope)
Copyright © 2006-2014 JBoss by Red Hat. All Rights Reserved.