Top Banner
Optimization Algorithms in MATLAB Maria G Villarreal ISE Department The Ohio State University February 03, 2011
18

Optimization Algorithms in MATLAB

Apr 14, 2015

Download

Documents

Youn Seok Choi

Optimization_Algorithms_in_MATLAB
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Optimization Algorithms in MATLAB

Optimization Algorithms in MATLAB

Maria G VillarrealISE Department

The Ohio State University

February 03, 2011

Page 2: Optimization Algorithms in MATLAB

OutlineOutline

• Problem Description

O i i i bl h b l i• Optimization Problem that can be solve in MATLAB

• Optimization Toolbox solvers

• Non Linear Optimization

• Multobjective OptimizationMultobjective Optimization

2

Page 3: Optimization Algorithms in MATLAB

Problem DescriptionProblem Description

• Objective:– Determine the values of the controllable process variables (factors)

that improve the output of a process (or system).• Facts:

Have a computer simulator (input/output black box) to represent the– Have a computer simulator (input/output black‐box) to represent theoutput of a process (or system).

– The simulation program takes very long time to run.• Procedure:Procedure:

– Evaluate a set (usually small) of input combination (DOE) into thecomputer code and obtain an output value for each one.

– Construct a mathematical model to relate inputs and outputs, which isi d f t t l t th th t l t deasier and faster to evaluate then the actual computer code.

– Use this model (metamodel), and via an optimization algorithmobtained the values of the controllable variables (inputs/factors) thatoptimize a particular output (s).

3

Page 4: Optimization Algorithms in MATLAB

Optimization Problem that can be solve in ( i i i lb )MATLAB (Optimization Toolbox)

• Constrained and Unconstrained continuesConstrained and Unconstrained continues and discrete– Linear– Linear

– Quadratic

Binary Integer– Binary Integer

– Nonlinear

M lti bj ti P bl– Multiobjective Problems

4

Page 5: Optimization Algorithms in MATLAB

Optimization Toolbox solversOptimization Toolbox solvers

• MinimizersMinimizersThis group of solversattempts to find a localminimum of the objectivefunction near a startingpoint x0.p 0

If h Gl b l O ti i ti T lbIf you have a Global Optimization Toolboxlicense, use the GlobalSearch orMultiStart solvers. These solversautomatically generate random start

i t ithi b d

5

points within bounds.

Page 6: Optimization Algorithms in MATLAB

Optimization Toolbox solversOptimization Toolbox solvers

• Multiobjective minimizersMultiobjective minimizersThis group of solvers attempts to either minimize themaximum value of a set of functions (fminimax), or to find alocation where a collection of functions is below someprespecified values (fgoalattain).

6

Page 7: Optimization Algorithms in MATLAB

Non Linear OptimizationNon Linear Optimization

7

Page 8: Optimization Algorithms in MATLAB

Rastrigin's functionRastrigin s function

8[Global Optimization Toolbox Guide]

Page 9: Optimization Algorithms in MATLAB

General Search AlgorithmGeneral Search Algorithm

Move from point x(k) to x(k+1)=x(k)+∆x(k), where ∆x(k)p ,=αkd(k), such that f(x(k+1))<f(x(k)).d(k) is a “desirable” search direction and,αk is called the step size.

T fi d ∆ (k) d t l t b blTo find ∆x(k) we need to solve to subproblems, oneto find d(k) and one for αk.

These iterative procedures (techniques) are oftencalled “direction methods”.

9

Page 10: Optimization Algorithms in MATLAB

General StepsGeneral Steps

1 Estimate a reasonable initial point x(0) Set1. Estimate a reasonable initial point x . Set k=0 (iteration counter).

2 Compute a direction search d(k)2. Compute a direction search d(k)

3. Check convergence.

4. Calculate step size αk in the direction d(k).

5. Update x(k+1)=x(k)+αkd(k)p k

6. Go to step 2.

10

Page 11: Optimization Algorithms in MATLAB

Algorithms to compute h (d)Search Direction (d)

• Steepest Descent Method (Gradient method)Steepest Descent Method (Gradient method)• Conjugate Gradient Method• Newton’s Method (Uses second order partial• Newton s Method (Uses second order partial derivative information)

• Quasi‐Newton Methods (Approximates HessianQuasi‐Newton Methods (Approximates Hessian matrix and its inverse using first order derivative) – DFP Method (Approximates the inverse of the et od ( pp o a es e e se o eHessian)

– BFGS Method (Approximates Hessian matrix)

11

Page 12: Optimization Algorithms in MATLAB

Steepest Descent MethodSteepest Descent Method

12

Page 13: Optimization Algorithms in MATLAB

Newton’s MethodNewton s Method

1. Estimate starting point x(0). Set k=0 2. Calculate c(k)(gradient of f(x) at x(k))3. Check convergence (if ||c(k)||<ε, stop)4. Calculate the Hessian matrix at x(k), H(k).5. Calculate the direction search as d(k) = ‐[H(k)]‐1c(k) . Use another 

algorithm to compute αk .6. Update x(k+1)=x(k)+αkd(k) . 7. Set k=k+1 and go to step 2.

Drawbacks:• Needs to calculate second order derivatives.• H needs to be positive definite to assure a decent direction• H may be singular at some point.

13

Page 14: Optimization Algorithms in MATLAB

Quasi‐Newton’s Methodh d ( d )BFGS Method (Used in MALTAB)

14[Arora, J. (2004), Introduction to Optimum Design, 2nd Ed, page. 327]

Page 15: Optimization Algorithms in MATLAB

Method to calculate step size( d k )(assuming d is known)

• Equal interval search

G ld S h• Golden Search

• Polynomial Interpolation

• Inaccurate Line Search 

15

Page 16: Optimization Algorithms in MATLAB

Optimization toolbox for Non Linear Optimization

• Solvers:– fmincon (constrained nonlinear minimization)

• Trust‐region‐reflective (default)– Allows only bounds or linear equality constraints, but not both.

• Active‐set (solve Karush‐Kuhn‐Tucker (KKT) equations and used quasi‐Netwonmethod to approximate the hessian matrix)

• Interior‐point• Sequential Quadratic Programming (SQP)

– fminunc (unconstrained nonlinear minimization)fminunc (unconstrained nonlinear minimization)• Large‐Scale Problem: Trust‐region method based on the interior‐reflective

Newton method• Medium–Scale: BFGS Quasi‐Newton method with a cubic line search

procedure.p– fminsearch (unconstrained multivariable optimization, nonsmooth

functions)• Nelder‐Mead simplex (derivative‐free method)

16

Page 17: Optimization Algorithms in MATLAB

Multiobjective OptimizationMultiobjective Optimization

• Solvers:Solvers:– fminmax (minimize the maximum value of a set of functions )functions ).

– fgoalattain (find a location where a collection of functions are below some prespecified values).functions are below some prespecified values).

17

Page 18: Optimization Algorithms in MATLAB

Choosing a Solver( bl )(Optimization Decision Table)

18[Optimization Toolbox Guide]