constrained optimization: direct...

15
Constrained optimization: direct methods Jussi Hakanen Post-doctoral researcher [email protected] spring 2014 TIES483 Nonlinear optimization

Upload: others

Post on 08-Mar-2020

5 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Constrained optimization: direct methodsusers.jyu.fi/~jhaka/opt/TIES483_constrained_direct1.pdfDirect methods Also known as methods of feasible directions Idea –in a point π‘₯β„Ž,

Constrained optimization:

direct methods

Jussi Hakanen

Post-doctoral researcher [email protected]

spring 2014 TIES483 Nonlinear optimization

Page 2: Constrained optimization: direct methodsusers.jyu.fi/~jhaka/opt/TIES483_constrained_direct1.pdfDirect methods Also known as methods of feasible directions Idea –in a point π‘₯β„Ž,

Classification of the methods

Indirect methods: the constrained problem is

converted into a sequence of unconstrained

problems whose solutions will approach to the

solution of the constrained problem, the

intermediate solutions need not to be feasible

Direct methods: the constraints are taking into

account explicitly, intermediate solutions are

feasible

spring 2014 TIES483 Nonlinear optimization

Page 3: Constrained optimization: direct methodsusers.jyu.fi/~jhaka/opt/TIES483_constrained_direct1.pdfDirect methods Also known as methods of feasible directions Idea –in a point π‘₯β„Ž,

Direct methods

Also known as methods of feasible directions

Idea – in a point π‘₯β„Ž, generate a feasible search direction where

objection function value can be improved

– use line search to get π‘₯β„Ž+1

Reminder: A direction 𝑑 ∈ 𝑅𝑛 is a feasible descent direction in π‘₯βˆ— ∈ 𝑆 if there exists π›Όβˆ— > 0 such that 𝑓 π‘₯βˆ— + 𝛼𝑑 < 𝑓 π‘₯βˆ— and π‘₯βˆ— + 𝛼𝑑 ∈ 𝑆 for all 𝛼 ∈ (0, π›Όβˆ—]. Methods differ in – how to choose a feasible direction and

– what is assumed from the constraints (linear/nonlinear, equality/inequality)

spring 2014 TIES483 Nonlinear optimization

Page 4: Constrained optimization: direct methodsusers.jyu.fi/~jhaka/opt/TIES483_constrained_direct1.pdfDirect methods Also known as methods of feasible directions Idea –in a point π‘₯β„Ž,

Algorithm

1) Choose a starting point π‘₯1 and set β„Ž = 1.

2) Determine a feasible direction π‘‘β„Ž such that

for some (small enough) 𝛼 > 0 it holds that

π‘₯β„Ž + π›Όπ‘‘β„Ž ∈ 𝑆 and 𝑓 π‘₯β„Ž + π›Όπ‘‘β„Ž < 𝑓(π‘₯β„Ž).

3) Use line search to find an optimal step length

π›Όβ„Ž > 0 such that π‘₯β„Ž + π›Όβ„Žπ‘‘β„Ž ∈ 𝑆.

4) Test convergence. If not converged, set

π‘₯β„Ž+1 = π‘₯β„Ž + π›Όβ„Žπ‘‘β„Ž , β„Ž = β„Ž + 1 and go to 2).

spring 2014 TIES483 Nonlinear optimization

Page 5: Constrained optimization: direct methodsusers.jyu.fi/~jhaka/opt/TIES483_constrained_direct1.pdfDirect methods Also known as methods of feasible directions Idea –in a point π‘₯β„Ž,

Examples of direct methods

Projected gradient method

Active set method

Sequential Quadratic Programming (SQP)

method

spring 2014 TIES483 Nonlinear optimization

Page 6: Constrained optimization: direct methodsusers.jyu.fi/~jhaka/opt/TIES483_constrained_direct1.pdfDirect methods Also known as methods of feasible directions Idea –in a point π‘₯β„Ž,

Projected gradient method

Consider a problem min 𝑓 π‘₯ 𝑠. 𝑑. 𝐴π‘₯ = 𝑏,

where 𝐴 is an 𝑙 Γ— 𝑛 matrix (𝑙 ≀ 𝑛) and 𝑏 ∈ 𝑅𝑙

– π‘₯βˆ— ∈ 𝑆 if and only if 𝐴π‘₯βˆ— = 𝑏

Direction of the steepest descent is βˆ’π›»π‘“(π‘₯)

– May not be feasible

Idea: project the steepest descent direction

into the feasible region 𝑆

– A projection matrix is needed

spring 2014 TIES483 Nonlinear optimization

Page 7: Constrained optimization: direct methodsusers.jyu.fi/~jhaka/opt/TIES483_constrained_direct1.pdfDirect methods Also known as methods of feasible directions Idea –in a point π‘₯β„Ž,

Projection

Definition: If for an 𝑛 Γ— 𝑛 matrix 𝑃 it holds that

