CPXXNETgetdj and CPXNETgetdj
The routine CPXXNETgetdj/CPXNETgetdj is used to access reduced costs
for a range of arcs of the network stored in a network problem object.
int CPXXNETgetdj( CPXCENVptr env, CPXCNETptr net, double * dj, CPXDIM begin, CPXDIM end )
int CPXNETgetdj( CPXCENVptr env, CPXCNETptr net, double * dj, int begin, int end )
Description
The routine CPXXNETgetdj/CPXNETgetdj is used to access reduced costs
for a range of arcs of the network stored in a network problem object.
For this function to succeed, a solution must exist for the problem
object. If the solution is not feasible (that is, the routine
CPXXNETsolninfo/CPXNETsolninfo
returns 0 (zero) in its argument pfeasind_p), the reduced
costs are computed with respect to an objective function that penalizes
infeasibilities.
Arguments
- env
-
A pointer to the CPLEX environment as returned by
CPXXopenCPLEX/CPXopenCPLEX. - net
-
A pointer to a CPLEX network problem object as returned by
CPXXNETcreateprob/CPXNETcreateprob. - dj
-
Array in which to write requested reduced costs. If NULL is passed, no reduced cost values are returned. Otherwise,
djmust point to an array of size at least (end-begin+1). - begin
- Index of the first arc for which a reduced cost value is to be obtained.
- end
- Index of the last arc for which a reduced cost value is to be obtained.
Return
The routine returns 0 (zero) on success and nonzero if an error occurs.Example
status = CPXNETgetdj (env, net, dj, 10, 20);