Tobias Achterberg
unread,Apr 22, 2017, 11:34:11 AM4/22/17Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Sign in to report message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to gur...@googlegroups.com
Are you sure that Gurobi claims to see SOS constraints even though you did not
explicitly add them via addSOS()? This should not happen.
Note that SOS1 constraints are more general than just sum xi <= 1. These two
constraints are only equivalent if all involved variables are binary (or general
integer with lower bounds of zero). But SOS1 can also deal with continuous
variables.
The meaning of SOS1(x1,...,xn) is that at most one of the involved variables can
be non-zero. If al variables are binary, then Gurobi will automatically convert
this into sum xi <= 1. If continuous variables are present, then we can
sometimes convert them into a sum zi <= 1 constraint with auxiliary binary
variables zi that are linked to the continuous xi variables via big-M
constraints. But if the big-M that is required for this translation is too
largen, then the SOS constraint will be kept as is. Such a constraint will not
participate in the LP relaxation, it will only be used for branching. More
precisely, if in an LP solution multiple xi variables take a non-zero value,
then one can branch on
(x1 = ... = xk = 0) or (xk+1 = ... = xn = 0)
with at least one of the non-zero variables being in each of the two sets.
Then, there is another type of SOS constraint, which is SOS2. A constraint
SOS2(x1,...,xn) means that at most two variables can be non-zero, and if there
are two non-zero variables they have to be adjacent in the list. For example, x2
and x4 being non-zero would be invalid, because they are not adjacent. This is
often used to model piece-wise linear functions.
Best regards,
Tobias