[Coin-discuss] need help on SOS2 in CPLEX

Matthew Saltzman mjs at clemson.edu
Fri Feb 13 16:08:22 EST 2009


On Fri, 2009-02-13 at 14:11 -0600, Chendong Li wrote:
>  Hello,
> 
> I want to understand weight of variables of SOS2 in the LP file in
> CPLEX. Could anyone explain "Adjacency is defined by the weights" from
> the following sentence? Any kind of advice or comment is greatly
> appreciated.
> 
> Special ordered sets of type 2 require that at most two variables in
> the set may be non-zero, and if there are two non-zeros, they must be
> adjacent. Adjacency is defined by the weights, which must be unique
> within a set given to the variables.

I believe that it means that the variables are ordered by weight.  You
must use unique weights so that the ordering is unique, and then
variables that are adjacent in the sorted list are adjacent in the SOS
constraint.

Thus, variables and weights (x1, 10), (x2, 4), (x3, 6), (x4, 5) would
generate the SOS constraint

	none
	or any one of x1, x2, x3, x4
	or x2 and x4
	or x4 and x3
	or x3 and x1
	may be set to 1.

> 
> Have a nice day!

I'm sure I'll be corrected if I'm wrong...

> 
> Best,
> Chendong
> _______________________________________________
> Coin-discuss mailing list
> Coin-discuss at list.coin-or.org
> http://list.coin-or.org/mailman/listinfo/coin-discuss
-- 
                Matthew Saltzman

Clemson University Math Sciences
mjs AT clemson DOT edu
http://www.math.clemson.edu/~mjs




More information about the Coin-discuss mailing list