[Coin-discuss] CbcModel::initialSolve() loses message handler...

John J Forrest jjforre at us.ibm.com
Sat Jun 3 04:19:00 EDT 2006


Philip,

I know that because COIN is a loose collection of libraries message 
handling is a pain.  I started doing something but ...

You are probably using setupForRepeatedUse to try and speed up 
OsiClpSolverInterface and also setHint(OsiDoreducePrint,).

The reduce print will switch off most messages.  The setupForRepeatedUse 
has a "printOut" parameter.  -1 says really really switch off messages 
(i.e. do not even build message), 0 says do so if OsiDoreducePrint true 
and 1 says build messages.

So just try not setting hint.  If that gives too much printout then you 
can switch off individual messages.

John Forrest



hpwalton at comcast.net 
Sent by: coin-discuss-bounces at list.coin-or.org
06/03/2006 12:08 AM
Please respond to
Discussions about open source software for Operations Research 
<coin-discuss at list.coin-or.org>


To
coin-discuss at list.coin-or.org
cc

Subject
[Coin-discuss] CbcModel::initialSolve() loses message handler...






I've been trying to carefully control output by introducing my own message 
handler.  It's been a bit tricky with CBC, but for the most part I could 
work around it.
 
I'm using Cbc and Clp together.  In order to capture the Clp output, I 
have to do something like this:
OsiClpSolverInterface *lpSolver = new OsiClpSolverInterface();
lpSolver->passInMessageHandler(logger); 
OsiCbcSolverInterface *ipSolver = new OsiCbcSolverInterface(lpSolver);
ipSolver->getModelPtr()->passInMessageHandler(logger); 
ipSolver->passInMessageHandler(logger); 
This by itself is a bummer because I suspect that in other 
OsiSolverInterace conditions I can just hook up to the ipSolver....
Now, I've added some additional processing for "prefer round up".  In the 
sample code there is a call to initialSolve() amongst other things.
The trouble I'm having is that once I call CbcModel::initialSolve(), all 
messages disappear.  It appears to me as if something internal gets 
replaced or reset along the way and suddenly all output stops.
Any suggestions?
Philip
 _______________________________________________
Coin-discuss mailing list
Coin-discuss at list.coin-or.org
http://list.coin-or.org/mailman/listinfo/coin-discuss

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20060603/5d2c3ddc/attachment.html>


More information about the Coin-discuss mailing list