makesos1, makesos2

Creates a special ordered set (SOS) using a set of decision variables and a linear constraint.
procedure makesos1(cs:linctr, s:set of mpvar, c:linctr)
procedure makesos1(s:set of mpvar, c:linctr)
procedure makesos2(cs:linctr, s:set of mpvar, c:linctr)
procedure makesos2(s:set of mpvar, c:linctr)
A linear constraint
A set of decision variables
A linear constraint
The following generates the SOS1 set mysos based on the linear constraint rr. The resulting set contains the variables x, y, and z with the weights 0,2, and 4.
 x,y,z: mpvar
 rr,mysos: linctr

rr:= 2*y+4*z
makesos1(mysos, {x,y,z}, rr)
Further information
These procedures generate a SOS set containing the decision variables of the set s with the coefficients of the linear constraint c. The resulting set it assigned to cs if it is provided. Note that these procedures simplify the generation of SOS with weights of value 0.

If you have any comments or suggestions about these pages, please send mail to

© Copyright 2001-2013 Fair Isaac Corporation. All rights reserved.