CPXXNETgetpi and CPXNETgetpi

The routine CPXXNETgetpi/CPXNETgetpi is used to access dual values for a range of nodes in the network stored in a network problem object.

int  CPXXNETgetpi( CPXCENVptr env, CPXCNETptr net, double * pi, CPXDIM begin, CPXDIM end )

int  CPXNETgetpi( CPXCENVptr env, CPXCNETptr net, double * pi, int begin, int end )

Description

The routine CPXXNETgetpi/CPXNETgetpi is used to access dual values for a range of nodes in 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, if CPXXNETsolninfo/CPXNETsolninfo returns 0 (zero) in its argument pfeasind_p), then the dual values 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.
pi
Array in which to write solution dual values for requested nodes. If NULL is passed, no data is returned. Otherwise, pi must point to an array of size at least (end-begin+1).
begin
Index of the first node for which the dual value is to be obtained.
end
Index of the last node for which the dual value is to be obtained.

Return

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

Example


 status = CPXNETgetpi (env, net, pi, 10, 20);