Previous Page: CPXNETgetbase First PageNext Page: CPXNETgetitcnt

CPXNETgetdj


Description

The function CPXNETgetdj() is used to access reduced costs for a range of arcs of the network stored in a CPLEX network problem object.

For this function to succeed, a solution must exist for the CPLEX network problem object. If the solution is infeasible, i.e. the solution status is CPX_INFEASIBLE, CPX_IT_LIM_INFEAS, CPX_TIME_LIM_INFEAS, or CPX_ABORT_INFEAS, the reduced costs are computed with respect to an objective function that penalizes infeasibilities.

Return Value

If the operation is successful, CPXNETgetdj() returns the value 0; if not, it returns a nonzero value to indicate an error.

Synopsis

int CPXNETgetdj (CPXENVptr env,
                 CPXNETptr net,
                 double *dj,
                 int begin,
                 int end);

Arguments


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

CPXNETptr net
A pointer to a CPLEX network problem object as returned by CPXNETcreateprob().

double *dj
Array in which to write requested reduced costs. If NULL is passed, no reduced cost values will be returned. Otherwise dj must point to an array of a size that is at least(end-begin+1).

int begin
Index of the first arc for which a reduced cost value is obtained.

int end
Index of the last arc for which a reduced cost value is obtained.

Example

status = CPXNETgetdj (env, net, dj, 10, 20);

Previous Page: CPXNETgetbase First PageNext Page: CPXNETgetitcnt