[Scip] Integrating Lpi updates via a callback mechanism

Tobias Achterberg achterberg at zib.de
Thu Aug 20 11:29:43 MEST 2009


Hi Fergal,

no, this is not supported by the LPI. What you want to have is to be able to install
callbacks in the LP solver. In CPLEX, for example, you would use an informational callback
that provides the information that you want to display.

You could add such stuff to the LPI, but please note that this can be pretty complicated
as each solver, of course, has its own way of supporting callbacks and some (like Soplex,
and I think CLP as well) do not even offer them.


Overall, I do not see an easy solution to this. Maybe you can redirect stderr and stdout
output to your own streams which parse the output? But this seems kind of weird...


Tobias


fergal mohan wrote:
> Hi all, the combined LP and MIP .NET wrapper for SCIP is progressing well. I have
> abstracted the functionality to a common SCIPdotNET::SCIPsolver which behind the scenes
> manages both LP (via Lpi) and MIP problems. If the user doesn't create a specific
> problem then SCIPsolver creates and manages both (LP and MIP) and calls the appropriate
> one depending on whether there are any variables fixed as integers. The user can have
> more explicit control by creating/retrieving the LP or MIP problem and calling their
> methods directly (so long as they are legit). Anyway I'm now trying to figure out if
> there is an elegant way that I can provide the various info, warning and error messages
> that SCIP supports when the Lpi interface is being called. For SCIP I'm subclassing
> scip::ObjEventhdlr to hook into the scip_exec() event handler to callback with Custom
> Messages but am relying on the standard  SCIP_DECL_MESSAGEINFO,
> SCIP_DECL_MESSAGEWARNING and SCIP_DECL_MESSAGEERROR. I'd like to funnel updates from
> the Lpi progress (NumIterations etc.) through the same mechanism so wanted to check if
> there was any wisdom out there on a low-impact way to do this. My brute-force approach
> would be to subclass SPxSolver and override the terminate() method to allow a UI
> feedback call to be inserted on a regular basis. I did this in an initial build using
> Soplex only but realize it's heavy-handed and it will need "maintenance" after every
> version release. Are there any other suggestions among those in the know? Fergal 
> _______________________________________________ Scip mailing list Scip at zib.de 
> http://listserv.zib.de/mailman/listinfo/scip


More information about the Scip mailing list