The MOSEK Python optimizer API manual Version 7.0 (Revision 141)

Optimizer API for Python - Documentation - Mosek Optimizer API for Python - Documentation - Mosek

25.11.2015 Views

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.

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.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!