[Cbc] SOS constraints
Miles Lubin
miles.lubin at gmail.com
Thu May 8 13:50:15 EDT 2014
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
More information about the Cbc
mailing list