[Scip] SCIP solution handling

Stefan Vigerske stefan at math.hu-berlin.de
Thu Jul 29 17:17:20 MEST 2010


H,

Matthias Peinhardt wrote:
> Hi all,
> 
> I have a problem with SCIP's solution handling. I catch the 
> SCIP_EVENTTYPE_BESTSOLFOUND with an event handler, and try to build another 
> possibly better solution from it by doing
> 
> SCIPcreateOrigSol (...);
> SCIPtrySolFree (...);
> 
> However, in debug mode this fails with an assert():
> src/scip/event.c:1205: eventfilterDelayUpdates: Assertion 
> `!eventfilter->delayupdates' failed.
> 
> The backtrace is something like:
> SCIPtrySolFree(...)           src/scip/scip.c:12902
> SCIPprimalAddSolFree (...)    src/scip/primal.c:663
> primalAddSol(...)             src/scip/primal.c:493
> SCIPeventProcess(...)         src/scip/event.c:829
> SCIPeventFilterPorcess(...)   src/scip/event.c:1276
> eventfilterDelayUpdates(...)  src/scip/event.c:1205
> 
> It seems SCIP does not like to postpone the event handling for the new 
> solution, as it technically still deals with its first solution. It is maybe 
> noteworthy that in the optimized mode everything works like expected, so the 
> triggered assert() does not seem to protect some essential state of SCIP.
> 
> Now I see two options:
> - To tell SCIP that it can delay those updates for this event. How to do that?
> - To write some heuristic that is called later when the best-solution-event is
>    completely processed. This heuristic would then send the new solution.

This heuristics exists already in SCIP and is called trysol heuristic.
So instead of SCIPtrySolFree you could pass your solution to this heuristic.

Stefan


> 
> Or is this assert() that is triggered a bug?
> 
> Thanks for your help,
> Matthias
> 


-- 
Stefan Vigerske
Humboldt University Berlin, Numerical Mathematics
http://www.math.hu-berlin.de/~stefan


More information about the Scip mailing list