NO FRAMES

CPXgetdj

int CPXPUBLIC CPXgetdj(CPXCENVptr env, CPXCLPptr lp, double * dj, int begin, int end)
Definition file: cplex.h
Include files: cplex.h

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.

Example

 status = CPXgetdj (env, lp, dj, 0, CPXgetnumcols(env,lp)-1);

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

lp

A pointer to a CPLEX problem object as returned by CPXcreateprob.

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] through dj[end-begin] contain the values of the reduced costs.

begin

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

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);

Returns:

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