change shift scheduling example to use 8 workers

This commit is contained in:
Laurent Perron
2019-04-24 10:53:27 +02:00
parent 3c0dd832c9
commit 685c63e7e6
2 changed files with 2 additions and 1 deletions

View File

@@ -284,6 +284,7 @@ public class ShiftSchedulingSat
// Solve model
var solver = new CpSolver();
solver.StringParameters = "num_search_workers:8";
var solutionPrinter = new ObjectiveSolutionPrinter();
var status = solver.SolveWithSolutionCallback(model, solutionPrinter);
@@ -545,4 +546,3 @@ public class ShiftSchedulingSat
return Range(0, stop);
}
}

View File

@@ -378,6 +378,7 @@ def solve_shift_scheduling(params, output_proto):
# Solve the model.
solver = cp_model.CpSolver()
solver.parameters.num_search_workers = 8
if params:
text_format.Merge(params, solver.parameters)
solution_printer = cp_model.ObjectiveSolutionPrinter()