Initializing help system before first use

XPRBgetmiis

XPRBgetmiis


Purpose
Get the variables, constraints, and SOS of an IIS.
Synopsis
int XPRBgetmiis(XPRBprob prob, XPRBvar **arrvar, int *numv, XPRBctr **arrctr, int *numc, XPRBctr **arrsos, int *nums, 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).
arrsos 
Reference to a table of BCL SOS (may be NULL).
nums 
Reference to an integer that gets assigned the number of SOS returned by the function (may be NULL).
numiis 
Sequence number of the IIS or value 0 to access the IIS approximation.
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;
XPRBvar *iissos;
int numv, numc, nums;
expl2 = XPRBnewprob("example2");
   ...
XPRBmipoptimize(expl2, "");
if(XPRBgetmipstat(expl2)==XPRB_MIP_INFEAS)
{
 XPRBgetmiis(expl2, &iisvar, &numv, &iisctr, &numc, &iissos, &nums, 1);
 printf("Variables: ");        /* Print all variables */
 for(i=0;i<numv;i++) printf("%s ", XPRBgetvarname(iisvar[i]));
 printf("\n");
 XPRBfreemem(iisvar);          /* Free the array of variables */
 printf("Constraints: ");      /* Print all constraints */
 for(i=0;i<numc;i++) printf("%s ", XPRBgetctrname(iisctr[i]));
 printf("\n");
 XPRBfreemem(iisctr);          /* Free the array of constraints */
 printf("SOS: ");              /* Print all SOS */
 for(i=0;i<nums;i++) printf("%s ", XPRBgetsosname(iissos[i]));
 printf("\n");
 XPRBfreemem(iissos);          /* Free the array of SOS */
}
Further information
1. This function returns the variables, constraints, and SOS forming an IIS (irreducible infeasible set) in an infeasible MIP problem. The number of independent IIS identified by Xpress Optimizer can be obtained with function XPRBgetnumiis.
2. The arrays that are allocated by this function must be freed by the user's program by calls to XPRBfreemem.
3. The counting of IIS starts at 1. Value 0 for the argument numiis returns the information about the IIS approximation. Negative values or values larger than the number of IIS identified for the problem return 0 for the numbers of variables, constraints, and SOS.
Related topics