CPXaddsos() is used to add Special Ordered Set (SOS) information to a problem object of type
CPXPROB_MIQP. The problem may already contain SOS information.
The routine returns a zero on success, and a nonzero if an error occurs.
The pointer to the CPLEX environment as returned by
A pointer to a CPLEX problem object as returned by
The number of sets to be added to existing SOS sets, if any.
The total number of members in all of the sets to be added to existing SOS sets, if any.
An array containing SOS type information for the sets to be added.
sostype[i] specifies the SOS type of set
The length of this array must be at least
An array containing priority values for each set to be added.
sospri[i] specifies the priority for set
i, and may take any nonnegative value. This array may be
NULL; otherwise, its length must be at least
Arrays describing the indices and weights for the sets to be added. The indices and weights of each set must be stored in sequential locations in
soswt, respectively, with
sosbeg[j] containing the index of the beginning of set
j. The weights must be unique within each set.
j < numsos-1 the indices of set
j must be stored in
..., sosind[sosbeg[j+1]-1] and the weights in
..., soswt[sosbeg[j+1]-1]. For the last set,
j = numsos-1, the indices must be stored in
..., sosind[numsosnz-1]and the corresponding weights in
..., soswt[numsosnz-1]. Hence, the length of
sosbeg must be at least
numsos, while the lengths of
soswt must must be at least