[Cbc] SOS constraints

John Forrest john.forrest at fastercoin.com
Fri May 9 02:54:34 EDT 2014


Miles,

Definition of SOS type 1 that is used is that at most one in set 
nonzero.  If more than one then you create two branches around a point 
in set and one branch sets all one side to zero and the other branch 
sets the other side to zero.

So in this case you do need the equality constraint.

John Forrest
On 08/05/14 18:50, Miles Lubin wrote:
> Hi all,
>
> I just tried to clean up and test SOS constraints in the new C
> interface. My test problem is:
>
> Minimize  5x[1] + 3x[2] + 2x[3] + 7x[4] + 4x[5]
>       s.t.       x[1] +  x[2] +  x[3] +  x[4] +  x[5] == 1
>                 All x binary
>
> I have not added the equality constraint explicitly to the model, but
> instead added an SOS 1 constraint. When I solve, the solution is zero,
> so the SOS 1 constraint doesn't seem to be enforced. Is adding the SOS
> object to the model sufficient to enforce the constraint, or is it
> purely for branching?
>
> Test code: https://projects.coin-or.org/Cbc/browser/trunk/Cbc/test/CInterfaceTest.c?rev=2033#L113
> Implementation of Cbc_addSOS in the C interface:
> https://projects.coin-or.org/Cbc/browser/trunk/Cbc/src/Cbc_C_Interface.cpp#L827
>
> Thanks,
> Miles
> _______________________________________________
> Cbc mailing list
> Cbc at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/cbc
>
>



More information about the Cbc mailing list