XPRSiiswrite
XPRSiiswrite |
Purpose
Writes an LP/MPS/CSV file containing a given Irreducible Infeasible Set (IIS). If 0 is passed as the IIS number parameter, the initial infeasible subproblem is written.
Synopsis
int XPRS_CC XPRSiiswrite(XPRSprob prob, int num, const char *fn, int type, const char *typeflags);
Arguments
prob
|
The current problem.
|
num
|
The ordinal number of the IIS to be written.
|
fn
|
The name of the file to be created.
|
type
|
Type of file to be created:
|
0
|
creates an lp/mps file containing the IIS as a linear programming problem;
|
1
|
creates a comma separated (csv) file containing the description and supplementary information on the given IIS.
|
typeflags
|
Flags passed to the
XPRSwriteprob function.
|
Example
This writes the first IIS (if one exists and is already found) as an lp file.
XPRSiiswrite(prob,1,"iis.lp",0,"l")
Further information
1. Calling
IIS
-w [num] fn and
IIS
-e [num] fn from the console have the same effect as this function.
2. Please note that there are problems on the boundary of being infeasible or not. For such problems, feasibility or infeasibility often depends on tolerances or even on scaling. This phenomenon makes it possible that after writing an IIS out as an LP file and reading it back, it may report feasibility. As a first check it is advised to consider the following options:
- save the IIS using MPS hexadecimal format (e.g. in console: IIS -w 1 iis.mps x) to eliminate rounding errors associated with conversion between internal and decimal representation.
- turn presolve off (e.g. in console presolve = 0) since the nature of an IIS makes it necessary that during their identification the presolve is turned off.
- use the primal simplex method to solve the problem (e.g. in console LPOPTIMIZE -p).
3. Note that the original sense of the original objective function plays no role in an IIS.
4. Even though an attempt is made to identify the most infeasible IISs first by the
XPRSiisfirst (
IIS),
XPRSiisnext (
IIS
-n) and
XPRSiisall (
IIS
-a) functions, it is also possible that an IIS becomes just infeasible in problems that are otherwise highly infeasible. In such cases, you may try to deal with the more stable IISs first, and consider to use the infeasibility breaker tool if only slight infeasibilities remain.
5. The LP or MPS files created by
XPRSiiswrite corresponding to an IIS contain no objective function, since infeasibility is independent from the objective.
Related topics
XPRSgetiisdata,
XPRSiisall,
XPRSiisclear,
XPRSiisfirst,
XPRSiisisolations,
XPRSiisnext,
XPRSiisstatus,
IIS.