CP-SAT solver takes way too long to shut down or does not stop at all despite given time limit

66 views
Skip to first unread message

S. K.

unread,
Jul 22, 2025, 7:03:27 AMJul 22
to or-tools-discuss
I want to use v9.14, but it still has a pretty severe issue for me (problem 2 from this post).
The time limit I give is not respected.

I am using a CP-SAT solver with the following parameters:
random_seed: 2
use_optimization_hints: true
max_time_in_seconds: 540
log_search_progress: true
cp_model_probing_level: 1 (or 0, it does not matter)
max_presolve_iterations: 1
merge_no_overlap_work_limit: 1e9 (or 1e8, it does not matter)
hint_conflict_limit: 75000
log_subsolver_statistics: false
fix_variables_to_their_hinted_value: false
num_workers: 128
probing_deterministic_time_limit: 0.3


Here is a model for testing purposes:
model: test model


With 2 models similar to the testing model, I encountered the problem that the solver does not stop AT ALL. It runs until I get a memory overload and the whole process is killed.
(Output of on example where the solver does not stop at all: output)


(Similar but slightly less complex models do not have this problem, or not as bad. They take maybe 10-30 seconds longer to stop if max_time_in_seconds = 300 s.)

In general I have the feeling that the v9.14 needs a lot more memory than v9.10, which I am currently using.


I encountered the same problem but far less severe with v9.10.
For example: I start the solver with a solution callback that ends the solver after the first found solution. The first solution is found after 15.43 seconds, but the solver has a user/wall time of 182.827 seconds.
The parameters in this case were: 
Starting CP-SAT solver v9.10.4067
Parameters:
random_seed: 2
random_branches_ratio: 0.04
use_optimization_hints: true
max_time_in_seconds: 900
log_search_progress: true
search_branching: AUTOMATIC_SEARCH
cp_model_presolve: false
cp_model_probing_level: 1
max_presolve_iterations: 1
merge_no_overlap_work_limit: 1000000000
hint_conflict_limit: 75000
log_subsolver_statistics: false
fix_variables_to_their_hinted_value: true
num_workers: 12
probing_deterministic_time_limit: 0.3

Has anyone else experienced this? Are there any workarounds or parameter changes that might help with proper time limit enforcement?


Reply all
Reply to author
Forward
0 new messages