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.

15.6. SENSITIVITY ANALYSIS WITH THE COMMAND LINE TOOL 197<br />

* Comment 1<br />

BOUNDS CONSTRAINTS<br />

U "c1" * Analyze upper bound for constraint named c1<br />

U 2<br />

* Analyze upper bound for the second constraint<br />

U 3-5 * Analyze upper bound for constraint number 3 to number 5<br />

BOUNDS VARIABLES<br />

L 2-4<br />

* This section specifies which bounds on variables should be analyzed<br />

L "x11"<br />

OBJECTIVE VARIABLES<br />

"x11"<br />

* This section specifies which objective coefficients should be analyzed<br />

2<br />

Figure 15.4: Example of the sensitivity file format.<br />

A line in the body of a section must begin with a whitespace. In the BOUNDS sections one of the keys<br />

L, U, and LU must appear next. <strong>The</strong>se keys specify whether the sensitivity analysis is performed on<br />

the lower bound, on the upper bound, or on both the lower and the upper bound respectively. Next,<br />

a single constraint (variable) or range of constraints (variables) is specified.<br />

Recall from Section 15.4.1.1 that equality constraints are handled in a special way. Sensitivity analysis<br />

of an equality constraint can be specified with either L, U, or LU, all indicating the same, namely that<br />

upper and lower bounds (which are equal) are perturbed simultaneously.<br />

As an example consider<br />

BOUNDS CONSTRAINTS<br />

L "cons1"<br />

U "cons2"<br />

LU "cons3"-"cons6"<br />

which requests that sensitivity analysis is performed on the lower bound of the constraint named<br />

cons1, on the upper bound of the constraint named cons2, and on both lower and upper bound on<br />

the constraints named cons3 to cons6.<br />

It is allowed to use indexes instead of names, for instance<br />

BOUNDS CONSTRAINTS<br />

L "cons1"<br />

U 2<br />

LU 3 - 6<br />

<strong>The</strong> character ”*” indicates that the line contains a comment and is ignored.<br />

15.6.2 Example: Sensitivity analysis from command line<br />

As an example consider the sensitivity.ssp file shown in Figure 15.4. <strong>The</strong> command<br />

mosek transport.lp -sen sensitivity.ssp<br />

produces the transport.sen file shown below.<br />

-d iparam.sensitivity type sensitivitytype.basis<br />

BOUNDS CONSTRAINTS<br />

INDEX NAME BOUND LEFTRANGE RIGHTRANGE LEFTPRICE RIGHTPRICE<br />

0 c1 UP -6.574875e-18 5.000000e+02 1.000000e+00 1.000000e+00

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

Saved successfully!

Ooh no, something went wrong!