[Coin-discuss] problem of solving a model with SOS2 in CBC
Hongxia Zhao
zhongxia at eng.buffalo.edu
Fri Sep 8 14:55:49 EDT 2006
Hello,
I am trying to solve the following simple problem with SOS2 constraint
using CBC,
------------------------------
min -10x1 + 5x2 -10x3
s.t. x1 + x2 + x3 = 2
x1 <= 1
x3 <= 1
x1, x2, x3 >= 0
{ x1, x2, x3 } is SOS2
---------------------------------
I don't want to use binary variables to model the problem. So the MPS file
(sos.mps) of this problem is
*=============================================================
NAME
ROWS
N obj
E c1
L c2
L c3
COLUMNS
x1 obj -10 c1 1
x1 c2 1
x2 obj 5 c1 1
x3 obj -10 c1 1
x3 c3 1
RHS
rhs c1 2 c2 1
rhs c3 1
SOS
S2
x1
x2
x3
ENDATA
*============================================================
I tried to solve this problem on windows by using CbcExamplesSample2.exe
> CbcExamplesSample2.exe sos.mps
The solution I got has objective value -20 which is not correct. If the
SOS2 constraint was considered correctly, the solution should be
x1 = x2 = 1, obj = -5.
My question is:
Can Cbc solve this kind of problem with SOS2 constraint and without using
binary variable correctly? If so, how?
Thanks,
Christy
More information about the Coin-discuss
mailing list