12 OD Nonlinear Programming B-2008-2
12 OD Nonlinear Programming B-2008-2
Necessary conditions
for optimality
Problem
Karush-Kuhn-Tucker conditions
One-variable unconstrained
df
=0
dt
f (x) concave
Multivariable unconstrained
f
= 0, j = 1,2, , n
xi
f (x) concave
Constrained, nonnegative
constraints only
f
= 0, j = 1,2, , n
xi
(or 0, if x j = 0)
f (x) concave
Karush-Kuhn-Tucker conditions
1.
2.
convex ( j = 1, 2,..., n)
396
Karush-Kuhn-Tucker conditions
3.
4.
5.
6.
for j = 1,2, , m.
ui [ gi ( x ) bi ] = 0
x *j 0, for j = 1,2, , n.
ui 0, for j = 1,2, , m.
397
398
Karush-Kuhn-Tucker conditions
399
Example
Maximize f ( x ) = ln( x1 + 1) + x2
subject to
2x 1 + x 2 3
and
x1 0, x2 0
*
at x = x , for j = 1,2 , n.
m
f
gi
*
xj
ui
=0
x i =1 x
j
j
Karush-Kuhn-Tucker conditions
gi ( x * ) bi 0
m
f
g
ui i 0
x j i =1 x j
401
2u1 = 0
2. (j = 1) x1
x1 + 1
1. (j = 1)
3.
4.
5.
6.
(j = 2) 1 u1 0
(j = 2) x2 (1 u1 ) = 0
Therefore,
2x 1 + x 2 3 0
u1(2x1 + x 2 3) = 0
x1 0, x2 0
u1 0
1
2u1 < 0.
x1 + 1
402
Quadratic Programming
Example
Maximize f ( x ) = 15x1 + 30x2 + 4 x1 x2 2x12 4 x 22
subject to
x1 + 2x2 30, and x1 0, x2 0
1
Maximize f ( x ) = cx xT Qx
2
subject to
Ax b , and x 0
c = [15 30]
x
x = 1
x2
A = [1 2]
Joo Miguel da Costa Sousa / Alexandra Moutinho
404
Solving QP problems
4 4
Q=
4 8
b = [30]
405
Solving QP problems
403
406
407
Solving QP problems
Solving QP problems
4x1-4x2+u1-y1 = 15
-4x1+8x2+2u1-y2 = 30
x1+2x2+v1=30
x10, x20, u10, y10, y20, v10
x1 y1 + x2 y2 + u1 v1 =0
1. (j = 1) -4x1+4x2-u1+y1 = -15
(j = 2) x1 y1 = 0
2. (j = 1) 4x1-8x2-2u1+y2 = -30
(j = 2) x2 y2 = 0
3. x1+2x2+v1=30
4. u1 v1 = 0
y=ccT
Qx+A
Qx ATu-y
Ax+v
b
Ax v=b
x 0, u 0, y 0, v 0
xTy+u
uTv=0
1 (j=2)+2 (j=2)+4. x1 y1 + x2 y2 + u1 v1 =0
Joo Miguel da Costa Sousa / Alexandra Moutinho
linear
programming
constraints
408
Solving QP problems
409
Separable Programming
410
Example
f (x) = f j (x j )
j =1
Example
412
413
Convex Programming
Frank-Wolfe algorithm
f ( x ) f ( x ) +
j =1
f ( x)
( x j x j ) = f ( x) + f ( x)( x x)
x j
g( x ) = f ( x )x = c j x j , where c j =
j =1
f ( x )
at x = x.
x j
414
Frank-Wolfe algorithm
415
Maximize g (x) = c j x j ,
j =1
subject to
Ax b and x 0
Joo Miguel da Costa Sousa / Alexandra Moutinho
416
Example
Maximize f ( x) = 5 x1 x12 + 8 x2 2 x22
subject to
3x1 + 2 x2 6, and
417
As
f
= 5 2 x1 ,
x1
x1 0, x2 0
f
= 8 4 x2
x2
418
419
Example (2)
Example (3)
dh(t )
= 24 36t = 0
dt
420
Example (4)
421
Example (5)
Figure shows next iterations.
Note that trial solutions alternate between two
trajectories that intersect at point x = (1, 1.5).
This is the optimal solution (satisfies KKT conditions).
Using quadratic instead of linear approximations lead
to a much faster convergence.
422
SUMT
B ( x) =
Maximize P( x; r ) = f ( x) rB( x)
i =1
423
424
n
1
1
+
bi gi (x) j =1 x j
425
Summary of SUMT
Summary of SUMT
g
(
x
)
x
j =1 j
i
i =1 i
426
Example
427
Example (2)
Maximize f ( x) = x1 x2
subject to
x12 + x2 3, and
x1 0, x2 0
1
1 1
P (x; r ) = x1 x2 r
+ +
2
3 x1 x2 x1 x2
428
Nonconvex Programming
x 1 ( k)
x 2 ( k)
0.90
1.36
102
0.987
1.925
104
0.998
1.993
429
Nonconvex Programming
430
431