Constrained Optimization - Algorithms Computer Science and Automation Indian Institute of Science Bangalore 560 012, India. NPTEL Course on
Consider the problem: Barrier and Penalty Methods x X where X R n. Idea: Approximation by an unconstrained problem Solve a sequence of unconstrained optimization problems Penalty Methods Penalize for violating a constraint Barrier Methods Penalize for reaching the boundary of an inequality constraint
x X Define a function, ψ(x) = { 0 if x X + if x / X Solve an equivalent unconstrained problem: Not a practical approach + ψ(x) Replace ψ(x) by a sequence of continuous non-negative functions that approach ψ(x)
Penalty Methods x X Let x be a local imum Let X = {h j (x) 0, j = 1,..., l} Define P(x) = 1 l [max(0, h j (x)] 2 2 j=1 Define q(x, c) = + cp(x) Define a sequence {c k } such that c k 0 and c k+1 > c k k. Let x k = arg x q(x, c k ) Ideally, {x k } x as {c k } +
Nonlinear Program (NLP) h j (x) 0, j = 1,..., l e i (x) = 0, i = 1,..., m Define P(x) = 1 2 l [max(0, h j (x)] 2 + 1 2 j=1 m e 2 i (x) i=1 and q(x, c) = + cp(x). Assumption: f, h j s and e i s are sufficiently smooth
Lemma If x k = arg x q(x, c k ) and c k+1 > c k, then Proof. q(x k, c k ) q(x k+1, c k+1 ) P(x k ) P(x k+1 ) f (x k ) f (x k+1 ). q(x k+1, c k+1 ) = f (x k+1 ) + c k+1 P(x k+1 ) f (x k+1 ) + c k P(x k+1 ) f (x k ) + c k P(x k ) = q(x k, c k ) Also, f (x k ) + c k P(x k ) f (x k+1 ) + c k P(x k+1 )... (1) f (x k+1 ) + c k+1 P(x k+1 ) f (x k ) + c k+1 P(x k ).... (2) Adding (1) and (2), we get P(x k ) P(x k+1 ). f (x k+1 ) + c k P(x k+1 ) f (x k ) + c k P(x k ) f (x k+1 ) f (x k )
Lemma Let x be a solution to the problem, x X.... (P1) Then, for each k, f (x k ) f (x ). Proof. f (x k ) f (x k ) + c k P(x k ) f (x ) + c k P(x ) = f (x ) Theorem Any limit point of the sequence, {x k } generated by the penalty method is a solution to the problem (P1).
Nonlinear Program (NLP) h j (x) 0, j = 1,..., l e i (x) = 0, i = 1,..., m Penalty Function Method (to solve NLP) (1) Input: {c k } k=0, ɛ (2) Set k := 0, initialize x k (3) while (q(x k, c k ) f (x k )) > ɛ (a) x k+1 = arg x q(x, c k ) (b) k := k + 1 endwhile Output : x = x k
Example: x = (1, 0) T 1[(x 2 1 3) 2 + (x 2 2) 2 ] x 1 + x 2 0 x 1 + x 2 1 x 2 0
1[(x 2 1 3) 2 + (x 2 2) 2 ] x 1 + x 2 0 x 1 + x 2 1 x 2 0 q(x, c) = 1 2 [(x 1 3) 2 + (x 2 2) 2 ] + c 2 [(max(0, x 1 + x 2 )) 2 +(max(0, x 1 + x 2 1)) 2 + (max(0, x 2 )) 2 ] Let x 0 = (3, 2) T (Violates the constraint x 1 + x 2 1 ) At x 0, q(x, c) = 1 2 [(x 1 3) 2 + (x 2 2) 2 ] + c 2 [(x 1 + x 2 1) 2 ]. ) x q(x, c) = 0 x 1 (c) = = x (c) ( 2c+3 2c+1 2 2c+1
1[(x 2 1 3) 2 + (x 2 2) 2 ] x 1 + x 2 0 x 1 + x 2 1 x 2 0 At x 0 = (3, 2) T, q(x, c) = 1 2 [(x 1 3) 2 + (x 2 2) 2 ] + c 2 [(x 1 + x 2 1) 2 ]. x q(x, c) = 0 x 1 (c) = ( 2c+3 2c+1 2 2c+1 Taking limit as c, x = (1, 0) T ) = x (c)
Consider the problem, e(x) = 0 Let (x, µ ) be a KKT point ( f (x ) + µ e(x ) = 0) Penalty Function: q(x, c) = + cp(x) As c, q(x, c) = Consider the perturbed problem, and the penalty function, ˆq(x, c) = + c(e(x) θ) 2 e(x) = θ = 2cθe(x) + ce(x) 2 (ignoring constant term) = + µe(x) +ce(x) 2 }{{} L(x,µ) = ˆL(x, µ, c) (Augmented Lagrangian Function)
At (x, µ ), x L(x, µ ) = f (x ) + µ e(x ) = 0. x ˆq(x, c) = x ˆL(x, µ, c) = x L(x, µ ) + 2ce(x ) e(x ) = 0 c Q. How to get an estimate of µ? Let x c be a imizer of L(x, µ, c). Therefore, x L(x c, µ, c) = f (x c) + µ e(x c) + ce(x c) e(x c) = 0 f (x c) = (µ + ce(x }{{ c)) e(x } c) estimate of µ
Program (EP) e(x) = 0 Augmented Lagrangian Method (to solve EP) (1) Input: c, ɛ (2) Set k := 0, initialize x k, µ k (3) while ( ˆL(x k, µ k, c) f (x k )) > ɛ (a) x k+1 = arg x ˆL(x k, µ k, c) (b) µ k+1 = µ k + ce(x k ) (c) k := k + 1 endwhile Output : x = x k
Nonlinear Program (NLP) h j (x) 0, j = 1,..., l e i (x) = 0, i = 1,..., m Easy to extend the Augmented Lagrangian Method to NLP Rewrite the inequality constraint, h(x) 0 as an equality constraint, h(x) + y 2 = 0
Barrier Methods Typically applicable to inequality constrained problems h j (x) 0, j = 1,..., l Let X = {x : h j (x) 0, j = 1,..., l} Some Barrier functions (defined on the interior of X) B(x) = l j=1 1 h j (x) or B(x) = l j=1 log( h j (x)) Approximate problem using Barrier function (for c > 0) + 1 c B(x) x Interior of X
Primal Problem Cutting-Plane Methods Dual Problem h j (x) 0, j = 1,..., l e i (x) = 0, i = 1,..., m x X X is a compact set. Dual Function: z = θ(λ, µ) = x X Equivalent Dual problem max z,µ,λ z max θ(λ, µ) λ 0 + λ T h(x) + µ T e(x) z + λ T h(x) + µ T e(x), x X λ 0 Linear Program with infinite constraints
Equivalent Dual problem max z,µ,λ z z + λ T h(x) + µ T e(x), x X λ 0 Idea: Solve an approximate dual problem. Suppose we know {x j } k 1 j=0 such that z + λ T h(x) + µ T e(x), x {x 0,..., x k 1 } Approximate Dual Problem max z,µ,λ z + λ T h(x) + µ T e(x), x {x 0,..., x k 1 } z λ 0 Let (z k, λ k, µ k ) be the optimal solution to this problem.
Approximate Dual Problem max z,µ,λ z + λ T h(x) + µ T e(x), x {x 0,..., x k 1 } z λ 0 If z k + λ kt h(x) + µ kt e(x) x X, then (z k, λ k, µ k ) is the solution to the dual problem. Q. How to check if z k + λ kt h(x) + µ kt e(x) x X? Consider the problem, + λ kt h(x) + µ kt e(x) x X and let x k be an optimal solution to this problem.
+ λ kt h(x) + µ kt e(x) x X and let x k be an optimal solution to this problem. If z k f (x k ) + λ kt h(x k ) + µ kt e(x k ), then (λ k, µ k ) is an optimal solution to the Lagrangian dual problem. If z k > f (x k ) + λ kt h(x k ) + µ kt e(x k ), then add the constraint, z f (x k ) + λ T h(x k ) + µ T e(x k ) to the approximate dual problem.
Nonlinear Program (NLP) h j (x) 0, j = 1,..., l e i (x) = 0, i = 1,..., m x X Summary of steps for Cutting-Plane Method: Initialize with a feasible point x 0 while stopping condition is not satisfied (z k, λ k, µ k ) = argmax z,λ,µ z z f (x j ) + λ T h(x j ) + µ T e(x j ), j = 0,..., k 1 λ 0 x k = arg x + λ kt h(x) + µ kt e(x) x X Stop if z k f (x k ) + λ kt h(x k ) + µ kt e(x k ). Else, k := k + 1.