𝑃𝑇 = 𝑃 and 𝑃𝑃 = 𝑃, then 𝑃 is a projection

matrix

Vector 𝑃𝛻𝑓(π‘₯βˆ—) is a projected gradient in π‘₯βˆ—

Matrix 𝑃𝐻 π‘₯βˆ— 𝑃 is a projected Hessian in π‘₯βˆ—

spring 2014 TIES483 Nonlinear optimization

Page 8: Constrained optimization: direct methodsusers.jyu.fi/~jhaka/opt/TIES483_constrained_direct1.pdfDirect methods Also known as methods of feasible directions Idea –in a point π‘₯β„Ž,

Idea

If π‘₯βˆ— ∈ 𝑆, then 𝑑 is a feasible direction in π‘₯βˆ— if

and only if 𝐴𝑑 = 0

π‘₯βˆ— is a local minimizer if and only if for all

feasible directions 𝑑, 𝑑 = 1, there exists

𝛼 > 0 such that 𝑓 π‘₯βˆ— + 𝛼𝑑 β‰₯ 𝑓(π‘₯βˆ—), when

0 < 𝛼 < 𝛼

Find a feasible 𝑑 where 𝑓 improves the most

⟹ minπ‘‘βˆˆπ‘…π‘›

𝛻𝑓 π‘₯βˆ— 𝑇𝑑 𝑠. 𝑑. 𝐴𝑑 = 0, 𝑑 = 1

spring 2014 TIES483 Nonlinear optimization

Page 9: Constrained optimization: direct methodsusers.jyu.fi/~jhaka/opt/TIES483_constrained_direct1.pdfDirect methods Also known as methods of feasible directions Idea –in a point π‘₯β„Ž,

𝐴𝑑 = 0

Let’s consider the constraints 𝐴𝑑 = 0: form a subspace in 𝑅𝑛

Denote by 𝑍 the matrix whose columns span 𝑑 𝐴𝑑 = 0} βŠ‚ 𝑅𝑛 – Each feasible direction can be represented as a

linear combination of the columns of 𝑍, that is, 𝑑 = π‘π‘ž for some π‘ž ∈ π‘…π‘›βˆ’π‘™

𝑍 can be formed e.g. by using 1) elimination method or 2) LQ decomposition (check some book for numerical methods

spring 2014 TIES483 Nonlinear optimization

Page 10: Constrained optimization: direct methodsusers.jyu.fi/~jhaka/opt/TIES483_constrained_direct1.pdfDirect methods Also known as methods of feasible directions Idea –in a point π‘₯β„Ž,

Elimination method

min𝑓 π‘₯ 𝑠. 𝑑. 𝐴π‘₯ = 𝑏 has 𝑙 linear equality constraints – Can be transformed into an unconstrained problem by eliminating 𝑙

variables by using the constraints

Assume that the rows of 𝐴 are linearly independent (otherwise some of the constraints is not needed or there are no feasible solutions) β†’ 𝐴 has 𝑙 linearly independent columns – 𝐴 = (𝐡 𝑁), where 𝐡 ∈ 𝑅𝑙×𝑙 has linearly independent columns

– π‘₯ = π‘₯𝐡, π‘₯𝑁𝑇 , π‘₯𝐡 ∈ 𝑅𝑙 , π‘₯𝑁 ∈ π‘…π‘›βˆ’π‘™

Then 𝐴π‘₯ = 𝐡 𝑁π‘₯𝐡

π‘₯𝑁= 𝐡π‘₯𝐡 + 𝑁π‘₯𝑁 = 𝑏 and further π‘₯𝐡 =

π΅βˆ’1(𝑏 βˆ’ 𝑁π‘₯𝑁) since 𝐡 is nonsingular

Therefore, by choosing π‘₯𝑁 the resulting π‘₯ ∈ 𝑆

Now we can set 𝐴𝑍 = 𝐡 𝑁 𝑍 = 0 so that 𝑍 = βˆ’π΅βˆ’1𝑁𝐼

spring 2014 TIES483 Nonlinear optimization

Page 11: Constrained optimization: direct methodsusers.jyu.fi/~jhaka/opt/TIES483_constrained_direct1.pdfDirect methods Also known as methods of feasible directions Idea –in a point π‘₯β„Ž,

Optimality conditions

Necessary: If π‘₯βˆ— (𝐴π‘₯βˆ— = 𝑏) is a local

minimizer, then

1) 𝑍𝑇𝛻𝑓 π‘₯βˆ— = 0 and

2) matrix 𝑍𝑇𝐻 π‘‹βˆ— 𝑍 is positive semidefinite

Sufficient: If in π‘₯βˆ— (𝐴π‘₯βˆ— = 𝑏)

1) 𝑍𝑇𝛻𝑓 π‘₯βˆ— = 0 and

