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

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

242 APPENDIX A. <strong>API</strong> REFERENCE<br />

Description:<br />

Let (s x n) ∗ be the value of variable (s x n) for the specified solution. For simplicity let us assume<br />

that s x n is a member of quadratic cone, then the violation is computed as follows<br />

{<br />

max(0, ‖(s<br />

x<br />

n ) 2;n ‖ ∗ − (s x n) ∗ 1)/ √ 2, (s x n) ∗ ≥ − ‖(s x n) ∗ 2:n‖ ,<br />

‖(s x n) ∗ ‖ ,<br />

otherwise.<br />

Both when the solution is a certificate of primal infeasibility or when it is a dual feasibible<br />

solution the violation should be small.<br />

A.2.70<br />

Task.getdviolvar()<br />

Task.getdviolvar(<br />

whichsol,<br />

sub,<br />

viol)<br />

Computes the violation of a dual solution associated with a set of x variables.<br />

Arguments<br />

sub : int[]<br />

An array of indexes of x variables.<br />

viol : double[]<br />

viol[k] is the maximal violation of the solution for the constraints (s x l ) sub[k]<br />

(s x u) sub[k] ≥ 0.<br />

whichsol : soltype<br />

Selects a solution.<br />

≥ 0 and<br />

Description:<br />

<strong>The</strong> violation fo dual solution associated with the j’th variable is computed as follows<br />

where<br />

max(ρ((s x l ) ∗ i , (b x l ) i ), ρ((s x u) ∗ i , −(b x u) i ), | ∑ j = 0 numcon−1 a ij y i + (s x l ) ∗ i − (s x u) ∗ i − τc j |)<br />

{ − x, l > −∞,<br />

ρ(x, l) =<br />

|x|, otherwise<br />

τ = 0 if the the solution is certificate of dual infeasibility and τ = 1 otherwise. <strong>The</strong> formula for<br />

computing the violation is only shown for linear case but is generalized approriately for the more<br />

general problems.

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

Saved successfully!

Ooh no, something went wrong!