Purpose
Get the
variables and constraints of an IIS.
Synopsis
int XPRBgetiis(XPRBprob prob, XPRBvar **arrvar, int *numv, XPRBctr **arrctr, int *numc, int numiis);
Arguments
prob
|
Reference to a problem.
|
arrvar
|
Reference to a table of BCL variables (may be NULL).
|
numv
|
Reference to an integer that gets assigned the number of variables returned by the function (may be NULL).
|
arrctr
|
Reference to a table of BCL constraints (may be NULL).
|
numc
|
Reference to an integer that gets assigned the number of constraints returned by the function (may be NULL).
|
numiis
|
Sequence number of the IIS (values < 1 access the first set found).
|
Return value
0 if function executed successfully, 1 otherwise.
Example
The following prints out the variable and constraint names of the first IIS found for an infeasible LP problem.
XPRBprob expl2;
XPRBctr *iisctr;
XPRBvar *iisvar;
int numv, numc;
expl2 = XPRBnewprob("example2");
...
XPRBsolve(expl2, "");
if(XPRBgetlpstat(expl2)==XPRB_LP_INFEAS)
{
XPRBgetiis(expl2, &iisvar, &numv, &iisctr, &numc, 1);
printf("Variables: "); /* Print all variables */
for(i=0;i<numv;i++) printf("%s ", XPRBgetvarname(iisvar[i]));
printf("\n");
free(iisvar); /* Free the array of variables */
printf("Constraints: "); /* Print all constraints */
for(i=0;i<numc;i++) printf("%s ", XPRBgetctrname(iisctr[i]));
printf("\n");
free(iisctr); /* Free the array of constraints */
}
Further information
1. This function returns the variables and constraints forming an IIS (irreducible infeasible set) in an infeasible LP problem.
The number of independent IIS identified by Xpress-Optimizer can be obtained with function
XPRBgetnumiis.
2. The arrays of variables and constraints that are allocated by this function must be freed by the user's program.
Related topics
If you have any comments or suggestions about these pages,
please send mail to docs@dashoptimization.com.