2) matrix 𝑍𝑇𝐻 π‘₯βˆ— 𝑍 is positive definite,

then π‘₯βˆ— is a local minimizer

spring 2014 TIES483 Nonlinear optimization

Page 12: Constrained optimization: direct methodsusers.jyu.fi/~jhaka/opt/TIES483_constrained_direct1.pdfDirect methods Also known as methods of feasible directions Idea –in a point π‘₯β„Ž,

Using projected gradient

Result: It holds that 𝑍𝑇𝛻𝑓 π‘₯βˆ— = 0 if and only if

there exists Lagrange multiplier vector πœˆβˆ— ∈ 𝑅𝑙

such that 𝛻𝑓 π‘₯βˆ— + 𝐴𝑇 πœˆβˆ— = 0.

So, if 𝑍𝑇𝛻𝑓 π‘₯βˆ— = 0, then π‘₯βˆ— is a local

minimizer. Otherwise, βˆ’π‘π‘‡π›»π‘“ π‘₯βˆ— is a descent

direction.

spring 2014 TIES483 Nonlinear optimization

Page 13: Constrained optimization: direct methodsusers.jyu.fi/~jhaka/opt/TIES483_constrained_direct1.pdfDirect methods Also known as methods of feasible directions Idea –in a point π‘₯β„Ž,

Rosen’s projected gradient method

Feasible direction: π‘‘β„Ž = π‘π‘žβ„Ž for some π‘žβ„Ž ∈ π‘…π‘›βˆ’π‘™

Maximum decrease:

min𝑑𝑇𝛻𝑓 π‘₯β„Ž = min π‘žπ‘‡π‘π‘‡π›»π‘“(π‘₯β„Ž)

If it is required that 𝑑 = 1, then minπ‘ž

π‘žπ‘‡π‘π‘‡π›»π‘“(π‘₯β„Ž)

π‘π‘ž

The solution is π‘žβ„Ž = βˆ’ 𝑍𝑇𝑍 βˆ’1𝑍𝑇𝛻𝑓(π‘₯β„Ž) and we

have π‘‘β„Ž = π‘π‘žβ„Ž = βˆ’π‘ 𝑍𝑇𝑍 βˆ’1𝑍𝑇𝛻𝑓(π‘₯β„Ž)

𝑃 = 𝑍 𝑍𝑇𝑍 βˆ’1𝑍𝑇

spring 2014 TIES483 Nonlinear optimization

Page 14: Constrained optimization: direct methodsusers.jyu.fi/~jhaka/opt/TIES483_constrained_direct1.pdfDirect methods Also known as methods of feasible directions Idea –in a point π‘₯β„Ž,

Algorithm

1) Choose a starting point π‘₯1. Determine 𝑍 and set

β„Ž = 1. Compute 𝑃 = 𝑍 𝑍𝑇𝑍 βˆ’1𝑍𝑇.

2) Compute direction π‘‘β„Ž = βˆ’π‘ƒπ›»π‘“ π‘₯β„Ž 𝑇.

3) If π‘‘β„Ž = 0, stop. Otherwise, find

π›Όπ‘šπ‘Žπ‘₯ = max 𝛼 | π‘₯β„Ž + π›Όπ‘‘β„Ž ∈ 𝑆 and solve

min𝑓 π‘₯β„Ž + π›Όπ‘‘β„Ž 𝑠. 𝑑. 0 ≀ 𝛼 ≀ π›Όπ‘šπ‘Žπ‘₯ .

Let the solution be π›Όβ„Ž. Set π‘₯β„Ž+1 = π‘₯β„Ž + π›Όβ„Žπ‘‘β„Ž, β„Ž = β„Ž +

1 and go to 2).

spring 2014 TIES483 Nonlinear optimization

Page 15: Constrained optimization: direct methodsusers.jyu.fi/~jhaka/opt/TIES483_constrained_direct1.pdfDirect methods Also known as methods of feasible directions Idea –in a point π‘₯β„Ž,

Note

If there are both linear equality and inequality constraints, the projection matrix does not remain the same – At each iteration, it includes only the equality and active

inequality constraints

𝑃 = 𝑍 𝑍𝑇𝑍 βˆ’1𝑍𝑇 = 𝐼 βˆ’ 𝐴𝑇 𝐴𝐴𝑇 βˆ’1𝐴 – 𝑍 is not necessarily needed

– In bigger problems, 𝑍 is more convenient since it is smaller than 𝐴

If minπ‘ž

π‘žπ‘‡π‘π‘‡π›»π‘“(π‘₯β„Ž)

π‘ž then π‘‘β„Ž = βˆ’π‘π‘π‘‡π›»π‘“(π‘₯β„Ž), 𝑃 = 𝑍𝑍𝑇

Convergence is quite low since the second derivatives are not taken into account

spring 2014 TIES483 Nonlinear optimization