XPRSsetindicators
XPRSsetindicators |
Purpose
Specifies that a set of rows in the matrix will be treated as indicator constraints, during a global search. An indicator constraint is made of a condition and a
linear constraint. The
condition is of the type "
bin = value", where
bin is a binary variable and
value is either 0 or 1. The
linear constraint is any linear row. 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
int XPRS_CC XPRSsetindicators(XPRSprob prob, int nrows, const int mrows[], const int inds[], const int comps[]);
Arguments
|
prob
|
The current problem.
|
||||||
|
nrows
|
The number of indicator constraints.
|
||||||
|
mrows
|
Integer array of length
nrows containing the indices of the rows that define the linear constraint part for the indicator constraints.
|
||||||
|
inds
|
Integer array of length
nrows containing the column indices of the indicator variables.
|
||||||
|
comps
|
Integer array of length
nrows with the complement flags:
|
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).
int mrows[] = {0,1};
int inds[] = {4,5};
int comps[] = {1,-1};
...
XPRSsetindicators(prob,2,mrows,inds,comps);
XPRSmipoptimize(prob,"");
Further information
Indicator rows must be set up before solving the problem. Any indicator row will be removed from the matrix 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
© 2001-2019 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation ("FICO"). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.
