public abstract class AbstractTabuAcceptor extends AbstractAcceptor
Acceptor
Modifier and Type | Field and Description |
---|---|
protected boolean |
aspirationEnabled |
protected boolean |
assertTabuHashCodeCorrectness |
protected TabuSizeStrategy |
fadingTabuSizeStrategy |
protected String |
logIndentation |
protected Deque<Object> |
tabuSequenceDeque |
protected TabuSizeStrategy |
tabuSizeStrategy |
protected Map<Object,Integer> |
tabuToStepIndexMap |
protected int |
workingFadingTabuSize |
protected int |
workingTabuSize |
logger
Constructor and Description |
---|
AbstractTabuAcceptor(String logIndentation) |
Modifier and Type | Method and Description |
---|---|
protected void |
adjustTabuList(int tabuStepIndex,
Collection<? extends Object> tabus) |
protected double |
calculateFadingTabuAcceptChance(int fadingTabuStepCount) |
protected abstract Collection<? extends Object> |
findNewTabu(LocalSearchStepScope stepScope) |
protected abstract Collection<? extends Object> |
findTabu(LocalSearchMoveScope moveScope) |
boolean |
isAccepted(LocalSearchMoveScope moveScope) |
void |
phaseEnded(LocalSearchPhaseScope phaseScope) |
void |
phaseStarted(LocalSearchPhaseScope phaseScope) |
void |
setAspirationEnabled(boolean aspirationEnabled) |
void |
setAssertTabuHashCodeCorrectness(boolean assertTabuHashCodeCorrectness) |
void |
setFadingTabuSizeStrategy(TabuSizeStrategy fadingTabuSizeStrategy) |
void |
setTabuSizeStrategy(TabuSizeStrategy tabuSizeStrategy) |
void |
stepEnded(LocalSearchStepScope stepScope) |
stepStarted
solvingEnded, solvingStarted
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
stepStarted
solvingEnded, solvingStarted
protected final String logIndentation
protected TabuSizeStrategy tabuSizeStrategy
protected TabuSizeStrategy fadingTabuSizeStrategy
protected boolean aspirationEnabled
protected boolean assertTabuHashCodeCorrectness
protected int workingTabuSize
protected int workingFadingTabuSize
public AbstractTabuAcceptor(String logIndentation)
public void setTabuSizeStrategy(TabuSizeStrategy tabuSizeStrategy)
public void setFadingTabuSizeStrategy(TabuSizeStrategy fadingTabuSizeStrategy)
public void setAspirationEnabled(boolean aspirationEnabled)
public void setAssertTabuHashCodeCorrectness(boolean assertTabuHashCodeCorrectness)
public void phaseStarted(LocalSearchPhaseScope phaseScope)
phaseStarted
in interface LocalSearchPhaseLifecycleListener
phaseStarted
in class LocalSearchPhaseLifecycleListenerAdapter
public void phaseEnded(LocalSearchPhaseScope phaseScope)
phaseEnded
in interface LocalSearchPhaseLifecycleListener
phaseEnded
in class LocalSearchPhaseLifecycleListenerAdapter
public void stepEnded(LocalSearchStepScope stepScope)
stepEnded
in interface LocalSearchPhaseLifecycleListener
stepEnded
in class LocalSearchPhaseLifecycleListenerAdapter
protected void adjustTabuList(int tabuStepIndex, Collection<? extends Object> tabus)
public boolean isAccepted(LocalSearchMoveScope moveScope)
moveScope
- not nullprotected double calculateFadingTabuAcceptChance(int fadingTabuStepCount)
fadingTabuStepCount
- 0 < fadingTabuStepCount <= fadingTabuSize
0.0 < acceptChance < 1.0
protected abstract Collection<? extends Object> findTabu(LocalSearchMoveScope moveScope)
protected abstract Collection<? extends Object> findNewTabu(LocalSearchStepScope stepScope)
Copyright © 2006–2020 JBoss by Red Hat. All rights reserved.