Lecture4 Quadratic Programming QP
Lecture4 Quadratic Programming QP
PPGEQ – UFRGS
Prof. Jorge Otávio Trierweiler
logo
Outline
1 Introduction
2 QP Methods
Equality Constrained QP
General QP
3 Final Remarks
logo
Basic Concepts
Quadratic Programming
1 T
minimize x Hx + c T x
f (x) :
x 2
subject to h(x) : Ax = b
g(x) : Cx ≤ d
where:
f (x): quadratic objective function
h(x): linear equality constraints
g(x): linear inequality constraints
Basic Concepts
x*
x*
The solution can be either inside the feasible region or at the border, It
is not a vertex point!
logo
Equality Constrained QP
minimize x T Hx + c T x
x
subject to Ax = b
H: symetric matrix n × n
A: a matrix m × n
x: a vector n × 1
Equality Constrained QP
Lagrangean Function:
1 T
L(x, λ) = x Hx + x T c + (Ax − b)T λ
2
First order necessary conditions (KKT):
∇x L(x, λ) = 0 ∇λ L(x, λ) = 0
logo
Equality Constrained QP
KKT System
H AT x
−c
=
A 0 λ b
H AT d
−c − Hxk
=
A 0 λ b − Axk
where xk+1 = xk + d
Note: The system is called KKT system and the matrix of coefficients
is the KKT Matrix.! logo
Equality Constrained QP
Equality Constrained QP
Equality Constrained QP
Range-Space Method
Solve this symetric system for λ∗ and recover d from the first equation:
Hd = −AT λ∗ − (Hxk + c)
Equality Constrained QP
Null-Space Method
Suppose that we partition the vector d into two components:
d = YdY + ZdZ
where Z is the n ×
(n − m) null-space matrix (AZ = 0), and Y is any n × m
matrix such that Y | Z is nonsingular. By substituting d into the second
equation of the KKT system:
AYdY = −(Axk − b)
From the first equation:
HYdY + HZdZ + AT λ = −(Hxk + c)
multiplty this equation by Z T to obtain:
Equality Constrained QP
T
dY = 3, 0 dZ = 0
so that T
d = YdY + ZdZ = 2, −1, 1
After recovering λ and x:
T T
x ∗ = 2, −1, 1 λ∗ = 3, −2
logo
Equality Constrained QP
AZ = 0
QR Factorization:
AT = Q1
Q2 R
where Q1 is n × m and Q2 is n × (n − m)
Z = Q2 logo
General QP
Quadratic Programming:
1
minimize cT x + xT H x
x 2
subject to Cx = d
Ax ≤ b
General QP
Quadratic Programming:
1
minimize cT x + xT H x
x 2
subject to Cx = d
Aj x = bj , j ∈ A(x ∗ )
Lagrangean Function:
1
L(x, λ, µ) = c T x + x T H x + λ(Cx − d) + µ(AA x − bA )
2
Note: A(x ∗ ) is the active set at the optimal point x ∗ which is unknown
in advance! logo
General QP
QP Subproblem
For a given point xk and the working set Wk solve the KKT system:
H C T AT
j dx −Hxk − c
C 0 0 λ = d − Cxk
Aj 0 0 µ b j − A j xk logo
General QP
Line Search
Suppose that dx is nonzero:
xk+1 = xk + αk dx αk ∈ (0, 1]
ajT (xk + αk dx ) ≤ bj , ∀j ∈
/ Wk
This constraint will be satisfied for all nonengative choices of αk only if:
bj − ajT xk
αk ≤
ajT dx
Note: Blocking constraint(s) for which αk is defined must be added to the logo
General QP
4. Set k = k + 1 and Go to 2
Prof. Marcelo Escobar Optimization of Chemical Processes
Introduction QP Methods Final Remarks
General QP
Suppose that we choose x0 = (2, 0). Constraints 3 and 5 are active at this
point, and we set W0 = 3, 5 .
Note: We could have chosen W0 = 3 , or W0 = 5 or even W0 = ∅, each logo
would lead the algorithm to perform quite different.
Prof. Marcelo Escobar Optimization of Chemical Processes
Introduction QP Methods Final Remarks
General QP
General QP
Suppose that we choose x0 = (−1, 0). Constraints 3 and 4 are active at this
point, and we set W0 = 3, 4 .
logo
General QP
General QP
logo
Final Remarks
Final Remarks
Final Remarks
Further Readings
logo
Final Remarks
logo
quit