Overview | Group | Index | Concepts |
The routine CPXcopysos
is used to copy special ordered set
(SOS) information to a problem object of type CPXPROB_MILP
,
CPXPROB_MIQP
, or
CPXPROB_MIQCP
.
When you build or modify your model with this routine,
you can verify that the results are as you intended
by calling CPXcheckcopysos
during application development.
CPX_TYPE_SOS1 | '1' | Type 1 |
CPX_TYPE_SOS2 | '2' | Type 2 |
Example
status = CPXcopysos (env, lp, numsos, numsosnz, sostype, sosbeg, sosind, soswt, NULL);
env | A pointer to the CPLEX environment as returned by |
lp | A pointer to a CPLEX problem object as returned by |
numsos | The number of SOS sets. If |
numsosnz | The total number of members in all sets. |
sostype | An array containing SOS type information for the sets. |
sosbeg | An array indicating beginning indices as explained in |
sosind | An array indicating indices as explained in |
soswt | Arrays describing the indices and weights for the sets. For every set, the indices and weights must be stored in sequential locations in |
sosname | An array containing pointers to character strings that represent the names of the SOSs. May be NULL. |