Initializing help system before first use

problem.setindicators

problem.setindicators


Purpose
Specifies that a set of rows in the problem will be treated as indicator constraints during a global search. An indicator constraint is made of a condition and a linear inequality. The condition is of the type " bin = value", where bin is a binary variable and value is either 0 or 1. The linear inequality is any linear row in the problem with type <= ( L) or >= ( G). During global search, a row configured as an indicator constraint is enforced only when condition holds, that is only if the indicator variable bin has the specified value.
Synopsis
problem.setindicators (mrows, inds, comps)
Arguments
mrows 
Array containing the indices of the rows that define the linear inequality part for the indicator constraints.
inds 
Array containing the column indices of the indicator variables.
comps 
Array with the complement flags:
not an indicator constraint (in this case the corresponding entry in the inds array is ignored);
for indicator constraints with condition " bin = 1";
-1 
for indicator constraints with condition " bin = 0";
Example
This sets the first two matrix rows as indicator rows in the global problem prob; the first row controlled by condition x4=1 and the second row controlled by condition x5=0 (assuming x4 and x5 correspond to columns indices 4 and 5).
p.setindicators ([0,1],[4,5],[1,-1])
p.mipoptimize ("")
Further information
Indicator rows must be set up before solving the problem. Any indicator row will be removed from the problem after presolve and added to a special pool. An indicator row will be added back into the active matrix only when its associated condition holds. An indicator variable can be used in multiple indicator rows and can also appear in normal rows and in the objective function.
Related topics