Description
The function CPXNETchgobj() is used to change the objective values for a set of arcs in the network stored in a CPLEX network problem object.Return Value
If the operation is successful, CPXNETchgobj() returns the value 0; if not, it returns a nonzero value to indicate an error.Synopsis
int CPXNETchgobj (CPXENVptr env,
CPXNETptr net,
int cnt,
int *index,
double *obj);
CPXENVptr envThe pointer to the CPLEX environment as returned by one of the
CPXopenCPLEX() routines.
CPXNETptr netA pointer to a CPLEX network problem object as returned by
CPXNETcreateprob().
int cntNumber of arcs for which the objective values are to be changed.
int *indexAn 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].
double *objAn array of the new objective values for the arcs. This array must have a length of at least
cnt.
status = CPXNETchgobj (env, net, cnt, index, newobj);