Assigning SOS Weights

Members of an SOS should be given unique weights that in turn define the order of the variables in the set. (These unique weights are also called reference row values.) The most flexible way for you to assign weights is through an SOS, MPS, or LP file. An alternative is to use MPS format to assign a single reference row containing weights. Such a reference row may be a free row with specific weighting information, or it may be the objective function, or it may be a constraint row. In the Callable Library, the routine CPXcopysos() lets you specify weights directly in an application.

In our SOS example, we used the coefficients of the warehouse capacity constraint to assign weights.


Previous Page: Setting Branching Priority for an SOS  Return to Top Next Page: Using Semi-Continuous Variables