I am working on a model that probably has 500,000 to 1,000,000 boolean variables. My python script generates the model, it seems to execute the line
status = solver.SolveWithSolutionCallback(model, solution_printer)
but it doesn't solve anything, just goes to the next line.
When I limit the size of the model, it does solve (or at least attempt find an optimal solution).
Anyone have any suggestion? I can post the full code.
print('Ready to Solve')
solver = cp_model.CpSolver()
print('Created Solver')
solver.parameters.max_time_in_seconds = 10000
solver.parameters.num_search_workers = 6
# status = solver.Solve(model)
solution_printer = cp_model.ObjectiveSolutionPrinter()
status = solver.SolveWithSolutionCallback(model, solution_printer)
print('Finished Solving')
if status == cp_model.OPTIMAL:
print('found optimal')
print('Total edges = %i' % solver.ObjectiveValue())