SOS Type I
AnsweredHi to all,
My question is that there are two variables, say z and s, such that 0 <= z <= 1 and s >= 0, and they define to form a special ordered set of type I (SOS Type I).
How does Gurobi handle this issue?
Ebru
-
Official comment
This post is more than three years old. Some information may not be up to date. For current information, please check the Gurobi Documentation or Knowledge Base. If you need more help, please create a new post in the community forum. Or why not try our AI Gurobot?. -
SOS1 constraints are handled via branching. If you have a solution that would be feasible without the SOS1 constraint but that violates this SOS1 constraint (i.e., both z and s are non-zero), then Gurobi creates two child nodes, setting z = 0 in one child and s = 0 in the other child.
If z is binary and s has a finite upper bound u, i.e., z \in {0,1} and 0 <= s <= u, then Gurobi may also translate this SOS1 constraint into a linear constraint using a big-M formulation, namely
s <= (1-z)u
which means
s + zu <= u.
0 -
Thank you
0
Post is closed for comments.
Comments
3 comments