Closed cprudhom closed 6 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.
fails.