acceptor.stepStarted(stepScope);
forager.stepStarted(stepScope);
}
public void decideNextStep(LocalSearchStepScope stepScope) {
InnerScoreDirector scoreDirector = stepScope.getScoreDirector();
scoreDirector.setAllChangesWillBeUndoneBeforeStepEnds(true);
int moveIndex = 0;
for (Move move : moveSelector) {
LocalSearchMoveScope moveScope = new LocalSearchMoveScope(stepScope);
moveScope.setMoveIndex(moveIndex);
moveIndex++;
moveScope.setMove(move);
// TODO use Selector filtering to filter out not doable moves
if (!move.isMoveDoable(scoreDirector)) {
logger.trace(" Move index ({}) not doable, ignoring move ({}).", moveScope.getMoveIndex(), move);
} else {
doMove(moveScope);
if (forager.isQuitEarly()) {
break;
}
}
if (termination.isPhaseTerminated(stepScope.getPhaseScope())) {
break;
}
}
scoreDirector.setAllChangesWillBeUndoneBeforeStepEnds(false);
LocalSearchMoveScope pickedMoveScope = forager.pickMove(stepScope);
if (pickedMoveScope != null) {
Move step = pickedMoveScope.getMove();
stepScope.setStep(step);
if (logger.isDebugEnabled()) {