[Scip] Setting verbosity to show iterations in messageInfoLog

Tobias Achterberg achterberg at zib.de
Wed Jul 22 10:14:12 MEST 2009


Hi Fergal,

do you want to display the regular SCIP log in some text window? Then, the best way is to
install a message handler and set the display frequency ("display/freq") to an appropriate
value. Additionally, you can control which status columns are shown via parameter
settings. Either, you can just define the width of the text window by setting the
"display/width" parameter. Having this value, SCIP would automatically select output
columns by some priority order and make sure that the total width does not exceed the
parameter value. Alternatively, you can explicitly activate or deactivate individual
output columns by the "display/<column>/active" parameters. For example, setting
"display/lpiterations/active" to 2 forces the LP iterations output to be part of the log,
independent from the "display/width" parameter.

If you want to display status information in some GUI, then you basically have two options:
(1) Use a message handler as above, but instead of printing the output lines directly into
a text window, parse them (for example via sscanf()) and use the results as needed.
(2) Use a plugin that gets called at every node and query the data by means of scip.h methods.

For (2) I suggest to use an event handler and catch the SCIP_EVENTTYPE_NODESOLVED event.
Then, the EVENTEXEC method of the event handler is called once per node. You can find an
example of such an event handler in the TSP example, located in examples/TSP. In this
example, the event handler catches the SCIP_EVENTTYPE_BESTSOLFOUND event, see
examples/TSP/src/EventhdlrNewSol.cpp. Whenever a new incumbent is found, the event handler
is called and it stores the new solution in some file. A Java program that is running in
parallel to the solve monitors the file, reads the contents, and updates the graphical
display of the tour in its window.

Note that an event handler can catch multiple events. So, it is possible, for example, to
catch both the NODESOLVED and the BESTSOLFOUND event. Actually, the NODESOLVED event is
already a compound of several events, namely NODEFEASIBLE, NODEINFEASIBLE, and
NODEBRANCHED. See src/scip/type_event.h for a list of events and predefined compound events.


Hope this helps,

Tobias


fergal mohan wrote:
> Hi all, I'm hoping to provide visual feedback to the client of the .NET wrapper to show Logging information. I've hooked into the callback methods and will filter them as necessary but I was wondering if there was some way that I could to set the verbosity level to get the iterations information automatically (without getting snowed under with Debug info). Alternatively if there was some method that was called periodically where I could call SCIPgetNLPIterations and then directly call the messageInfoLog callback. Is this already supported or am I at the point where a Plug-in might be needed. Any tips or advice would be appreciated, cheers,
> Fergal
> _______________________________________________
> Scip mailing list
> Scip at zib.de
> http://listserv.zib.de/mailman/listinfo/scip


More information about the Scip mailing list