Save solver state #2427
-
What language and solver does this apply to? Describe the problem you are trying to solve. I am running CP-SAT on an optimization model. I stop it at some point and add some new constraints
I would like a solver to start from 'posiiton' in which I stopped it - to do not check solutions already seen in previous session(s) / execution(s). Is it possible to be done? Or maybe it is already implemented? |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 4 replies
-
The solve() itself is stateless. See https://github.com/google/or-tools/blob/stable/ortools/sat/docs/model.md#solution-hinting |
Beta Was this translation helpful? Give feedback.
-
No, it does not.
Still, it is the best you can do actually.
Laurent Perron | Operations Research | [email protected] | (33) 1 42 68 53
00
Le lun. 8 mars 2021 à 16:17, rybickibartek <[email protected]> a
écrit :
… This is exactly what I am doing. But does it prevents solver from checking
already visited partial solutions which leads to either infeasible
solutions or solutions with are worst then best already observed solution?
—
You are receiving this because you modified the open/close state.
Reply to this email directly, view it on GitHub
<#2427 (reply in thread)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ACUPL3PVESTPRFPSOOOLXETTCTS7JANCNFSM4YZSHYHA>
.
|
Beta Was this translation helpful? Give feedback.
The solve() itself is stateless.
You can store the last solution, and restart from it using hints in the model.
See https://github.com/google/or-tools/blob/stable/ortools/sat/docs/model.md#solution-hinting