throw new UnsupportedOperationException();
}
@Override
public void apply() throws ContradictionException {
ISearchLoop mSearchLoop = dynamicBacktracking.getSolver().getSearchLoop();
IEnvironment environment = dynamicBacktracking.getSolver().getEnvironment();
Decision dec;
// retrieve the decision applied BEFORE the decision to refute, which is the last one in the decision_path
Decision dec2ref = decision_path.getLast();
Decision previous = dec2ref.getPrevious();
int swi = dec2ref.getWorldIndex();
//assert swi ==environment.getWorldIndex();
// simulate open_node and rebuild decisions history
dec = decision_path.pollFirst();
dec.setPrevious(previous);
dec.setWorldIndex(swi++);
mSearchLoop.setLastDecision(dec);
dec.buildNext();
// then simulate down_branch
dec.apply();
mSearchLoop.getSMList().afterDownLeftBranch();
previous = dec;
// iterate over decisions
while (!decision_path.isEmpty()) {
// simulate open_node and rebuild decisions history
dec = decision_path.pollFirst();
dec.setPrevious(previous);
dec.setWorldIndex(swi++);
mSearchLoop.setLastDecision(dec);
dec.buildNext();
// then simulate down_branch
mSearchLoop.getSMList().beforeDownLeftBranch();
environment.worldPush();
dec.apply();
mSearchLoop.getSMList().afterDownLeftBranch();
previous = dec;
}
}