I want to get feasible answer as early as possible in CP-SAT model and I have set these codes.
solver.parameters.log_search_progress = True
status = solver.Solve(model)
if status == cp_model.FEASIBLE or status == cp_model.OPTIMAL:
......
But when running codes it can't stop after getting feasible solution and got stuck.
I have to add command like:
solver.parameters.max_time_in_seconds = 10.0
so that it can stop searching after 10s. But I want to stop searching as long as it finds at least one feasible answer. Where is the problem?