Using SOS type_1 constraint
Posted: Fri Apr 26, 2019 9:23 pm
Dear support team,
I was trying to solve a scheduling model using GAMS/Gurobi. The snippet code is:
Using the binary variables, the model has solved optimally.
I have used SOS type_1 variables instead of binary variables and run the model.
The model has solved optimally and the results are the same as previous.
AKAIK, the SOS type_1 constraint says that at most one of the variables must be non-zero. the equation is:
I'm working on the coding my model in the GUROBI software using Java API. While I have defined the SOS type_1 constraint in the model and run it, I get the zero solution for all assignment variables. I negotiated to GUROBI support team and they mentioned that:
Regards
Omidi. A
I was trying to solve a scheduling model using GAMS/Gurobi. The snippet code is:
Code: Select all
Binary variable x(i,k);
Equations c1,c2;
c1(k).. sum(i, x(i,k)) =e= 1;
c2(i).. sum(k, x(i,k)) =e= 1;
I have used SOS type_1 variables instead of binary variables and run the model.
Code: Select all
SOS1 variable x(i,k);
Equations c1,c2;
c1(k).. sum(i, x(i,k)) =e= 1;
c2(i).. sum(k, x(i,k)) =e= 1;
AKAIK, the SOS type_1 constraint says that at most one of the variables must be non-zero. the equation is:
Code: Select all
x1 + x2 + ... + xn <= 1 for n=1...N
Would you say that do I have a mistake to implement GAMS code, please?the all-zero solution is feasible.
Regards
Omidi. A