Overview | Group | Index | Concepts |
This is an advanced routine. Advanced routines typically demand a thorough 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 CPXgetcallbackindicatorinfo
accesses
information about the indicator constraints of the presolved model
during MIP callbacks. When there are indicator constraints, ILOG CPLEX
creates a presolved model with indicator constraints in canonical form.
Canonical Form (implying variable = { 0 | 1 }) IMPLIES (implied variable) R rhs
In that canonical form, rhs stands for righthand side and R stands for one of these relations:
In the original model, you may have indicator constraints in which the implied constraint has two or more variables. For example,
x = 0 -> 3y + z <= 0
In contrast, in the canonical form, the implied constraint can have only one variable; moreover, its coefficient in the constraint must be 1 (one).
The argument which_info
can assume one of the
following values in a call to CPXgetcallbackindicatorinfo
:
CPX_CALLBACK_INFO_IC_NUM
returns the number of indicator constraints.
CPX_CALLBACK_INFO_IC_IMPLYING_VAR
returns the index of the implying variable of the
iindex
-th indicator constraint.
If the MIP callback parameter for the reduced LP
(CPX_PARAM_MIPCBREDLP
) is off
(that is, set to CPX_OFF
),
the index is in terms of the original
model, and if the index = -1,
then the variable has been created by presolve. Otherwise,
the index is in terms of the presolved model.
CPX_CALLBACK_INFO_IC_IMPLIED_VAR
returns the index of the impled variable of the
iindex
-th indicator constraint.
If CPX_PARAM_MIPCBREDLP
is set to CPX_OFF
,
the index is in terms of the original
model, and if the index = -1,
then the variable has been created by presolve.
Otherwise, the index is in terms of the presolved model.
CPX_CALLBACK_INFO_IC_SENSE
returns the sense of the iindex
-th indicator constraint.
CPX_CALLBACK_INFO_IC_COMPL
returns 0 (zero) if the iindex
-th indicator
constraint is not complemented, and 1 (one)
otherwise.
CPX_CALLBACK_INFO_IC_RHS
returns the righthand side of the iindex
-th
indicator constraint.
CPX_CALLBACK_INFO_IC_IS_FEASIBLE
returns 1 (one) if the implying variable is not
0 (zero) or 1 (one), or if the iindex
-th
indicator constraint is satisfied at the current node;
otherwise, it returns 0 (zero).
env | A pointer to the CPLEX environment, as returned by |
cbdata | The pointer passed to the user-written callback. This parameter must be the value of |
wherefrom | An integer value that indicates where the user-written callback was called from. This parameter must be the value of |
iindex | An integer, the index of the indicator constraint. |
result_p | A generic pointer to a variable of type |