ILOG CPLEX 11.0 File Formats > > ILOG CPLEX File Formats > MPS File Format: Industry Standard > Indicator Constraints in MPS Files

Indicator constraints provide a way for you to express relations among variables by identifying a binary (0-1) variable to control whether or not a given constraint is active. ILOG CPLEX has extended the MPS format to express indicator constraints. The constraints to be controlled by the binary variable are listed in the ROWS section; their linear coefficients appear in the COLUMNS section (that is, the same as coefficients from linear constraints). Only rows of types E, L, and G may be part of indicator constraints. In other words, a row of type N cannot appear as a constraint controlled by a binary variable in this sense (that is, an indicator constraint).

The binary variables that control the linear constraints are specified in the BOUNDS section or with MARKER lines (that is, like any other binary variable). The relationship between the binary variables and the constraints they control is specified in the INDICATORS section. The INDICATORS section follows any quadratic constraint section and any quadratic objective section. Each line of the INDICATORS section has a type field starting in column 2 or beyond; the type must be "IF" followed by the name of the row of the indicator constraint, the name of the binary variable, and finally the value 0 (zero) or 1 (one) to indicate when the constraint should be active.

Rows that appear in the INDICATORS section cannot be ranged rows. In other words, a row that appears in the RANGES section cannot appear also in the INDICATORS section.

Here is an example of an INDICATORS section:

NAME          ind1.mps
ROWS
 N  obj
 L  row2
 L  row4
 E  row1
 E  row3
COLUMNS
    x         obj                            -1
    x         row2                            1
    x         row4                            1
    x         row1                            1
    y         row4                            1
    z         row4                            1
    z         row3                            1
RHS
    rhs       row2                           10
    rhs       row4                           15
BOUNDS
 UI bnd       y                               1
INDICATORS
 IF row1      y                               1
 IF row3      y                               0
ENDATA

That declaration represents the following model:

Minimize
 obj: - x
Subject To
 row2: x <= 10
 row4: x + y + z <= 15
 row1: y = 1 -> x  = 0
 row3: y = 0 -> z  = 0
Bounds
 0 <= y <= 1
Binaries
 y
End