[Coin-discuss] CbcModel::initialSolve() loses message handler...
hpwalton at comcast.net
hpwalton at comcast.net
Fri Jun 2 18:08:34 EDT 2006
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/coin-discuss/attachments/20060602/34b5bcfe/attachment.html>
More information about the Coin-discuss
mailing list