CPXXNETgetx and CPXNETgetx
The routine CPXXNETgetx/CPXNETgetx is used to access solution values
or, equivalently, flow values for a range of arcs stored in a network
problem object.
int CPXXNETgetx( CPXCENVptr env, CPXCNETptr net, double * x, CPXDIM begin, CPXDIM end )
int CPXNETgetx( CPXCENVptr env, CPXCNETptr net, double * x, int begin, int end )
Description
The routine CPXXNETgetx/CPXNETgetx is used to access solution values
or, equivalently, flow values for a range of arcs stored in a network
problem object.
For this routine to succeed, a solution must exist for the network problem object.
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. - x
-
Array in which to write solution (or flow) values for requested arcs. If NULL is passed, no solution vector is returned. Otherwise,
xmust point to an array of size at least (end-begin+1). - begin
- Index of the first arc for which a solution (or flow) value is to be obtained.
- end
- Index of the last arc for which a solution (or flow) value is to be obtained.
Return
The routine returns 0 (zero) on success and nonzero if an error occurs.Example
status = CPXNETgetx (env, net, x, 10, 20);