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

124 CHAPTER 10. PROBLEM FORMULATION AND SOLUTIONS • l x ∈ R n is the lower limit on the activity for the variables. • u x ∈ R n is the upper limit on the activity for the variables. A primal solution (x) is (primal) feasible if it satisfies all constraints in (10.1). If (10.1) has at least one primal feasible solution, then (10.1) is said to be (primal) feasible. In case (10.1) does not have a feasible solution, the problem is said to be (primal) infeasible . 10.1.1 Duality for linear optimization Corresponding to the primal problem (10.1), there is a dual problem maximize (l c ) T s c l − (u c ) T s c u + (l x ) T s x l − (u x ) T s x u + c f subject to A T y + s x l − s x u = c, − y + s c l − s c u = 0, s c l , s c u, s x l , s x u ≥ 0. (10.2) If a bound in the primal problem is plus or minus infinity, the corresponding dual variable is fixed at 0, and we use the convention that the product of the bound value and the corresponding dual variable is 0. E.g. l x j = −∞ ⇒ (s x l ) j = 0 and l x j · (s x l ) j = 0. This is equivalent to removing variable (s x l ) j from the dual problem. A solution (y, s c l , s c u, s x l , s x u) to the dual problem is feasible if it satisfies all the constraints in (10.2). If (10.2) has at least one feasible solution, then (10.2) is (dual) feasible, otherwise the problem is (dual) infeasible. 10.1.1.1 A primal-dual feasible solution A solution (x, y, s c l , s c u, s x l , s x u) is denoted a primal-dual feasible solution, if (x) is a solution to the primal problem (10.1) and (y, s c l , sc u, s x l , sx u) is a solution to the corresponding dual problem (10.2). 10.1.1.2 The duality gap Let (x ∗ , y ∗ , (s c l ) ∗ , (s c u) ∗ , (s x l ) ∗ , (s x u) ∗ )

10.1. LINEAR OPTIMIZATION 125 be a primal-dual feasible solution, and let (x c ) ∗ := Ax ∗ . For a primal-dual feasible solution we define the duality gap as the difference between the primal and the dual objective value, = m−1 ∑ i=0 c T x ∗ + c f − ( (l c ) T (s c l ) ∗ − (u c ) T (s c u) ∗ + (l x ) T (s x l ) ∗ − (u x ) T (s x u) ∗ + c f ) n−1 ∑ [(s c l ) ∗ i ((x c i) ∗ − li c ) + (s c u) ∗ i (u c i − (x c i) ∗ [ )] + (s x l ) ∗ j (x j − lj x ) + (s x u) ∗ j (u x j − x ∗ j ) ] ≥ 0 j=0 (10.3) where the first relation can be obtained by transposing and multiplying the dual constraints (10.2) by x ∗ and (x c ) ∗ respectively, and the second relation comes from the fact that each term in each sum is nonnegative. It follows that the primal objective will always be greater than or equal to the dual objective. 10.1.1.3 When the objective is to be maximized When the objective sense of problem (10.1) is maximization, i.e. maximize c T x + c f subject to l c ≤ Ax ≤ u c , l x ≤ x ≤ u x , the objective sense of the dual problem changes to minimization, and the domain of all dual variables changes sign in comparison to (10.2). The dual problem thus takes the form minimize (l c ) T s c l − (u c ) T s c u + (l x ) T s x l − (u x ) T s x u + c f subject to A T y + s x l − s x u = c, − y + s c l − s c u = 0, s c l , s c u, s x l , s x u ≤ 0. This means that the duality gap, defined in (10.3) as the primal minus the dual objective value, becomes nonpositive. It follows that the dual objective will always be greater than or equal to the primal objective. 10.1.1.4 An optimal solution It is well-known that a linear optimization problem has an optimal solution if and only if there exist feasible primal and dual solutions so that the duality gap is zero, or, equivalently, that the complementarity conditions

124 CHAPTER 10. PROBLEM FORMULATION AND SOLUTIONS<br />

• l x ∈ R n is the lower limit on the activity for the variables.<br />

• u x ∈ R n is the upper limit on the activity for the variables.<br />

A primal solution (x) is (primal) feasible if it satisfies all constraints in (10.1). If (10.1) has at least<br />

one primal feasible solution, then (10.1) is said to be (primal) feasible.<br />

In case (10.1) does not have a feasible solution, the problem is said to be (primal) infeasible .<br />

10.1.1 Duality for linear optimization<br />

Corresponding to the primal problem (10.1), there is a dual problem<br />

maximize (l c ) T s c l − (u c ) T s c u + (l x ) T s x l − (u x ) T s x u + c f<br />

subject to A T y + s x l − s x u = c,<br />

− y + s c l − s c u = 0,<br />

s c l , s c u, s x l , s x u ≥ 0.<br />

(10.2)<br />

If a bound in the primal problem is plus or minus infinity, the corresponding dual variable is fixed at<br />

0, and we use the convention that the product of the bound value and the corresponding dual variable<br />

is 0. E.g.<br />

l x j = −∞ ⇒ (s x l ) j = 0 and l x j · (s x l ) j = 0.<br />

This is equivalent to removing variable (s x l ) j from the dual problem.<br />

A solution<br />

(y, s c l , s c u, s x l , s x u)<br />

to the dual problem is feasible if it satisfies all the constraints in (10.2). If (10.2) has at least one<br />

feasible solution, then (10.2) is (dual) feasible, otherwise the problem is (dual) infeasible.<br />

10.1.1.1 A primal-dual feasible solution<br />

A solution<br />

(x, y, s c l , s c u, s x l , s x u)<br />

is denoted a primal-dual feasible solution, if (x) is a solution to the primal problem (10.1) and<br />

(y, s c l , sc u, s x l , sx u) is a solution to the corresponding dual problem (10.2).<br />

10.1.1.2 <strong>The</strong> duality gap<br />

Let<br />

(x ∗ , y ∗ , (s c l ) ∗ , (s c u) ∗ , (s x l ) ∗ , (s x u) ∗ )

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

Saved successfully!

Ooh no, something went wrong!