Constrained Optimization: Class Notes On: Mathematical Foundations in Engineering, ECEG 6209
Constrained Optimization: Class Notes On: Mathematical Foundations in Engineering, ECEG 6209
Chapter 8
Constrained Optimization
1 / 19
Equality Constraint
Equality and Inequality Constraints
Algorithms
Outline
1 Equality Constraint
Solution by Direct Substitution
Solution by the Method of Lagrange Multipliers
3 Algorithms
2 / 19
Equality Constraint
Equality and Inequality Constraints
Algorithms
Constrained optimization
This lecture considers constrained optimization
Constrained optimization
min f (x )
x ∈Rn
subject to :
ci (x ) = 0, i = 1, . . . , ne
dj (x ) ≤ 0, j = 1, . . . , ni
Equality constraint functions: ci : Rn → R
Inequality constraint functions: dj : Rn → R
Feasible set: D = {x ∈ Rn | ci (x ) = 0, dj (x ) ≤ 0, i =
1, . . . , ne , j = 1, . . . , ni }
We continue to assume all functions are twice-continuously
differentiable.
3 / 19
Equality Constraint
Solution by Direct Substitution
Equality and Inequality Constraints
Solution by the Method of Lagrange Multipliers
Algorithms
Solution methods
min f (x )
x ∈Rn
subject to :
ci (x ) = 0, i = 1, . . . , ne
4 / 19
Equality Constraint
Solution by Direct Substitution
Equality and Inequality Constraints
Solution by the Method of Lagrange Multipliers
Algorithms
5 / 19
Equality Constraint
Solution by Direct Substitution
Equality and Inequality Constraints
Solution by the Method of Lagrange Multipliers
Algorithms
6 / 19
Equality Constraint
Solution by Direct Substitution
Equality and Inequality Constraints
Solution by the Method of Lagrange Multipliers
Algorithms
7 / 19
Equality Constraint
Solution by Direct Substitution
Equality and Inequality Constraints
Solution by the Method of Lagrange Multipliers
Algorithms
8
fmax = √
3 3
.
To find whether the solution found corresponds to a maximum
or a minimum, compute the Hessian H(x1∗ , x2∗ ) of f :
√ √ !
−32/√3 −16/√3
H=
−16/ 3 −32/ 3
Lagrange Multipliers
9 / 19
Equality Constraint
Solution by Direct Substitution
Equality and Inequality Constraints
Solution by the Method of Lagrange Multipliers
Algorithms
Lagrange Multipliers..
max(min)f (x ) s.t. ci (x ) = 0, i = 1, . . . , ne
Lagrange Multipliers..
Lagrange Multipliers
Theorem: Assume x ∗ = (x1∗ , x2∗ , . . . , xn∗ ) maximizes or minimizes
f (x ) subject to ci (x ) = 0, for i = 1, . . . , ne . Then there exists a
vector λ∗ = (λ∗1 , . . . , λ∗ne ) such that ∇L(x ∗ , λ∗ ) = 0. i.e.,
∂L(x ∗ , λ∗ ) ∂L(x ∗ , λ∗ )
= ··· = =0
∂x1 ∂xn
and
∂L(x ∗ , λ∗ ) ∂L(x ∗ , λ∗ )
= ··· = =0
∂λ1 ∂λne
11 / 19
Equality Constraint
Solution by Direct Substitution
Equality and Inequality Constraints
Solution by the Method of Lagrange Multipliers
Algorithms
Lagrange Multipliers..
Example:
min f = 2x12 + x22 s.t. x1 + x2 = 1
Solution:
∂L(x ∗ , λ∗ )
∇L = 0 ⇒ = 4x1∗ − λ∗1 = 0
∂x1
∂L(x ∗ , λ∗ )
= 2x2∗ − λ∗1 = 0
∂x2
∂L(x ∗ , λ∗ )
= 1 − x1∗ − x2∗ = 0
∂λ
which gives x1∗ = 1/3, x2∗ = 2/3 and λ = 4/3, with function value
2/3.
12 / 19
Equality Constraint
Solution by Direct Substitution
Equality and Inequality Constraints
Solution by the Method of Lagrange Multipliers
Algorithms
Lagrange Multipliers..
!
4 0
Since f (x1 , x2 ) is convex (its Hessian matrix H(x1 , x2 ) = is
0 2
positive definite) and c(x1 , x2 ) = x1 + x2 is a linear function, the
above solution minimizes f (x1 , x2 ) subject to the constraint.J
Exercise: Suppose we have a refinery that must ship finished
goods to some storage tanks. Suppose further that there are
two pipelines, A and B, to do the shipping. The cost of
shipping x units on A is ax 2 ; the cost of shipping y units on B
is by 2 , where a > 0 and b > 0 are given. How can we ship Q
abQ 2
units while minimizing cost? Ans. min cost
a+b
13 / 19
Equality Constraint
Equality and Inequality Constraints
Algorithms
Consider:
min f (x )
x ∈Rn
subject to :
ci (x ) = 0, i = 1, . . . , ne
dj (x ) ≤ 0, j = 1, . . . , ni
dj (x ) + sj2 = 0, j = 1, . . . , ni
14 / 19
Equality Constraint
Equality and Inequality Constraints
Algorithms
min f (x )
x ∈Rn
subject to :
ci (x ) = 0, i = 1, . . . , ne
dj (x ) + sj2 = 0, j = 1, . . . , ni
15 / 19
Equality Constraint
Equality and Inequality Constraints
Algorithms
ne
X ni
X
∇f (x ) + λi ∇ci (x ) + µj ∇dj (x ) = 0
i=1 j=1
ci (x ) = 0
dj + sj2 = 0
µj s j = 0 (switching conditions)
16 / 19
Equality Constraint
Equality and Inequality Constraints
Algorithms
L = x 3 − 3x + µ(x − 1 + s 2 )
17 / 19
Equality Constraint
Equality and Inequality Constraints
Algorithms
3x 2 − 3 + µ = 0,
x − 2 + s 2 = 0,
2µs = 0
18 / 19
Equality Constraint
Equality and Inequality Constraints
Algorithms
19 / 19