[Cbc] Message printing with CbcSolver
Kish Shen
kisshen at cisco.com
Fri Mar 11 12:55:39 EST 2011
Hi,
Currently, during the solving of a MIP problem in my code, where CBC is
called using the CbcMain0/CbcMain1 interface (which invokes CbcSolver, I
believe), I get no printing of the messages from Cbc.
This is the behaviour I want normally, but recently some of our users
have asked if they can see solver messages to get some idea of what the
solver is doing. I have been unable to see any of Cbc's messages.
As far as I can tell, Cbc is not calling my messageHandler -- I don't
know if this is because I have not passed the handler to the right place.
Here is an outline of the code I use, and if anyone can see what I need
to do to get the Cbc messages, I would be very grateful:
CbcModel* model = new(...);
CbcMain0(*model);
DerivedHandler* mipMessageHandler = new DerivedHandler;
model->passInMessageHandler(mipMessageHandler);
model->solver()->setHintParam(OsiDoReducePrint, true, OsiHintTry);
const char* cbc_args[5];
cbc_args[0] = "eplexcbcclpsolver";
cbc_args[1] ="-preprocess"
cbc_args[2] = "on";
cbc_args[3] = "-solve";
cbc_args[4] = "-quit";
CbcMain1(5, cbc_args,*model,callBack);
[I hope there are no typos in the above; I was not able to cut and paste
from my VNC window with the code listing to my Windows mailer]
DerivcedHandler is a derived class of CoinMessageHandler that sends the
message to different streams depending on the externalNumber() of the
message, and does seem to work (I can see Clp messages when solving a
linear problem).
An aside: I remember John (Forrest) suggesting the use of
CbcMain0/CbcMain1 to use the CbcSolver. I just tried to look up the
documentation for them in Cbc's Doxygen documentation, but was not able
to find them at all. Does anyone know where I can find the doucmentation?
Thanks in advance for any help!
--Kish Shen
--
This e-mail may contain confidential and privileged material for the
sole use of the intended recipient. Any review, use, distribution or
disclosure by others is strictly prohibited. If you are not the intended
recipient (or authorized to receive for the recipient), please contact
the sender by reply e-mail and delete all copies of this message.
Cisco Systems Limited (Company Number: 02558939), is registered in
England and Wales with its registered office at 1 Callaghan Square,
Cardiff, South Glamorgan CF10 5BT.
More information about the Cbc
mailing list