Академический Документы
Профессиональный Документы
Культура Документы
OPTIMIZATION
Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.
Chapter 7
OPTIMIZATION
Root finding and optimization are related, both involve guessing and
searching for a point on a function.
Fundamental difference is:
Root finding is searching for zeros of a function or functions
Optimization is finding the minimum or the maximum of a function of several
variables.
Chapter 7
figure PT4.1
Chapter 7
Mathematical Background
An optimization or mathematical programming
problem generally be stated as:
Find x, which minimizes or maximizes f(x) subject to
di ( x) ai
i 1,2,, m *
ei ( x) bi
i 1,2,, p *
Chapter 7
Chapter 7
ONE-DIMENSIONAL
UNCONSTRAINED OPTIMIZATION
In multimodal functions,
both local and global
optima can occur. In
almost all cases, we are
interested in finding the
absolute highest or
lowest value of a
function.
Figure 13.1
Chapter 7
Chapter 7
a)Newtons method
Chapter 7
PROCEDURE OF
GOLDEN-SECTION SEARCH
1. Start with two guesses [xl and xu] that bracket the extremum
point of f(x).
2. Calculate the two interior points x1 and x2 according to the
golden ratios:
5 1
d
( xu xl )
2
x1 xl d
x2 xu d
3. If
f(x1)>f(x2), xl = x2
f(x1)<f(x2), xu = x1
4. Step 2 is repeated until the extremum is found (within the
specified tolerance)
Chapter 7
Example 1
Use the golden section search to find the maximum of
x2
Within the interval x = 0f and
4.sin(
Truexvalue
( x)x
) of this function is
u =2
1.7757.
10
Chapter 7
10
PROCEDURE OF
QUADRATIC METHOD
1. Start with three initial guesses (x0, x1 and x2) that
jointly bracket the extremum point of f(x).
2. Calculate the next point x3:
f ( x0 )(x12 x22 ) f ( x1 )(x22 x02 ) f ( x2 )(x02 x12 )
x3
2 f ( x0 )(x1 x2 ) 2 f ( x1 )(x2 x0 ) 2 f ( x2 )(x0 x1 )
3. If f(x3) > f(x1), x1=x3, x0=x1 and discard x0
if f(x1) > f(x3), x2=x3.
4. Step 2 is repeated until the extremum is found
(within the specified tolerance)
by Lale Yurttas, Texas A&M
University
Chapter 7
11
Example 2
Use quadratic interpolation to approximate the maximum of
Within initial guesses x0 = 0, x1 = 1 and x2 = 4. True
2 value of this
x
function is 1.7757.
f ( x) 2 sin( x)
Chapter 7
10
12
PROCEDURE OF
NEWTONS METHOD
1. Start with one initial guesses (x0)
2. Calculate the next iteration point:
f ( xi )
xi 1 xi
f ( xi )
3. Step 2 is repeated until the extremum is found
(within the specified tolerance)
Chapter 7
13
Example 3
Use Newtons method to find the maximum of
x2
f ( x) 2 sin( x)
10function is 1.7757.
With an initial guesses x0 = 2.5. True value of this
Chapter 7
14
16
c1 x1 to
c2 the
x2 constraint:
cn xn
is to be maximized,Zsubject
a11 x1 a12 x2 a1n xn b1
a21 x1 a22 x2 a2 n xn b2
.
.
With additional constraint:
.
.
.
.
an1 x1 an 2 x2 ann xn bn
xi 0
bi 0
17
18
Example 4
Find the maximum value of P = 10x + 12y subject to the constraints:
x + 2y 12
3x + 2y 24
x 0, y 0
Solve it by using simplex method.
19
Procedures:
1.P = 10x+12y P-10x-12y=0
2.Add slack variable
a. x+2y+S1=12
b. 3x+2y+S2=24
3. Arrange the data in table:
Basic
S1
S2
solution
-10
-12
S1
12
S2
24
integration
Basic
S1
S2
solution
integration
-10
-12
S1
12
S2
24
12
20
REMEMBER!
x and y must
have value.
Cannot be
zero
6. At integration column select positive smallest value (in this case =6)
7. Intercept value need to change to 1 (in this case 2/2)
8. All S1 row value divide by 2
Basic
S1
S2
solution
integration
-10
-12
S1
12
S2
24
12
S1
S2
solution
-4
72
0.5
0.5
S2
-1
12
S1
S2
solution
integration
-4
72
-18
0.5
0.5
12
S2
-1
12
21
S1
S2
solution
96
0.75
-0.25
-0.5
0.5
Answer:
x
22
Z c1 xsubject
cconstraint:
is to be minimized,
the
1 c2 x2 to
n xn
a11 x1 a12 x2 a1n xn b1
a21 x1 a22 x2 a2 n xn b2
.
.
.
.
.
an1 x1 an 2 x2 ann xn bn
xi 0
bi 0
23
Example 5
Find the minimum value of P = 0.12x + 0.15y subject to the constraints:
x + 60y 300
12x + 6y 36
10x + 30y 90
x 0, y 0
60
25
Procedures:
1. Arrange data in table
x
Solution
60
60
300
12
36
10
30
90
0.12
0.15
Objective function
w
solution
60
12
10
0.12
60
30
0.15
300
36
90
New Objective
function
26
P=300u +36v+90w
Constraints:
60u+12v+10w 0.12
60u+6v+30w 0.15
S1
S2
solution
-300
-36
-90
S1
60
12
10
0.12
S2
60
30
0.15
min
12
0.66
0.25
0.025
-0.008333
0.00175
-0.3
-0.05
0.05
0.0015
Regular,
X1
7
Premium, X2
11
Resource
Available
77
10
80
150
175
Chapter 13
28