Previous Page: CPXcheckvals First PageNext Page: CPXchgcoef

CPXchgbds


Description

The routine CPXchgbds() is used to change the upper or lower bounds on a set of variables of a problem. Several bounds can be changed at once, with each bound specified by the index of the variable with which it is associated. The value of a variable can be fixed at one value by setting both the upper and lower bounds to the same value.

Return Value

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

Synopsis

int CPXchgbds (CPXENVptr env,
               CPXLPptr lp,
               int cnt,
               int *indices,
               char *lu,
               double *bd);

Arguments


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

CPXLPptr lp
A pointer to a CPLEX LP problem object as returned by CPXcreateprob().

int cnt
An integer that indicates the total number of bounds to be changed. cnt thus specifies the length of the arrays indices, lu and bd.

int *indices
An array of length cnt containing the numerical indices of the columns corresponding to the variables for which bounds are to be changed. Note that column j of the constraint matrix has the internal index j - 1.

char *lu
An array of length cnt containing characters that represent whether the corresponding entry in the array bd specifies the lower or upper bound on column indices[j].

lu[j]  
= 'U'  
bd[j] is an upper bound  
lu[j]  
= 'L'  
bd[j] is a lower bound  
lu[j]  
= 'B'  
bd[j] is the lower and upper bound  

double *bd
An array of length cnt containing the new values of the upper or lower bounds of the variables present in indices.

Example

status = CPXchgbds (env, lp, cnt, indices, lu, bd);

Previous Page: CPXcheckvals First PageNext Page: CPXchgcoef