CPXXtightenbds and CPXtightenbds

The routine CPXXtightenbds/CPXtightenbds changes the upper or lower bounds on a set of variables in a problem.

int CPXXtightenbds( CPXCENVptrenv, CPXLPptrlp, CPXDIMcnt, CPXDIM const *indices, char const *lu, double const *bd )

int CPXtightenbds( CPXCENVptrenv, CPXLPptrlp, intcnt, int const *indices, char const *lu, double const *bd )

Description

Warning:

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

The routine CPXXtightenbds/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 Callable Library routine CPXXchgbds/CPXchgbds, also used to change bounds, CPXXtightenbds/CPXtightenbdspreserves more of the internal CPLEX data structures so it is more efficient for re-optimization, particularly when changes are made to bounds on basic variables.

Table 1. Bound Indicators in the argument lu of CPXtightenbds
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

Arguments

env
The pointer to the CPLEX environment, as returned by CPXXopenCPLEX/CPXopenCPLEX.
lp
A pointer to a CPLEX LP problem object, as returned by CPXXcreateprob/CPXcreateprob.
cnt
An integer specifying 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 specifying 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.

Return

The routine returns 0 (zero) if successful and nonzero if an error occurs.

Example


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