The MOSEK Python optimizer API manual Version 7.0 (Revision 141)
Optimizer API for Python - Documentation - Mosek Optimizer API for Python - Documentation - Mosek
168 CHAPTER 13. THE ANALYZERS Supply Demand 200 Plant 1 1 2 Store 1 1100 1000 Plant 2 1 Store 2 200 5 Store 3 500 1000 Plant 3 2 1 2 Store 4 500 Figure 13.1: Supply, demand and cost of transportation. Furthermore, chapter 14 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. 13.2.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 13.1. The problem represented in figure 13.1 is infeasible, since the total demand exceeds the total supply 2300 = 1100 + 200 + 500 + 500
13.2. ANALYZING INFEASIBLE PROBLEMS 169 2200 = 200 + 1000 + 1000 If we denote the number of transported goods from plant i to store j by x ij , the problem can be formulated as the LP: minimize x 11 + 2x 12 + 5x 23 + 2x 24 + x 31 + 2x 33 + x 34 subject to x 11 + x 12 ≤ 200, x 23 + x 24 ≤ 1000, x 31 + x 33 + x 34 ≤ 1000, x 11 + x 31 = 1100, x 12 = 200, x 23 + x 33 = 500, x 24 + x 34 = 500, x ij ≥ 0. (13.1) Solving the problem (13.1) 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. 13.2.2 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 13.2.4) 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.
- Page 139 and 140: 8.1. PORTFOLIO OPTIMIZATION 117 172
- Page 141 and 142: Chapter 9 Usage guidelines The purp
- Page 143 and 144: 9.3. WRITING TASK DATA TO A FILE 12
- Page 145 and 146: Chapter 10 Problem formulation and
- Page 147 and 148: 10.1. LINEAR OPTIMIZATION 125 be a
- Page 149 and 150: 10.2. CONIC QUADRATIC OPTIMIZATION
- Page 151 and 152: 10.2. CONIC QUADRATIC OPTIMIZATION
- Page 153 and 154: 10.3. SEMIDEFINITE OPTIMIZATION 131
- Page 155 and 156: 10.4. QUADRATIC AND QUADRATICALLY C
- Page 157 and 158: Chapter 11 The optimizers for conti
- Page 159 and 160: 11.1. HOW AN OPTIMIZER WORKS 137 11
- Page 161 and 162: 11.2. LINEAR OPTIMIZATION 139 11.2.
- Page 163 and 164: 11.2. LINEAR OPTIMIZATION 141 Whene
- Page 165 and 166: 11.2. LINEAR OPTIMIZATION 143 11.2.
- Page 167 and 168: 11.2. LINEAR OPTIMIZATION 145 • R
- Page 169 and 170: 11.5. NONLINEAR CONVEX OPTIMIZATION
- Page 171 and 172: 11.6. SOLVING PROBLEMS IN PARALLEL
- Page 173 and 174: 11.6. SOLVING PROBLEMS IN PARALLEL
- Page 175 and 176: 11.6. SOLVING PROBLEMS IN PARALLEL
- Page 177 and 178: Chapter 12 The optimizers for mixed
- Page 179 and 180: 12.3. THE MIXED-INTEGER CONIC OPTIM
- Page 181 and 182: 12.5. TERMINATION CRITERION 159 •
- Page 183 and 184: 12.7. UNDERSTANDING SOLUTION QUALIT
- Page 185 and 186: Chapter 13 The analyzers 13.1 The p
- Page 187 and 188: 13.1. THE PROBLEM ANALYZER 165 Cons
- Page 189: 13.2. ANALYZING INFEASIBLE PROBLEMS
- Page 193 and 194: 13.2. ANALYZING INFEASIBLE PROBLEMS
- Page 195 and 196: 13.2. ANALYZING INFEASIBLE PROBLEMS
- Page 197 and 198: 13.2. ANALYZING INFEASIBLE PROBLEMS
- Page 199 and 200: Chapter 14 Primal feasibility repai
- Page 201 and 202: 14.2. AUTOMATIC REPAIR 179 One way
- Page 203 and 204: 14.3. FEASIBILITY REPAIR IN MOSEK 1
- Page 205 and 206: 14.3. FEASIBILITY REPAIR IN MOSEK 1
- Page 207 and 208: Chapter 15 Sensitivity analysis 15.
- Page 209 and 210: 15.4. SENSITIVITY ANALYSIS FOR LINE
- Page 211 and 212: 15.4. SENSITIVITY ANALYSIS FOR LINE
- Page 213 and 214: 15.4. SENSITIVITY ANALYSIS FOR LINE
- Page 215 and 216: 15.5. SENSITIVITY ANALYSIS FROM THE
- Page 217 and 218: 15.6. SENSITIVITY ANALYSIS WITH THE
- Page 219 and 220: 15.6. SENSITIVITY ANALYSIS WITH THE
- Page 221 and 222: Appendix A API reference This chapt
- Page 223 and 224: 201 • Task.relaxprimal Obtain inf
- Page 225 and 226: A.1. EXCEPTIONS 203 • Task.putvar
- Page 227 and 228: A.2. CLASS TASK 205 Arguments which
- Page 229 and 230: A.2. CLASS TASK 207 See also • Ro
- Page 231 and 232: A.2. CLASS TASK 209 Description: Ap
- Page 233 and 234: A.2. CLASS TASK 211 Description: If
- Page 235 and 236: A.2. CLASS TASK 213 A.2.16 Task.com
- Page 237 and 238: A.2. CLASS TASK 215 subj : int[] In
- Page 239 and 240: A.2. CLASS TASK 217 firsti : int In
13.2. ANALYZING INFEASIBLE PROBLEMS 169<br />
2200 = 200 + 1000 + 1000<br />
If we denote the number of transported goods from plant i to store j by x ij , the problem can be<br />
formulated as the LP:<br />
minimize x 11 + 2x 12 + 5x 23 + 2x 24 + x 31 + 2x 33 + x 34<br />
subject to x 11 + x 12 ≤ 200,<br />
x 23 + x 24 ≤ 1000,<br />
x 31 + x 33 + x 34 ≤ 1000,<br />
x 11 + x 31 = 1100,<br />
x 12 = 200,<br />
x 23 + x 33 = 500,<br />
x 24 + x 34 = 500,<br />
x ij ≥ 0.<br />
(13.1)<br />
Solving the problem (13.1) using <strong>MOSEK</strong> will result in a solution, a solution status and a problem<br />
status. Among the log output from the execution of <strong>MOSEK</strong> on the above problem are the lines:<br />
Basic solution<br />
Problem status : PRIMAL INFEASIBLE<br />
Solution status : PRIMAL INFEASIBLE CER<br />
<strong>The</strong> first line indicates that the problem status is primal infeasible. <strong>The</strong> second line says that a<br />
certificate of the infeasibility was found. <strong>The</strong> certificate is returned in place of the solution to the<br />
problem.<br />
13.2.2 Locating the cause of primal infeasibility<br />
Usually a primal infeasible problem status is caused by a mistake in formulating the problem and<br />
therefore the question arises: ”What is the cause of the infeasible status?” When trying to answer this<br />
question, it is often advantageous to follow these steps:<br />
• Remove the objective function. This does not change the infeasible status but simplifies the<br />
problem, eliminating any possibility of problems related to the objective function.<br />
• Consider whether your problem has some necessary conditions for feasibility and examine if these<br />
are satisfied, e.g. total supply should be greater than or equal to total demand.<br />
• Verify that coefficients and bounds are reasonably sized in your problem.<br />
If the problem is still primal infeasible, some of the constraints must be relaxed or removed completely.<br />
<strong>The</strong> <strong>MOSEK</strong> infeasibility report (Section 13.2.4) may assist you in finding the constraints causing the<br />
infeasibility.<br />
Possible ways of relaxing your problem include:<br />
• Increasing (decreasing) upper (lower) bounds on variables and constraints.