Вы находитесь на странице: 1из 28

Chapter 7

OPTIMIZATION
Copyright The McGraw-Hill Companies, Inc. Permission required for reproduction or display.

by Lale Yurttas, Texas A&M


University

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.

by Lale Yurttas, Texas A&M


University

Chapter 7

figure PT4.1

by Lale Yurttas, Texas A&M


University

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 *

Where x is an n-dimensional design vector, f(x) is


the objective function, di(x) are inequality
constraints, ei(x) are equality constraints, and ai
and bi are constants
by Lale Yurttas, Texas A&M
University

Chapter 7

Optimization problems can be classified on the basis of the form of f(x):


If f(x) and the constraints are linear, we have linear programming.
If f(x) is quadratic and the constraints are linear, we have quadratic programming.
If f(x) is not linear or quadratic and/or the constraints are nonlinear, we have
nonlinear programming.

When equations(*) are included, we have a constrained optimization


problem; otherwise, it is unconstrained optimization problem.

by Lale Yurttas, Texas A&M


University

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.

by Lale Yurttas, Texas A&M


University

Figure 13.1

Chapter 7

How do we distinguish global optimum


from local one?
By graphing to gain insight into the behavior of the
function.
Using randomly generated starting guesses and
picking the largest of the optima as global.
Perturbing the starting point to see if the routine
returns a better point or the same local minimum.

by Lale Yurttas, Texas A&M


University

Chapter 7

Division of one-dimensional unconstrained


optimization
Bracketing methods:

a)Golden search method


b)Quadratic method
Open method:

a)Newtons method

by Lale Yurttas, Texas A&M


University

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)

by Lale Yurttas, Texas A&M University

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

by Lale Yurttas, Texas A&M


University

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)

by Lale Yurttas, Texas A&M


University

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)

by Lale Yurttas, Texas A&M


University

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

by Lale Yurttas, Texas A&M


University

Chapter 7

14

Multidimensional Constrained Optimization


An optimization approach that deals with a desired
objective such as maximizing profit or minimizing cost
in presence of constraints such as limited resources.
Basic linear programming problem consists of two
major parts:
1. The objective function
2. A set of constraints

The first step in linear programming is to convert the


problem into a standard form if it is not already in the
standard form.
15

The Simplex Method


The simplest multidimensional constrained optimization is Simplex
method
Assumes that the optimal solution will be an extreme point.
The approach must recognize whether during problem solution an
extreme point occurs.
To do this, the constraint equations are reformulated as equalities by
introducing slack variables.

16

Standard Maximization Problem


A maximization problem is in standard for if the objective function is
generally expressed as

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

Characteristics of standard maximization problem:


1.
2.
3.

Objective function is to be maximized


All variables are non-negative (xi 0)
Each linear constraint is in the form of to a non-negative constants
(bi 0)

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

4. Select negative with the largest value = 12


value of x and y at row 1 only)
5. Calculate: integration= solution/y

integration

(for this selection refer to

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

9. Other value in column y make it equal to 0 (apply Gauss Jordan)


Basic

S1

S2

solution

-4

72

0.5

0.5

S2

-1

12

10. Now repeat procedure 4 - 9


Basic

S1

S2

solution

integration

-4

72

-18

0.5

0.5

12

S2

-1

12

21

12. S1 and S2 become x and y


Basic

S1

S2

solution

96

0.75

-0.25

-0.5

0.5

Answer:
x

Maximize value, P = 96 with x = 6 and y = 3

22

Standard Minimization Problem


A minimization problem is in standard for if the objective function is
generally expressed as

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
.

With additional constraint:

.
.
.
.
an1 x1 an 2 x2 ann xn bn
xi 0
bi 0

23

Characteristics of standard minimization problem:

1. Objective function is to be minimized


2. All variables are non-negative (xi 0)
3. Each linear constraint is in the form of to a nonnegative constants (bi 0)

The basic procedure used to solve the standard minimization


problem is to convert it to a standard maximization problem
and then solved it using the techniques for standard
maximization problem.

The transformed maximization problem from the


minimization problem is called dual maximization problem.
24

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

Solve it by using simplex method.

25

Procedures:
1. Arrange data in table
x

Solution

60

60

300

12

36

10

30

90

0.12

0.15

2. Transpose the matrix


u
v

Objective function
w

solution

60

12

10

0.12

60

30

0.15

300

36

90

3. Generate the new equation:


P=300u +36v+90w
Constraints:
60u+12v+10w 0.12
60u+6v+30w 0.15

New Objective
function

26

P=300u +36v+90w
Constraints:
60u+12v+10w 0.12
60u+6v+30w 0.15

4. Arrange data in table


Basic

S1

S2

solution

-300

-36

-90

S1

60

12

10

0.12

S2

60

30

0.15

5. Solve using maximization problem (Refer to procedure for maximization problem)


Basic

min

12

0.66

0.25

0.025

-0.008333

0.00175

-0.3

-0.05

0.05

0.0015

Answer:- min=0.66, x=3, y=2


27

Example 6: Maximize the Profit


Resource
Raw Gas
(m3/tonne)
Production
Time
(hr/tonne)
Storage
(tonnes)
Profit
(per tonne)
by Lale Yurttas, Texas A&M
University

Regular,
X1
7

Premium, X2
11

Resource
Available
77

10

80

150

175
Chapter 13

28

Вам также может понравиться