9
$\begingroup$

I am trying to solve a MIP using SCIP. I let my solver run for some initial time-bound - let's say 10min. After 10min, I check if the problem is solved to optimality or 1% gap. If not, then I would like to start solving the problem again, but warm started with the solution I had at the end of my last run. I am new to SCIP, hence not aware if it's possible and how to do so (if yes).

$\endgroup$
6
$\begingroup$

The branch-and-bound tree management and LP solving including storage of warm start bases are possible using SCIP according to this link.

Page 14 of the cited paper(1), they explained how to pause the process of solving for SCIP, check or even change some parameters and then continue the solution of the problem. "...first reset all parameters to their default values using set default. ... Then, after node 200, the user pressed CTRL-C which interrupts the solving process, We see that now in the short status report, primal and dual bound are different, thus, the problem is not solved yet. Nevertheless, we could access statistics, see the current incumbent solution, change parameters and so on. Entering optimize, we continue the solving process from the point at which it had been interrupted."

(1) Berthold, Timo, et al. "Solving mixed integer linear and nonlinear problems using the SCIP optimization suite." (2012).

| improve this answer | |
$\endgroup$
  • 1
    $\begingroup$ Thanks for pointing that out. However, in my case, I have the solution written in a file/storage from which I need to read it first and then set it. So your suggestion might not be exactly applicable for this case. Docs has a better way to handle this. Also, I am using PySCIPOpt, hence I can use createSol() and setSol() on the model I create to accomplish the task. $\endgroup$ – Rahul Patel Aug 9 '19 at 3:54
5
$\begingroup$

If you use the SCIP shell, you can simply interrupt the solving process with Ctrl+C, then use the newstart command the clear the tree and start solving again with optimize. This will keep not only the solutions found so far, but might also migrate some cuts found.

Instead of watching the process and interrupting manually, you can also set both limits on the runtime and the gap, of course (set limits/time 600 and set limits/gap 0.01).

If you're using SCIP linked to another program, the same things should still work, but you will need to call the C API functions, then.

| improve this answer | |
$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.