CPXXgetqconstrslack and CPXgetqconstrslack
The routine CPXXgetqconstrslack/CPXgetqconstrslack is used to access
the slack values
for a range of the quadratic constraints of a
quadratically constrained program.
int CPXXgetqconstrslack( CPXCENVptr env, CPXCLPptr lp, double * qcslack, CPXDIM begin, CPXDIM end )
int CPXgetqconstrslack( CPXCENVptr env, CPXCLPptr lp, double * qcslack, int begin, int end )
Description
The routine CPXXgetqconstrslack/CPXgetqconstrslack is used to access
the slack values
for a range of the quadratic constraints of a
quadratically constrained program. The
beginning and end of the range must be specified.
The slack values returned consist of the righthand side minus the constraint
activity level.
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. - qcslack
-
An array to receive the values of the slack or surplus variables for each of the constraints. This array must be of length at least (
end-begin+1). If successful,qcslack[0]throughqcslack[end-begin]contain the values of the slacks. - begin
- An integer specifying the beginning of the range of slack values to be returned.
- end
- An integer specifying the end of the range of slack values to be returned.
Return
The routine returns 0 (zero) on success and nonzero if an error occurs.Example
status = CPXgetqconstrslack (env, lp, qcslack, 0, CPXgetnumqconstrs(env,lp)-1);