25.11.2015 Views

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

Optimizer API for Python - Documentation - Mosek

Optimizer API for Python - Documentation - Mosek

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

192 CHAPTER 15. SENSITIVITY ANALYSIS<br />

Basis type<br />

Var. β 1 β 2 σ 1 σ 2<br />

c 1 −∞ 3.00 300.00 300.00<br />

c 2 −∞ ∞ 100.00 100.00<br />

c 3 −2.00 ∞ 0.00 0.00<br />

c 4 −∞ 2.00 500.00 500.00<br />

c 5 −3.00 ∞ 500.00 500.00<br />

c 6 −∞ 2.00 500.00 500.00<br />

c 7 −2.00 ∞ 0.00 0.00<br />

Optimal partition type<br />

Var. β 1 β 2 σ 1 σ 2<br />

c 1 −∞ 3.00 300.00 300.00<br />

c 2 −∞ ∞ 100.00 100.00<br />

c 3 −2.00 ∞ 0.00 0.00<br />

c 4 −∞ 2.00 500.00 500.00<br />

c 5 −3.00 ∞ 500.00 500.00<br />

c 6 −∞ 2.00 500.00 500.00<br />

c 7 −2.00 ∞ 0.00 0.00<br />

Table 15.2: Ranges and shadow prices related to the objective coefficients. Left: Results for the basis<br />

type sensitivity analysis. Right: Results for the optimal partition type sensitivity analysis.<br />

β ∈ [0, 300]<br />

then the optimal objective value will increase by the value<br />

σ 1 β = 3β.<br />

15.5 Sensitivity analysis from the <strong>MOSEK</strong> <strong>API</strong><br />

<strong>MOSEK</strong> provides the functions Task.primalsensitivity and Task.dualsensitivity for performing<br />

sensitivity analysis. <strong>The</strong> code below gives an example of its use.<br />

2 ##<br />

[ sensitivity.py ]<br />

3 # Copyright: Copyright (c) <strong>MOSEK</strong> ApS, Denmark. All rights reserved.<br />

4 #<br />

5 # File: sensitivity.py<br />

6 #<br />

7 # Purpose: To demonstrate how to perform sensitivity<br />

8 # analysis from the <strong>API</strong> on a small problem:<br />

9 #<br />

10 # minimize<br />

11 #<br />

12 # obj: +1 x11 + 2 x12 + 5 x23 + 2 x24 + 1 x31 + 2 x33 + 1 x34<br />

13 # st<br />

14 # c1: + x11 + x12

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

Saved successfully!

Ooh no, something went wrong!