9. Analyzing infeasible problems


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 10 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.

9.1. Example: Primal infeasibility

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 9.1.

Figure 9.1: Supply, demand and cost of transportation.

The problem represented in figure 9.1 is infeasible, since the total demand

\begin{math}\nonumber{}2300=1100+200+500+500\end{math} (9.1.1)

exceeds the total supply

\begin{math}\nonumber{}2200=200+1000+1000\end{math} (9.1.2)

If we denote the number of transported goods from plant i to store j by [[MathCmd 330]], the problem can be formulated as the LP:

\begin{math}\nonumber{}\begin{array}{lccccccccccccccl}\nonumber{}\mbox{minimize} & x_{{11}} & + & 2x_{{12}} & + & 5x_{{23}} & + & 2x_{{24}} & + & x_{{31}} & + & 2x_{{33}} & + & x_{{34}} &  & \\\nonumber{}\mbox{subject to} & x_{{11}} & + & x_{{12}} &  &  &  &  &  &  &  &  &  &  & \leq{} & 200,\\\nonumber{} &  &  &  &  & x_{{23}} & + & x_{{24}} &  &  &  &  &  &  & \leq{} & 1000,\\\nonumber{} &  &  &  &  &  &  &  &  & x_{{31}} & + & x_{{33}} & + & x_{{34}} & \leq{} & 1000,\\\nonumber{} & x_{{11}} &  &  &  &  &  &  & + & x_{{31}} &  &  &  &  & = & 1100,\\\nonumber{} &  &  & x_{{12}} &  &  &  &  &  &  &  &  &  &  & = & 200,\\\nonumber{} &  &  &  &  & x_{{23}} & + &  &  &  &  & x_{{33}} &  &  & = & 500,\\\nonumber{} &  &  &  &  &  &  & x_{{24}} & + &  &  &  &  & x_{{34}} & = & 500,\\\nonumber{} & x_{{ij}}\geq{}0. &  &  &  &  &  &  &  &  &  &  &  &  &  &\end{array}\end{math} (9.1.3)

