Overview | Group | Tree | Graph | Index | Concepts |
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,
CPXtightenbds
preserves 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.
Value of lu[j] | Meaning for bd[j] |
---|---|
U | bd[j] is an upper bound |
L | bd[j] is a lower bound |
B | bd[j] is the lower and upper bound |
Example
status = CPXtightenbds (env, lp, cnt, indices, lu, bd);
env | The pointer to the ILOG CPLEX environment, as returned by |
lp | A pointer to a CPLEX LP problem object, as returned by |
cnt | An integer indicating the total number of bounds to change. That is, |
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 |
lu | An array. This array contains characters indicating whether the corresponding entry in the array |
bd | An array. This array contains the new values of the upper or lower bounds of the variables present in the array |