OptFindIIS
OptFindIIS(opt, newLp)
Finds an Irreducibly Infeasible Subset of Constraints in a linear program «opt» defined using DefineOptimization or LpDefine.
An Irreducibly Infeasible Subset (IIS) of constraints is a subset of your constraints which contains no feasible solution, but which has the property that if any single constraint is removed, there will be feasible solutions. Thus, it is a minimal set of conflicting constraints.
When OptStatusNum(opt, true)
returns 0, it indicates that there are no feasible solutions -- that the set of constraints are contradictory. This function is useful for locating the source of the contradiction.
When called with a single parameter, a subset of the Constraints index is returned. If any constraint in that subset were to be eliminated, the resulting set of constraints would be feasible.
Variable Bound reduction
It is possible also to reduce the lower and upper variable bounds, in addition to the constraints, to find a more constrained IIS. This is accomplished by specifying an optional boolean parameter, «newLp», to be true, e.g.:
OptFindIIS(myLp, newLp: True)
When the «newLp» parameter is specified as true, a new linear program object instance is created and returned. The components of this LP can be accessed using the OptInfo function, e.g.:
OptInfo(myLp, "Constraints")
OptInfo(myLp, "lb")
OptInfo(myLp, "ub")
The LP returned is infeasible, but if any single remaining variable bound, or any single constraint, were to be removed, the resulting LP would be feasible.
History
This function was introduced in Analytica 4.3, the previous version was named LpFindIIS.
Enable comment auto-refresher