[Scip] Interrupt & resume scip after every solution
Gerald Gamrath
gamrath at zib.de
Sun Oct 12 03:41:00 CEST 2014
Hi,
when you set a solution limit, SCIP will not directly stop after finding
the solution, but in order to be in a state from which it can be
restarted, it will continue processing the current node and perform
branching. However, all expensive routines are skipped, so cutting plane
separation, other heuristics, or strong branching are not done anymore
at this node. In particular if this happens at the root node, it can
lead to a significant change since there are some heuristics which are
only called at the root node and also cutting plane separation is only
performed there by default.
If you want to change this, you can use the event handler system of SCIP
and write an event handler that reacts on new solutions. There is an
example for that in examples/Eventhdlr, please have a look there. This
event handler can save the solution, if you want to stop because the
solution is good enough, it can call SCIPinterruptSolve() or change the
solution limit accordingly.
Alternatively, you can also get all found solutions after the solving
process via SCIPgetSols() and their number via SCIPgetNSols(). Note that
there is a limit on the number of solutions stored (100 per default),
which you can adjust by the parameter "limits/maxsol".
Best,
Gerald
Am 11.10.2014 um 12:39 schrieb sct:
> Hi,
>
> I interrupt & resume scip programatically after every solution (via
> setting solutions/limits), to take a peep & save the solution found.
> Previously I asked about this behaviour & was told that the number of
> nodes to solve to optimality would be different from without interrupt.
>
> It seems that this approach takes long to solve (as compare to without
> interrupt). Like to ask whether they can be made exactly the same.
>
> Thanks a lot.
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip
More information about the Scip
mailing list