If the solver found that the problem was infeasible, this predicate will return an IIS (Irreducible Infeasible Subsystem or Irreducible Inconsistent Subsystem) for the problem, if supported by the solver.
This predicate must be called from within a user defined infeasible_handler, and with the cache_iis option set to yes (both can be set during solver set-up or using eplex_set/2). The reason for this is the IIS must be computed by the solver before the failed solver state changes, and backtracking pass the failure (the normal behaviour when a problem is infeasible) will logically remove the failed state. cache_iis is needed because the default setting for this option is no, as the IIS need to be computed as an extra step, so IIS is normally not computed.
An IIS is a subset of the problem constraints and variables which defines an infeasible subproblem. It is usually irreducible in that any proper subset of the IIS is feasible. Finding an IIS allows the diagnostic analysis of the infeasible problem. Note that a problem may have more than one infeasibility, and thus more than one IIS, but this predicate only returns one.
NumConstraints and NumVars are the number of constraints and variables that are in the IIS. ConstraintIdxs is a list of the constraint indexes of the constraints in the IIS, these indexes are the indexes that are returned by lp_add_constraints/4 and lp_add_cutpool_constraints/4, and can also be used to retrieve the constraint with the constraints_norm(Indexes) and constraints(Indexes) options of eplex_get/2 and lp_get/3. VarInfos gives information for the variables in the IIS, and is a list of Var:Status pair, where Var is a variable in the IIS, and Status is its status. Status is a one character string, and can be:
An IIS is returned only if finding IIS is supported by the external solver. In addition, the solver may limit the type of problems and the information returned by the IIS, for example, finding an IIS may be limited to linear problems, and/or bound status information may be unavailable for the variables (hence the need for the "x" status). Consult the solver's manual entry for infeasibility analyses for more detail.
For some external solvers, and for problems on the boundary between feasible and infeasible, it is possible that the routine that finds the IIS will conclude that the problem is feasible, even though it was considered infeasible when the problem was solved. In such cases, an empty IIS will be returned.
% simple inconsistency, get the constraints with constraints option of eplex_get/2 [eclipse 6]: eplex:(X=:=Y), eplex:(X+Y>=3), eplex:(X+Y=<2), eplex_solver_setup(min(X)), eplex_set(cache_iis, yes), eplex_set(infeasible_handler, eplex_get_iis(NC,BV, Is, Vs), eplex_get(constraints(Is), Cs))), eplex_solve(C). CPLEX Error 1217: No solution exists. X = X{-1e+20 .. 1e+20} Y = Y{-1e+20 .. 1e+20} NC = 2 BV = 0 Is = [0, 1] Vs = [] Cs = [X{-1e+20 .. 1e+20} + Y{-1e+20 .. 1e+20} =< 2.0, X + Y >= 3.0] C = C Yes (0.00s cpu) [eclipse 7]: % simple example using cutpool constraints and cache_iis option [eclipse 7]: eplex:(X=:=Y), eplex_solver_setup(min(X)), eplex_set(cache_iis, yes), eplex_set(infeasible_handler, eplex_get_iis(NC,NV,Is,Vs)), eplex_get(handle, H), lp_add_cutpool_constraints(H, [(X+Y>=4),(2*X =:= 2*Y), (X+Y=<3)], [], Idxs), eplex_solve(C). CPLEX Error 1217: No solution exists. X = X{-1e+20 .. 1e+20} Y = Y{-1e+20 .. 1e+20} NC = 2 NV = 0 Is = [g(2, 0), g(2, 2)] Vs = [] H = lp_handle(0) Idxs = [g(2, 0), g(2, 1), g(2, 2)] C = C Yes (0.00s cpu) [eclipse 8]: