CPXXNETchgobj and CPXNETchgobj

The routine CPXXNETchgobj/CPXNETchgobj is used to change the objective values for a set of arcs in the network stored in a network problem object.

int  CPXXNETchgobj( CPXCENVptr env, CPXNETptr net, CPXDIM cnt, CPXDIM const * indices, double const * obj )

int  CPXNETchgobj( CPXCENVptr env, CPXNETptr net, int cnt, int const * indices, double const * obj )

Description

The routine CPXXNETchgobj/CPXNETchgobj is used to change the objective values for a set of arcs in the network stored in a network problem object.

Any solution information stored in the problem object is lost.

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.
cnt
Number of arcs for which the objective values are to be changed.
indices
An array of indices that indicate the arcs for which the objective values are to be changed. This array must have a length of at least cnt. The indices must be in the range [0, narcs-1].
obj
An array of the new objective values for the arcs. This array must have a length of at least cnt.

Return

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

Example


 status = CPXNETchgobj (env, net, cnt, indices, newobj);