| Overview | Group | Tree | Graph | Index | Concepts |
The routine CPXgetsos is used to access a range of Special
Ordered Set (SOS) definitions stored in a CPLEX problem object. The
beginning and end of the range, along with the length of the array in which
the definitions are to be returned, must be provided.
sosspaceis 0 (zero),
then the negative of the value of
*surplus_p returned indicates the length needed for the arrays
sosind and soswt.
Example
status = CPXgetsos (env, lp, &numsosnz, sostype, sospri, sosbeg,
sosind, soswt, sosspace, 0, numsos-1);| env | A pointer to the CPLEX environment as returned by |
| lp | A pointer to a CPLEX problem object as returned by |
| numsosnz_p | A pointer to an integer to contain the number of set members returned; i.e., the true length of the arrays |
| sostype | An array to contain the types of the requested SOSs. The type of set |
| sospri | An array to contain the priorities of the SOSs. The priority of set |
| sosbeg | An array to contain indices indicating where each of the requested SOSs begins in the arrays |
| sosind | An array to contain the variable indices of the SOS members. May be NULL if |
| soswt | An array to contain the reference values (weights) for SOS members. May be NULL if |
| sosspace | An integer indicating the length of the arrays |
| surplus_p | A pointer to an integer to contain the difference between |
| begin | An integer indicating the beginning of the range of SOSs to be returned. |
| end | An integer indicating the end of the range of SOSs to be returned. |
CPXERR_NEGATIVE_SURPLUS indicates that insufficient space was available in the arrays sosind and soswt to hold the SOS definition.