[Cbc] SOS2 constraint

Alexis Guigue aguigue at softree.com
Thu Nov 22 18:39:50 EST 2012


Hi,

A few questions about SOS2 constraints.

I have a model that contains SOS2 constraints, and NO integer variables. 
Each variable
in my SOS constraints isbounded between 0 and 1.

-Can I implement it using OsiSOS objects and the function AddObjects 
from OsiClpSolverInterface?
Or, restated: do I need to use CbcSOS objects and the function 
addObjects from CbcModel?

- It is not clear to me why there is an extra parameter in the CbcSOS 
constructor, i.e., int identifier,
which is not present in the OsiSOS constructor.

- I would like to look at the lp model. When I use the function writeLp, 
I am not able to have the sos
constraints displayed in the text file. My code is very similar to the 
example sos.cpp. I would call
model.solver()->writeLp("model_here");
just before
model.branchAndBound();

Thanks in advance

Alexis

-

-- 
Software Engineer/Research Engineer
Softree Technical Systems Inc.
www.softree.com
Engineering an Easier Way

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://list.coin-or.org/pipermail/cbc/attachments/20121122/acbb6447/attachment.html>


More information about the Cbc mailing list