How to modify the solver time limit in a CpSolverSolutionCallback? #4021
Unanswered
haoming-codes
asked this question in
CP-SAT questions
Replies: 1 comment
-
You cannot directly. Have a thread reference the solver with a timer that will call StopSearch(). |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
In python CP-SAT, I'd like to modify the solver time limit in a
CpSolverSolutionCallback.on_solution_callback()
, to eventually achieve an early stopping strategy along the lines of "stopping the search whencurrent_time - last_solution_time > last_solution_time - start_time
". Is this possible to do? Thanks in advance.Beta Was this translation helpful? Give feedback.
All reactions