Commit feffd5d5 authored by Daniel Le Berre's avatar Daniel Le Berre
Browse files

Move IConflict.setListener() to make sure it is called in all CP

solvers.
parent 454cc5f6
......@@ -169,6 +169,7 @@ public class PBSolverCP extends PBSolver {
int litImplied = this.trail.last();
int currentLevel = this.voc.getLevel(litImplied);
IConflict confl = chooseConflict((PBConstr) myconfl, currentLevel);
confl.setListener(listener());
confl.setDecisionLevel(currentLevel);
assert confl.slackConflict().signum() < 0;
while (!confl.isUnsat() && !confl.isAssertive(currentLevel)) {
......@@ -237,7 +238,6 @@ public class PBSolverCP extends PBSolver {
IConflict conflict = conflictFactory.createConflict(myconfl, level,
noRemove, skipAllow, preprocess, postprocess, weakeningStrategy,
autoDivisionStrategy, pbStats);
conflict.setListener(listener());
return conflict;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment