Professional Documents
Culture Documents
Chapter 7: Optimization
Uchechukwu Ofoegbu
Temple University
Chapter 7:
Optimization
ES 240: Scientific and Engineering Computation. Chapter 7: Optimization
Optimization
Definition:
– the process of making a system as effective as possible.
– mathematically, optimization involves finding the maxima
and minima of a function that depends on one or more
variables.
ES 240: Scientific and Engineering Computation. Chapter 7: Optimization
Multidimensional Optimization
Global Optimum:
– the best solution for the entire domain
Local Optimum
– better solution amongst immediate neighbors.
– Cases that include local optima are called multimodal.
It’s most effective to find the global optimum
ES 240: Scientific and Engineering Computation. Chapter 7: Optimization
Golden-Section Search
Function:
– Search algorithm for finding a minimum on an interval [xl xu] with a single
minimum (unimodal interval)
Golden Ratio
– the ratio between the sum of two values and the larger value is the same
as the ratio of the larger to the smaller.
ab a 1 5
a b 2
– The golden search algorithm uses the golden ratio =1.6180339887 to
determine location of two interior points x1 and x2;
– by using the golden ratio, one of the interior points can be re-used in the
next iteration.
ES 240: Scientific and Engineering Computation. Chapter 7: Optimization
d ( 1)( xu xl )
x1 xl d
x2 xu d
f ( x) 1.5 x 6 2 x 4 12 x
Start at [0, 2]
ES 240: Scientific and Engineering Computation. Chapter 7: Optimization
Parabolic Interpolation
fminbnd Example
Start at [0, 2]
ES 240: Scientific and Engineering Computation. Chapter 7: Optimization
Multidimensional Visualization
Example: f(x,y)=2+x-y+2x2+2xy+y2
Between -0.5 and 0.5
ES 240: Scientific and Engineering Computation. Chapter 7: Optimization
fminsearch Function
fminsearch Example
To minimize f(x,y)=2+x-y+2x2+2xy+y2
– rewrite as f(x1, x2)=2+x1-x2+2(x1)2+2x1x2+(x2)2
– f=@(x) 2+x(1)-x(2)+2*x(1)^2+2*x(1)*x(2)+x(2)^2
– [x, fval] = fminsearch(f, [-0.5, 0.5])
Lab
Ex 7.6 using Matlab
Ex 7.5
Review
Ex 5.16
Ex 6.3
HW
5.6, 5.9, 5.17, 6.4, 6.5, 7.7, 7.8, 7.9