[Cbc] Using SOS with CbcModel/CbcSolver

Kish Shen kisshen at cisco.com
Wed Jun 24 08:29:52 EDT 2009


Hi,

I am looking at the issue of adding SOS to a problem to be solved by 
CBC. I last looked at this about 3 years ago, and wrote some code to add 
a CbcSOS object via addObjects() to a CbcModel. However, this code is 
commented out, with the comment that SOS cannot be added to a 
preprocessed problem.

As I said, this was done 3 years ago, when I first wrote the code for 
our interface to CBC. My code have changed significantly since then, in 
particular it now uses CbcSolver rather than CbcModel directly. I assume 
there may be changes in CBC since that time too, so I am wondering if I 
can now add SOS to the problem.

Currently, the problem is stored in a OsiClpSolverInterface, which is 
cast to a CbcModel:

CbcModel* model = new 
CbcModel(static_cast<OsiSolverInterface&>(*clpmodel);

and the problem is then solved using CbcMain0 and CbcMain1:

CbcMain0(*model);
...
CbcMain1(5, cbc_args,*model.callBack);

Can I add SOS during this process, and if there are still any conditions 
to when I can add the SOS?

Thanks in advance for any information!

Cheers,

Kish

-- 
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