NO FRAMES

CPXNETchgbds

int CPXPUBLIC CPXNETchgbds(CPXCENVptr env, CPXNETptr net, int cnt, const int * indices, const char * lu, const double * bd)
Definition file: cplex.h
Include files: cplex.h

The routine CPXNETchgbds is used to change the upper, lower, or both bounds on the flow for a set of arcs in the network stored in a network problem object. The flow value of an arc can be fixed to a value by setting both bounds to that value.

Any solution information stored in the problem object is lost.

Example

 status = CPXNETchgbds (env, net, cnt, index, lu, bd);
Indicators to change lower, upper bounds of flows through arcs
lu[i] == 'L'The lower bound of arc index[i] is changed to bd[i]
lu[i] == 'U'The upper bound of arc index[i] is changed to bd[i]
lu[i] == 'B'Both bounds of arc index[i] are changed to bd[i]

Parameters:

env

A pointer to the CPLEX environment as returned by CPXopenCPLEX.

net

A pointer to a CPLEX network problem object as returned by CPXNETcreateprob.

cnt

Number of bounds to change.

indices

An array of arc indices that indicate the bounds to be changed. This array must have a length of at least cnt. All indices must be in the range [0, narcs-1].

lu

An array indicating which bounds to change. This array must have a length of at least cnt. The indicators appear in the table.

bd

An array of bound values. This array must have a length of at least cnt. Values greater than or equal to CPX_INFBOUND and less than or equal to -CPX_INFBOUND are considered infinity or -infinity, respectively.

Returns:

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