When developing and implementing a new optimization model, the first attempts will often be either infeasible, due to specification of inconsistent constraints, or unbounded, if important constraints have been left out.
In this chapter we will
Furthermore, chapter 11 contains a discussion on a specific method for repairing infeasibility problems where infeasibilities are caused by model parameters rather than errors in the model or the implementation.
A problem is said to be primal infeasible if no solution exists that satisfy all the constraints of the problem.
As an example of a primal infeasible problem consider the problem of minimizing the cost of transportation between a number of production plants and stores: Each plant produces a fixed number of goods, and each store has a fixed demand that must be met. Supply, demand and cost of transportation per unit are given in figure 10.1.
The problem represented in figure 10.1 is infeasible, since the total demand
![]() |
(10.1.1) |
exceeds the total supply
![]() |
(10.1.2) |
If we denote the number of transported goods from plant i to store j by , the problem can be formulated as the LP:
![]() |
(10.1.3) |
Solving the problem (10.1.3) using MOSEK will result in a solution, a solution status and a problem status. Among the log output from the execution of MOSEK on the above problem are the lines:
Basic solution Problem status : PRIMAL_INFEASIBLE Solution status : PRIMAL_INFEASIBLE_CER
The first line indicates that the problem status is primal infeasible. The second line says that a certificate of the infeasibility was found. The certificate is returned in place of the solution to the problem.
Usually a primal infeasible problem status is caused by a mistake in formulating the problem and therefore the question arises: “What is the cause of the infeasible status?” When trying to answer this question, it is often advantageous to follow these steps:
If the problem is still primal infeasible, some of the constraints must be relaxed or removed completely. The MOSEK infeasibility report (Section 10.1.3) may assist you in finding the constraints causing the infeasibility.
Possible ways of relaxing your problem include:
Returning to the transportation example, we discover that removing the fifth constraint
![]() |
(10.1.4) |
makes the problem feasible.
A problem may also be dual infeasible. In this case the primal problem is often unbounded, mening that feasbile solutions exists such that the objective tends towards infinity. An example of a dual infeasible and primal unbounded problem is:
![]() |
(10.1.5) |
To resolve a dual infeasibility the primal problem must be made more restricted by
The problem
![]() |
(10.1.6) |
is clearly infeasible. Moreover, if any one of the constraints are dropped, then the problem becomes feasible.
This illustrates the worst case scenario that all, or at least a significant portion, of the constraints are involved in the infeasibility. Hence, it may not always be easy or possible to pinpoint a few constraints which are causing the infeasibility.
MOSEK includes functionality for diagnosing the cause of a primal or a dual infeasibility. It can be turned on by setting the MSK_IPAR_INFEAS_REPORT_AUTO to MSK_ON. This causes MOSEK to print a report on variables and constraints involved in the infeasibility.
The MSK_IPAR_INFEAS_REPORT_LEVEL parameter controls the amount of information presented in the infeasibility report. The default value is 1.
We will reuse the example (10.1.3) located in infeas.lp:
\ \ An example of an infeasible linear problem. \ minimize obj: + 1 x11 + 2 x12 + 1 x13 + 4 x21 + 2 x22 + 5 x23 + 4 x31 + 1 x32 + 2 x33 st s0: + x11 + x12 <= 200 s1: + x23 + x24 <= 1000 s2: + x31 +x33 + x34 <= 1000 d1: + x11 + x31 = 1100 d2: + x12 = 200 d3: + x23 + x33 = 500 d4: + x24 + x34 = 500 bounds end
Using the command line
mosek -d MSK_IPAR_INFEAS_REPORT_AUTO MSK_ON infeas.lp
MOSEK produces the following infeasibility report
MOSEK PRIMAL INFEASIBILITY REPORT. Problem status: The problem is primal infeasible The following constraints are involved in the primal infeasibility. Index Name Lower bound Upper bound Dual lower Dual upper 0 s0 NONE 2.000000e+002 0.000000e+000 1.000000e+000 2 s2 NONE 1.000000e+003 0.000000e+000 1.000000e+000 3 d1 1.100000e+003 1.100000e+003 1.000000e+000 0.000000e+000 4 d2 2.000000e+002 2.000000e+002 1.000000e+000 0.000000e+000 The following bound constraints are involved in the infeasibility. Index Name Lower bound Upper bound Dual lower Dual upper 8 x33 0.000000e+000 NONE 1.000000e+000 0.000000e+000 10 x34 0.000000e+000 NONE 1.000000e+000 0.000000e+000
The infeasibility report is divided into two sections where the first section shows which constraints that are important for the infeasibility. In this case the important constraints are the ones named s0, s2, d1, and d2. The values in the columns “Dual lower” and “Dual upper” are also useful,since a non-zero dual lower value for a constraint implies that the lower bound on the constraint is important for the infeasibility. Similarly, a non-zero dual upper value implies that the upper bound on the constraint is important for the infeasibility.
It is also possible to obtain the infeasible subproblem. The executing the command
mosek -d MSK_IPAR_INFEAS_REPORT_AUTO MSK_ON infeas.lp -info rinfeas.lp
produces the files rinfeas.bas.inf.lp. In this case the content of the file rinfeas.bas.inf.lp is
minimize Obj: + CFIXVAR st s0: + x11 + x12 <= 200 s2: + x31 + x33 + x34 <= 1e+003 d1: + x11 + x31 = 1.1e+003 d2: + x12 = 200 bounds x11 free x12 free x13 free x21 free x22 free x23 free x31 free x32 free x24 free CFIXVAR = 0e+000 end
which is an optimization problem. Please note that this optimization problem is identical to (10.1.3), except that the objective and some of the constraints and bounds have been removed. Executing the command
mosek -d MSK_IPAR_INFEAS_REPORT_AUTO MSK_ON rinfeas.bas.inf.lp
demonstrates that the reduced problem is primal infeasible. However, since the reduced problem is usually smaller, it should be easier to locate the cause of the infeasibility in this rather than in the original problem (10.1.3).
The example problem
minimize - 200 y1 - 1000 y2 - 1000 y3 - 1100 y4 - 200 y5 - 500 y6 - 500 y7 subject to x11: y1+y4 < 1 x12: y1+y5 < 2 x23: y2+y6 < 5 x24: y2+y7 < 2 x31: y3+y4 < 1 x33: y3+y6 < 2 x44: y3+y7 < 1 bounds y1 < 0 y2 < 0 y3 < 0 y4 free y5 free y6 free y7 free end
is dual infeasible. This can be verified by proving that
y1=-1, y2=-1, y3=0, y4=1, y5=1
is a certificate of dual infeasibility. In this example the following infeasibility report is produced (slightly edited):
he following constraints are involved in the infeasibility.
Index Name Activity Objective Lower bound Upper bound
0 x11 -1.000000e+00 NONE 1.000000e+00
4 x31 -1.000000e+00 NONE 1.000000e+00
The following variables are involved in the infeasibility.
Index Name Activity Objective Lower bound Upper bound
3 y4 -1.000000e+00 -1.100000e+03 NONE NONE
Interior-point solution
Problem status : DUAL_INFEASIBLE
Solution status : DUAL_INFEASIBLE_CER
Primal - objective: 1.1000000000e+03 eq. infeas.: 0.00e+00 max bound infeas.: 0.00e+00 cone infeas.: 0.00e+00
Dual - objective: 0.0000000000e+00 eq. infeas.: 0.00e+00 max bound infeas.: 0.00e+00 cone infeas.: 0.00e+00
Let denote the reported primal solution. MOSEK states
Since it was an maximization problem, this implies that
![]() |
(10.1.7) |
For a minimization problem this inequality would have been reversed — see (10.2.12).
From the infeasibility report we see that the variable y4, and the constraints x11 and x33 are involved in the infeasibility since these appear with non-zero values in the “Activity” column.
One possible strategy to “fix” the infeasibility is to modify the problem so that the certificate of infeasibility becomes invalid. In this case we might do one the the following things:
Please note that modifying the problem to invalidate the reported certificate does not imply that the problem becomes dual feasible — the infeasibility may simply “move”, resulting in a new infeasibility.
More often, the reported certificate can be used to give a hint about errors or inconsistencies in the model that produced the problem.
This section discusses the theory of infeasibility certificates and how MOSEK uses a certificate to produce an infeasibility report. In general, MOSEK solves the problem
![]() |
(10.2.1) |
where the corresponding dual problem is
![]() |
(10.2.2) |
We use the convension that for any bound that is not finite, the corresponding dual variable is fixed at zero (and thus will have no influence on the dual problem). For example
![]() |
(10.2.3) |
A certificate of primal infeasibility is any solution to the homogenized dual problem
![]() |
(10.2.4) |
with a positive objective value. That is, is a certificat of primal infeasibility if
![]() |
(10.2.5) |
and
![]() |
(10.2.6) |
The well-known Farkas Lemma tells us that (10.2.1) is infeasible if and only if a certificat of primal infeasibility exists.
Let be a certificate of primal infeasibility then
![]() |
(10.2.7) |
implies that the lower (upper) bound on the ith constraint is important for the infeasibility. Furthermore,
![]() |
(10.2.8) |
implies that the lower (upper) bound on the jth variable is important for the infeasibility.
A certificate of dual infeasibility is any solution to the problem
![]() |
(10.2.9) |
with negative objective value, where we use the definitions
![]() |
(10.2.10) |
and
![]() |
(10.2.11) |
Stated differently, a certificate of dual infeasibility is any such that
![]() |
(10.2.12) |
The well-known Farkas Lemma tells us that (10.2.2) is infeasible if and only if a certificat of dual infeasibility exists.
Observe that if is a certificate of dual infeasibility then for any j such that
![]() |
(10.2.13) |
variable j is involved in the dual infeasibility.