Previous Page: CPXNETchgnodename First PageNext Page: CPXNETchgobjsen

CPXNETchgobj


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.

Any solution information that may be stored in the CPLEX network problem object will be lost.

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);

Arguments


CPXENVptr env
The pointer to the CPLEX environment as returned by one of the CPXopenCPLEX() routines.

CPXNETptr net
A pointer to a CPLEX network problem object as returned by CPXNETcreateprob().

int cnt
Number of arcs for which the objective values are to be changed.

int *index
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].

double *obj
An array of the new objective values for the arcs. This array must have a length of at least cnt.

Example

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

Previous Page: CPXNETchgnodename First PageNext Page: CPXNETchgobjsen