chocoteam / choco-solver

An open-source Java library for Constraint Programming
http://choco-solver.org/
BSD 4-Clause "Original" or "Old" License
683 stars 137 forks source link

[BUG] reifiying increasing fails #1093

Closed cprudhom closed 2 months ago

cprudhom commented 2 months ago
Model m = new Model();
IntVar x = m.intVar("x", 1, 3);
IntVar y = m.intVar("y", 1, 3);
BoolVar b = m.increasing(new IntVar[]{x, y}, 1).reify();
m.arithm(b, "=", 0).post();
Solver s = m.getSolver();
s.onSolution(() -> {
    System.out.println(x.getValue() + ", " + y.getValue());
});
s.findAllSolutions();
Assert.assertEquals(s.getSolutionCount(), 6);

fails.