Initializing help system before first use

problem.getindicators

problem.getindicators


Purpose
Returns the indicator constraint condition (indicator variable and complement flag) associated to the rows in a given range.
Synopsis
problem.getindicators (inds, comps, first, last)
Arguments
inds 
Array of length last-first+1 where the column indices of the indicator variables are to be placed.
comps 
Array of length last-first+1 where the indicator complement flags will be returned:
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";
first 
First row in the range.
last 
Last row in the range (inclusive).
Example
The following example retrieves information about three indicator constraints in the problem and prints a list of their indices.
inds = []
comps = []
p.getindicators (inds, comps, 2, 4)
print ("indices:",          inds)
print ("complement flags:", comps)
Related topics