CPXXgetqconstrdslack and CPXgetqconstrdslack
The routine CPXXgetqconstrdslack/CPXgetqconstrdslack accesses the dual slack
values for a quadratic constraint.
int CPXXgetqconstrdslack( CPXCENVptr env, CPXCLPptr lp, CPXDIM qind, CPXDIM * nz_p, CPXDIM * ind, double * val, CPXDIM space, CPXDIM * surplus_p )
int CPXgetqconstrdslack( CPXCENVptr env, CPXCLPptr lp, int qind, int * nz_p, int * ind, double * val, int space, int * surplus_p )
Description
The routine CPXXgetqconstrdslack/CPXgetqconstrdslack accesses the dual slack
values for a quadratic constraint. It retrieves the dual slack for the
specified constraint in the current (optimal) solution.
The dual slack is returned as a sparse vector of nonzero coefficients
in the dual slack vector.
Arguments
- env
-
A pointer to the CPLEX environment as returned by
CPXXopenCPLEX/CPXopenCPLEX. - lp
-
A pointer to a CPLEX problem object as returned by
CPXXcreateprob/CPXcreateprob. - qind
- Index of the quadratic constraint for which the dual slack is to be queried.
- nz_p
-
Where to store the number of nonzero elements returned in
indandval. If the function returns either 0 (zero) orCPXERR_NEGATIVE_SURPLUS, then this value contains the number of elements that were stored inindorval. Otherwise, the value is either unchanged or set to 0 (zero). - ind
-
Where to store the indices of nonzero coefficients returned by this function. May be
NULLifspaceis nonpositive. - val
-
Where to store the values of nonzero coefficients returned by this function. May be
NULLifspaceis nonpositive. - space
-
The number of elements available in
indandval, respectively. - surplus_p
-
A pointer to an integer to contain the difference between
spaceand the number of entries in each of the arraysindandval. A nonnegative value ofsurplus_pspecifies that the length of the arrays was sufficient. A negative value specifies that the length was insufficient and that the routine could not complete its task. In this case,CPXXgetqconstrdslack/CPXgetqconstrdslackreturns the valueCPXERR_NEGATIVE_SURPLUS, and the negative value ofsurplus_pspecifies the amount of insufficient space in the arrays.