Previous Page: CPXgetdblquality First PageNext Page: CPXgeterrorstring

CPXgetdj


Description

The routine CPXgetdj() is used to access the reduced costs for a range of the variables 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 CPXgetdj (CPXENVptr env,
              CPXLPptr lp,
              double *dj,
              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 *dj
An array to receive the values of the reduced costs for each of the variables. This array must be of length at least (end - begin + 1). If successful, dj[0] throughdj[end-begin] will contain the values of the reduced costs.

int begin
An integer indicating the beginning of the range of reduced-cost values to be returned.

int end
An integer indicating the end of the range of reduced-costs values to be returned.

Example

status = CPXgetdj (env, lp, dj, 0, CPXgetnumcols(env,lp)-1);
Previous Page: CPXgetdblquality First PageNext Page: CPXgeterrorstring