Initializing help system before first use

XPRSsetindicators

Purpose
Specifies that a set of rows in the matrix will be treated as indicator constraints during a tree search. An indicator constraint is made of a condition and a constraint. The condition is of the type "bin = value", where bin is a binary variable and value is either 0 or 1. The constraint is any matrix row (may be linear, quadratic or general nonlinear). During tree 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. Note that every row may only get assigned a single indicator variable and term. If a row needs to be activated by multiple different terms, the row needs to be duplicated so that each term can be assigned to a distinct row. If the indicator variable should be changed, the old term needs to be deleted first (by calling XPRSdelindicators or by calling this function with a comps argument of 0) before assigning a new one.
Topic area
Synopsis
int XPRS_CC XPRSsetindicators(XPRSprob prob, int nrows, const int rowind[], const int colind[], const int complement[]);
Arguments
prob 
The current problem.
nrows 
The number of indicator constraints.
rowind 
Integer array of length nrows containing the indices of the rows that define the constraint part for the indicator constraints.
colind 
Integer array of length nrows containing the column indices of the indicator variables.
complement 
Integer array of length nrows with the complement flags:
not an indicator constraint (in this case the corresponding entry in the colind 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 MIP 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 rowind[] = {0,1};
int colind[] = {4,5};
int complement[] = {1,-1};

...
XPRSsetindicators(prob,2,rowind,colind,complement);
XPRSmipoptimize(prob,"");
Further information
1. 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.
2. This function cannot be called while the current problem is being solved or when it is in an interrupted state. Use XPRSpostsolve to restore the problem to a non-solving state.
Related topics

© 2001-2025 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.