change shift scheduling example to use 8 workers
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user