[CP-SAT] deprecate SearchAllSolutions and SolveWithSolutionCallback
This commit is contained in:
@@ -71,7 +71,10 @@ public class SearchForAllSolutionsSampleSat {
|
||||
// [START solve]
|
||||
CpSolver solver = new CpSolver();
|
||||
VarArraySolutionPrinter cb = new VarArraySolutionPrinter(new IntVar[] {x, y, z});
|
||||
solver.searchAllSolutions(model, cb);
|
||||
// Tell the solver to enumerate all solutions.
|
||||
solver.getParameters().setEnumerateAllSolutions(true);
|
||||
// And solve.
|
||||
solver.solve(model, cb);
|
||||
// [END solve]
|
||||
|
||||
System.out.println(cb.getSolutionCount() + " solutions found.");
|
||||
|
||||
Reference in New Issue
Block a user