Solving the problem (9.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.

9.1.1. Locating the cause of primal infeasibility

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:

  • Remove the objective function. This does not change the infeasible status but simplifies the problem, eliminating any possibility of problems related to the objective function.
  • Consider whether your problem has some necessary conditions for feasibility and examine if these are satisfied, e.g. total supply should be greater than or equal to total demand.
  • Verify that coefficients and bounds are reasonably sized in your problem.

If the problem is still primal infeasible, some of the constraints must be relaxed or removed completely. The MOSEK infeasibility report (Section 9.1.3) may assist you in finding the constraints causing the infeasibility.

Possible ways of relaxing your problem include:

  • Increasing (decreasing) upper (lower) bounds on variables and constraints.
  • Removing suspected constraints from the problem.

Returning to the transportation example, we discover that removing the fifth constraint

\begin{math}\nonumber{}x_{{12}}=200\end{math} (9.1.4)

makes the problem feasible.

9.1.2. Locating the cause of dual infeasibility

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:

\begin{math}\nonumber{}\begin{array}{lcl}\nonumber{}\mbox{minimize} & x_{1} & \\\nonumber{}\mbox{subject to} & x_{1}\leq{}5 &\end{array}\end{math} (9.1.5)

To resolve a dual infeasibility the primal problem must be made more restricted by

  • Adding upper or lower bounds on variables or constraints.
  • Removing variables.
  • Changing the objective.

9.1.2.1. A cautious note

The problem

\begin{math}\nonumber{}\begin{array}{lcl}\nonumber{}\mbox{minimize} & 0 & \\\nonumber{}\mbox{subject to} & 0\leq{}x_{1}, & \\\nonumber{} & x_{j}\leq{}x_{{j+1}}, & j=1,\dots ,n-1,\\\nonumber{} & x_{n}\leq{}-1 &\end{array}\end{math} (9.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.

9.1.3. The infeasibility report

MOSEK includes functionality for diagnosing the cause of a primal or a dual infeasibility. It can be turned on by setting the Env.iparam.infeas_report_auto to Env.onoffkey.on. This causes MOSEK to print a report on variables and constraints involved in the infeasibility.

The Env.iparam.infeas_report_level parameter controls the amount of information presented in the infeasibility report. The default value is 1.

9.1.3.1. Example: Primal infeasibility

We will reuse the example (9.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 (9.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 (9.1.3).

9.1.3.2. Example: Dual infeasibility

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 [[MathCmd 335]] denote the reported primal solution. MOSEK states

  • that the problem is dual infeasible,
  • that the reported solution is a certificate of dual infeasibility, and
  • that the infeasibility measure for [[MathCmd 335]] is approximately zero.

Since it was an maximization problem, this implies that

\begin{math}\nonumber{}c^{t}x^{*}>0.\end{math} (9.1.7)

For a minimization problem this inequality would have been reversed — see (9.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:

  • Put a lower bound in y3. This will directly invalidate the certificate of dual infeasibility.
  • Increase the object coefficient of y3. Changing the coefficients sufficiently will invalidate the inequality (9.1.7) and thus the certificate.
  • Put lower bounds on x11 or x31. This will directly invalidate the certificate of infeasibility.

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.

9.2. Theory concerning infeasible problems

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

\begin{math}\nonumber{}\begin{array}{lccccl}\nonumber{}\mbox{minimize} &  &  & c^{T}x+c^{f} &  & \\\nonumber{}\mbox{subject to} & l^{c} & \leq{} & Ax & \leq{} & u^{c},\\\nonumber{} & l^{x} & \leq{} & x & \leq{} & u^{x}\end{array}\end{math} (9.2.1)

where the corresponding dual problem is

\begin{math}\nonumber{}\begin{array}{lccl}\nonumber{}\mbox{maximize} & (l^{c})^{T}s_{l}^{c}-(u^{c})^{T}s_{u}^{c} &  & \\\nonumber{} & +(l^{x})^{T}s_{l}^{x}-(u^{x})^{T}s_{u}^{x}+c^{f} &  & \\\nonumber{}\mbox{subject to} & A^{T}y+s_{l}^{x}-s_{u}^{x} & = & c,\\\nonumber{} & -y+s_{l}^{c}-s_{u}^{c} & = & 0,\\\nonumber{} & s_{l}^{c},s_{u}^{c},s_{l}^{x},s_{u}^{x}\geq{}0. &  &\end{array}\end{math} (9.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

\begin{math}\nonumber{}l_{j}^{x}=-\infty ~\Rightarrow ~(s_{l}^{x})_{j}=0\end{math} (9.2.3)

9.2.1. Certificat of primal infeasibility

A certificate of primal infeasibility is any solution to the homogenized dual problem

\begin{math}\nonumber{}\begin{array}{lccl}\nonumber{}\mbox{maximize} & (l^{c})^{T}s_{l}^{c}-(u^{c})^{T}s_{u}^{c} &  & \\\nonumber{} & +(l^{x})^{T}s_{l}^{x}-(u^{x})^{T}s_{u}^{x} &  & \\\nonumber{}\mbox{subject to} & A^{T}y+s_{l}^{x}-s_{u}^{x} & = & 0,\\\nonumber{} & -y+s_{l}^{c}-s_{u}^{c} & = & 0,\\\nonumber{} & s_{l}^{c},s_{u}^{c},s_{l}^{x},s_{u}^{x}\geq{}0. &  &\end{array}\end{math} (9.2.4)

with a positive objective value. That is, [[MathCmd 342]] is a certificat of primal infeasibility if

\begin{math}\nonumber{}(l^{c})^{T}s_{l}^{{c*}}-(u^{c})^{T}s_{u}^{{c*}}+(l^{x})^{T}s_{l}^{{x*}}-(u^{x})^{T}s_{u}^{{x*}}>0\end{math} (9.2.5)

and

\begin{math}\nonumber{}\begin{array}{lcl}\nonumber{}A^{T}y+s_{l}^{{x*}}-s_{u}^{{x*}} & = & 0,\\\nonumber{}-y+s_{l}^{{c*}}-s_{u}^{{c*}} & = & 0,\\\nonumber{}s_{l}^{{c*}},s_{u}^{{c*}},s_{l}^{{x*}},s_{u}^{{x*}}\geq{}0. &  &\end{array}\end{math} (9.2.6)

The well-known Farkas Lemma tells us that (9.2.1) is infeasible if and only if a certificat of primal infeasibility exists.

Let [[MathCmd 342]] be a certificate of primal infeasibility then

\begin{math}\nonumber{}(s_{l}^{{c*}})_{i}>0\quad{}((s_{u}^{{c*}})_{i}>0)\end{math} (9.2.7)

implies that the lower (upper) bound on the ith constraint is important for the infeasibility. Furthermore,

\begin{math}\nonumber{}(s_{l}^{{x*}})_{j}>0\quad{}((s_{u}^{{x*}})_{i}>0)\end{math} (9.2.8)

implies that the lower (upper) bound on the jth variable is important for the infeasibility.

9.2.2. Certificat of dual infeasibility

A certificate of dual infeasibility is any solution to the problem

\begin{math}\nonumber{}\begin{array}{lccccl}\nonumber{}\mbox{minimize} &  &  & c^{T}x &  & \\\nonumber{}\mbox{subject to} & \bar{l}^{c} & \leq{} & Ax & \leq{} & \bar{u}^{c},\\\nonumber{} & \bar{l}^{x} & \leq{} & x & \leq{} & \bar{u}^{x}\end{array}\end{math} (9.2.9)

with negative objective value, where we use the definitions

\begin{math}\nonumber{}\bar{l}_{i}^{c}:=\left\lbrace{}\begin{array}{ll}\nonumber{}0, & l_{i}^{c}>-\infty ,\\\nonumber{}-\infty , & \mbox{otherwise},\end{array}\right.\quad{}\bar{u}_{i}^{c}:=\left\lbrace{}\begin{array}{ll}\nonumber{}0, & u_{i}^{c}<\infty ,\\\nonumber{}\infty , & \mbox{otherwise},\end{array}\right.\end{math} (9.2.10)

and

\begin{math}\nonumber{}\bar{l}_{i}^{x}:=\left\lbrace{}\begin{array}{ll}\nonumber{}0, & l_{i}^{x}>-\infty ,\\\nonumber{}-\infty , & \mbox{otherwise},\end{array}\right.\mbox{ and }\bar{u}_{i}^{x}:=\left\lbrace{}\begin{array}{ll}\nonumber{}0, & u_{i}^{x}<\infty ,\\\nonumber{}\infty , & \mbox{otherwise}.\end{array}\right.\end{math} (9.2.11)

Stated differently, a certificate of dual infeasibility is any [[MathCmd 335]] such that

\begin{math}\nonumber{}\begin{array}{lcccl}\nonumber{} &  & c^{T}x^{*} & < & 0,\\\nonumber{}\bar{l}^{c} & \leq{} & Ax^{*} & \leq{} & \bar{u}^{c},\\\nonumber{}\bar{l}^{x} & \leq{} & x^{*} & \leq{} & \bar{u}^{x}\end{array}\end{math} (9.2.12)

The well-known Farkas Lemma tells us that (9.2.2) is infeasible if and only if a certificat of dual infeasibility exists.

Observe that if [[MathCmd 335]] is a certificate of dual infeasibility then for any j such that

\begin{math}\nonumber{}x_{j}^{*}\not=0,\end{math} (9.2.13)

variable j is involved in the dual infeasibility.

Mon Sep 14 15:42:34 2009