findiis
R2026bSyntax
Description
Given an infeasible set of linear constraints and bounds,
findiis identifies an irreducible infeasible subset (IIS),
which is a minimal subset of constraints that is still infeasible but becomes feasible
if any single constraint is removed.
Examples
Identify which constraints make a linear program infeasible by using findiis.
Create an infeasible set of linear inequality constraints and bounds.
A = [1 1; -1 0; 0 -1; 1 0]; b = [1; 0; 0; 5]; lb = [2; 3]; ub = [10; 10];
Call findiis to find an irreducible infeasible subset.
is = findiis(A,b,[],[],lb,ub)
Irreducible infeasible subset found.
is =
InfeasibleSubset with properties:
Variables: [1×1 struct]
Constraints: [1×1 struct]
Status: Irreducible
Message: "Irreducible infeasible subset found."
The returned InfeasibleSubset object shows that findiis found an irreducible infeasible subset. Call show on is to see which constraints and bounds belong to the IIS.
show(is)
InfeasibleSubset :
members in LinearInequalityUpper:
(1, 1)
x(1) + x(2) <= 1
members in variable bounds:
2 <= x(1)
3 <= x(2)
Set a time limit for the IIS computation using the Options argument.
Create an infeasible set of linear constraints.
A = [0 -1; 1 0; -1 1]; b = [-6; 4; -1]; Aeq = [1 1]; beq = 5; lb = [0; 0]; ub = [1; Inf];
Specify options that set a time limit of 0.5 seconds.
options = optimoptions("findiis",MaxTime=0.5);Call findiis with the options.
is = findiis(A,b,Aeq,beq,lb,ub,Options=options)
Irreducible infeasible subset found.
is =
InfeasibleSubset with properties:
Variables: [1×1 struct]
Constraints: [1×1 struct]
Status: Irreducible
Message: "Irreducible infeasible subset found."
The MaxTime option ensures that findiis stops if the computation takes longer than 0.5 seconds. Examine the result to identify the conflicting constraints.
show(is)
InfeasibleSubset :
members in LinearInequalityUpper:
(1, 1)
-x(2) <= -6
(3, 1)
-x(1) + x(2) <= -1
members in variable bounds:
x(1) <= 1
Create an optimization problem with conflicting constraints.
After the solve function reports infeasibility, pass the problem object to findiis to determine which constraints conflict.
x = optimvar("x",LowerBound=0,UpperBound=3); y = optimvar("y",LowerBound=0,UpperBound=4); prob = optimproblem(Objective=x+y); prob.Constraints.sumcon = x + y == 10;
Try to solve the problem. solve reports that the problem is infeasible.
[sol,fval,exitflag] = solve(prob)
Solving problem using linprog. No feasible solution found. Linprog stopped because no point satisfies the constraints.
sol = struct with fields:
x: []
y: []
fval =
[]
exitflag =
NoFeasiblePointFound
Pass the problem object to findiis to identify the conflicting constraints.
is = findiis(prob)
Irreducible infeasible subset found.
is =
InfeasibleSubset with properties:
Variables: [1×1 struct]
Constraints: [1×1 struct]
Status: Irreducible
Message: "Irreducible infeasible subset found."
Display the infeasible subset in a readable format by using show.
show(is)
InfeasibleSubset :
members in sumcon:
x + y == 10
members in variable bounds:
x <= 3
y <= 4
The display shows the specific constraints and bounds that form the irreducible infeasible subset, helping you decide which constraints to relax or remove.
Input Arguments
Linear inequality constraints, specified as a real matrix.
A is an M-by-N
matrix, where M is the number of inequalities, and
N is the number of variables.
A encodes the M linear
inequalities
A*x <= b, | (1) |
where x is the column vector of N
variables x(:), and b is a column
vector with M elements.
For example, consider these inequalities:
|
x
1 + 2x
2 ≤ 10 3x 1 + 4x 2 ≤ 20 5x 1 + 6x 2 ≤ 30. | (2) |
Specify the inequalities by entering the following constraints.
A = [1,2;3,4;5,6]; b = [10;20;30];
Example: To specify that the x components sum to 1 or less, use A
= ones(1,N) and b = 1.
Data Types: double
Linear inequality constraints, specified as a real vector. b is an M-element vector related to the A matrix. If you pass b as a row vector, solvers internally convert b to the column vector b(:).
b encodes the M linear inequalities
A*x <= b, | (3) |
where x is the column vector of N variables x(:), and A is a matrix of size M-by-N.
For example, consider these inequalities:
|
x
1 + 2x
2 ≤ 10 3x 1 + 4x 2 ≤ 20 5x 1 + 6x 2 ≤ 30. | (4) |
Specify the inequalities by entering the following constraints.
A = [1,2;3,4;5,6]; b = [10;20;30];
Example: To specify that the x components sum to 1 or less, use A = ones(1,N) and b = 1.
Data Types: double
Linear equality constraints, specified as a real matrix. Aeq is an
Me-by-N matrix, where
Me is the number of equalities, and
N is the number of variables. For large problems,
pass Aeq as a sparse matrix.
Aeq encodes the Me linear equalities
Aeq*x = beq,
where x is the column vector of N variables
x(:), and beq is a column
vector with Me elements.
For example, consider these equalities:
x1 +
2x2 +
3x3 =
10
2x1 +
4x2 +
x3 = 20.
Specify the equalities by entering the following constraints.
Aeq = [1,2,3;2,4,1]; beq = [10;20];
Example: To specify that the x components sum to 1, use Aeq = ones(1,N) and
beq = 1.
Data Types: double
Linear equality constraints, specified as a real vector. beq is an
Me-element vector related to the Aeq matrix. If
you pass beq as a row vector, solvers internally convert it to the
column vector beq(:).
beq encodes the Me linear equalities
Aeq*x = beq, | (5) |
where x is the column vector of N variables
x(:), and Aeq is a matrix of size
Me-by-N.
For example, consider these equalities:
|
x
1 + 2x
2 + 3x
3 = 10 2x 1 + 4x 2 + x 3 = 20. | (6) |
Specify the equalities by entering the following constraints.
Aeq = [1,2,3;2,4,1]; beq = [10;20];
Example: To specify that the x components sum to 1, use Aeq =
ones(1,N) and beq = 1.
Data Types: double
Lower bounds, specified as a real vector or real array.
lb specifies that the solution x
satisfies
x(i) >= lb(i) for all
i. | (7) |
Example: To specify that all x components are positive, use lb =
zeros(size(f)), where f is a vector the
same size as lb.
Data Types: double
Upper bounds, specified as a real vector or real array.
ub specifies that the solution x
satisfies
x(i) <= ub(i) for all
i. | (8) |
Example: To specify that all x components are less than
1, use ub = ones(size(f)), where
f is a vector the same size as
ub.
Data Types: double
Optimization problem, specified as an OptimizationProblem object. Create an optimization problem by
using optimproblem.
Warning
The problem-based approach does not support complex values in the objective function, nonlinear equalities, and nonlinear inequalities. If a function calculation has a complex value, even as an intermediate value, the final result might be incorrect.
Example: prob = optimproblem; prob.Objective = obj;
prob.Constraints.cons1 = cons1;
Optimization options, specified as the output of optimoptions.
| Option | Description |
|---|---|
ConstraintTolerance | Feasibility tolerance for
constraints, a nonnegative scalar. The default is
|
| Level of display:
|
| Maximum amount of time that
the algorithm runs. Specify a |
| Dual feasibility tolerance, a
nonnegative scalar. The default is
|
Example: options =
optimoptions("findiis",MaxTime=10,Display="iter")
Output Arguments
Irreducible infeasible subset, returned as an InfeasibleSubset object with the following properties.
| Property | Description |
|---|---|
Status | Status of the IIS computation, returned as one of the following:
|
Message | Reason the search stopped, returned as a string. |
Variables | Structure identifying which variable bounds are in the IIS.
|
Constraints | Structure identifying which constraints are in the IIS.
|
More About
An irreducible infeasible subset (IIS) is a set of constraints and variable bounds that satisfies two conditions:
The constraints in the set are infeasible, which means that no point satisfies all of them simultaneously.
The set is irreducible, which means that removing any single constraint or bound makes the remaining set feasible.
Finding an IIS helps you determine why a linear program is infeasible by identifying a minimal conflicting subset of constraints, rather than examining all constraints.
An infeasible problem can have more than one IIS. The findiis function
returns one IIS. To make the full problem feasible, you might need to resolve multiple
overlapping infeasible subsets by iteratively calling findiis after
removing or relaxing constraints.
Algorithms
findiis uses the HiGHS IIS algorithm to identify
irreducible infeasible subsets. The algorithm solves a sequence of
linear programs, systematically removing constraints to determine
a minimal infeasible subset.
Version History
Introduced in R2026b
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Select a Web Site
Choose a web site to get translated content where available and see local events and offers. Based on your location, we recommend that you select: .
You can also select a web site from the following list
How to Get Best Site Performance
Select the China site (in Chinese or English) for best site performance. Other MathWorks country sites are not optimized for visits from your location.
Americas
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)