CPXXNETgetobj and CPXNETgetobj

The routine CPXXNETgetobj/CPXNETgetobj is used to access the objective function values for a range of arcs in the network stored in a network problem object.

int  CPXXNETgetobj( CPXCENVptr env, CPXCNETptr net, double * obj, CPXDIM begin, CPXDIM end )

int  CPXNETgetobj( CPXCENVptr env, CPXCNETptr net, double * obj, int begin, int end )

Description

The routine CPXXNETgetobj/CPXNETgetobj is used to access the objective function values for a range of arcs in the network stored in a 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.
obj
Array in which to write the objective values for the requested range of arcs. If NULL is passed, no objective values are retrieved. Otherwise, obj must point to an array of size at least (end-begin+1).
begin
Index of the first arc for which the objective value is to be obtained.
end
Index of the last arc for which the objective value is to be obtained.

Return

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

Example


 status = CPXNETgetobj (env, net, obj, 0, cur_narcs-1);