NO FRAMES

CPXtightenbds

int CPXPUBLIC CPXtightenbds(CPXCENVptr env, CPXLPptr lp, int cnt, const int * indices, const char * lu, const double * bd)
Definition file: cplex.h
Include files: cplex.h
Note

This is an advanced routine. Advanced routines typically demand a profound understanding of the algorithms used by ILOG CPLEX. Thus they incur a higher risk of incorrect behavior in your application, behavior that can be difficult to debug. Therefore, ILOG encourages you to consider carefully whether you can accomplish the same task by means of other Callable Library routines instead.

The routine CPXtightenbds changes the upper or lower bounds on a set of variables in a problem. Several bounds can be changed at once. Each bound is specified by the index of the variable associated with it. The value of a variable can be fixed at one value by setting both the upper and lower bounds to the same value.

In contrast to the ILOG CPLEX Callable Library routine CPXchgbds, also used to change bounds, CPXtightenbdspreserves more of the internal ILOG CPLEX data structures so it is more efficient for re-optimization, particularly when changes are made to bounds on basic variables.

Bound Indicators in the Argument lu of CPXtightenbds
Value of lu[j]Meaning for bd[j]
Ubd[j]is an upper bound
Lbd[j]is a lower bound
Bbd[j]is the lower and upper bound

Example

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

Parameters:

env

The pointer to the ILOG CPLEX environment, as returned by CPXopenCPLEX.

lp

A pointer to a CPLEX LP problem object, as returned by CPXcreateprob.

cnt

An integer indicating the total number of bounds to change. That is, cnt specifies the length of the arrays indices, lu, and bd.

indices

An array containing the numeric indices of the columns corresponding to the variables for which bounds will be changed. The allocated length of the array is cnt. Column j of the constraint matrix has the internal index j - 1.

lu

An array. This array contains characters indicating whether the corresponding entry in the array bd specifies the lower or upper bound on column indices[j]. The allocated length of the array is cnt. The table summarizes the values that entries in this array may assume.

bd

An array. This array contains the new values of the upper or lower bounds of the variables present in the array indices. The allocated length of the array is cnt.

Returns:

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