Previous Page: CPXgetnumsosFirst PageNext Page: CPXgetobjname

CPXgetobj


Description

The routine CPXgetobj() is used to access a range of objective function coefficients of a CPLEX LP problem object. 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 CPXgetobj (CPXENVptr env,
               CPXLPptr lp,
               double *obj,
               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 *obj
An array where the specified objective coefficients are to be returned. This array must be of length at least (end - begin + 1). The objective function coefficient of variable j will be returned in obj[j - begin].

int begin
An integer indicating the beginning of the range of objective function coefficients to be returned.

int end
An integer indicating the end of the range of objective function coefficients to be returned.

Example

status = CPXgetobj (env, lp, obj, 0, cur_numcols-1);

Previous Page: CPXgetnumsosFirst PageNext Page: CPXgetobjname