Previous Page: CPXgetphase1cntFirst PageNext Page: CPXgetprobname

CPXgetpi


Description

The routine CPXgetpi() is used to access the dual values for a range of the constraints of a linear or quadratic program. The beginning and end of the range must be specified.

Return Value

The routine returns a zero on success, and a nonzero if an error occurs.

Synopsis

int CPXgetpi (CPXENVptr env,
              CPXLPptr lp,
              double *pi,
              int begin,
              int end);

Arguments


CPXENVptr env
The pointer to the CPLEX environment as returned by one of the CPXopenCPLEX routines.

CPXLPptr lp
A pointer to a CPLEX LP problem object as returned by CPXcreateprob().

double *pi
An array to receive the values of the dual variables for each of the constraints. This array must be of length at least (end - begin + 1). If successful, pi[0] throughpi[end-begin] will contain the dual values.

int begin
An integer indicating the beginning of the range of dual values to be returned.

int end
An integer indicating the end of the range of dual values to be returned.

Example

status = CPXgetpi (env, lp, pi, 0, CPXgetnumrows(env,lp)-1); 
Previous Page: CPXgetphase1cntFirst PageNext Page: CPXgetprobname