Previous Page: CPXNETchgarcnodes First PageNext Page: CPXNETchgname

CPXNETchgbds


Description

The function 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 CPLEX 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 that may be stored in the CPLEX network problem object will be lost.

Return Value

If the operation is successful, CPXNETchgbds() returns the value 0; if not, it returns a nonzero value to indicate an error.

Synopsis

int CPXNETchgbds (CPXENVptr env,
                  CPXNETptr net,
                  int cnt,
                  int *index,
                  char *lu,
                  double *bd);

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 bounds to change.

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

char *lu
An array indicating which bounds to change. This array must have a length of at least cnt. The indicators can be the following:

lu[i] == 'L'  
The lower bound of arc index[i] will be changed to bd[i]  
lu[i] == 'U'  
The upper bound of arc index[i] will be changed to bd[i]  
lu[i] == 'B'  
Both bounds of arc index[i] will be changed to bd[i]  

double *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.

Example

status = CPXNETchgbds (env, net, cnt, index, lu, bd);
Previous Page: CPXNETchgarcnodes First PageNext Page: CPXNETchgname