0% found this document useful (0 votes)
6 views

Week5 Computation Method

This document provides an overview of mathematical modeling and optimization. It begins with an introduction to one-variable optimization, including examples of locating maximum/minimum points graphically and numerically. It then discusses multivariable optimization, noting the increased complexity in solving systems with more variables. Linear programming is introduced as a type of constrained multivariable optimization where the objective and constraint functions are linear. An example problem on optimal crop planting is formulated and solved as a linear program. The document concludes with a brief discussion of sensitivity analysis.

Uploaded by

nguyễn Đức
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
6 views

Week5 Computation Method

This document provides an overview of mathematical modeling and optimization. It begins with an introduction to one-variable optimization, including examples of locating maximum/minimum points graphically and numerically. It then discusses multivariable optimization, noting the increased complexity in solving systems with more variables. Linear programming is introduced as a type of constrained multivariable optimization where the objective and constraint functions are linear. An example problem on optimal crop planting is formulated and solved as a linear program. The document concludes with a brief discussion of sensitivity analysis.

Uploaded by

nguyễn Đức
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 60

Mathematical

Modelling
Part 1: Optimization Model
Content of part 1

Chapter 1: One-variable optimization


Chapter 2: Multivariable optimization
Chapter 3: Multi-objective optimization
Chapter 4: Computational methods for
optimization

3
Outline

• One-variable optimization

• Multivariable optimization

• Linear programming

• Discrete optimization

4
One-variable optimization
• Real-life problem is usually messy.
• The task of locating global extreme points can be
exceedingly difficult. Even the function is differentiable
everywhere, the computation of the derivative is often
complicated.
• Simple fact is that most equations cannot be solved
analytically.
• The best we can do in most instances is to find an
approximate solution by graphical or numerical techniques.

5
Illustrated example: A variant of
Pig problem
• We reconsider the pig problem in the previous
chapter, but now we take into account the fact
that the growth rate is not constant. We
assume that the pig is young, so that the
growth rate is increasing by time.

6
Step 1: Ask a question
Step 1: Ask a question
Let assume that the growth rate of the pig is
proportional to its weight. In other words,
𝑑𝑤
= 𝑐𝑤
𝑑𝑡
𝑑𝑤
From the fact that = 5 lbs/day when 𝑤 = 200
𝑑𝑡
lbs, we conclude that 𝑐 = 0.025. So
𝑑𝑤
= 0.025𝑤, 𝑤 0 = 200
𝑑𝑡
Solving this we got 𝑤 = 200 𝑒 0.025𝑡

8
Step 2: Select a modelling approach

• We still model this problem as a one-variable


optimization problem.
• However, computational method for this
problem is much harder than for previous
problem.

9
Step 3: Formulate the problem
• 𝑃 = 𝑅 − 𝐶 = 𝑝𝑤 − 0.45𝑡 = ሺ0.65 −
0.01𝑥ሻ 200𝑒 0.025𝑥 − 0.45𝑥
• Or new objective function 𝑦 = 𝑓 𝑥 =
0.65 − 0.01𝑥 200𝑒 0.025𝑥 − 0.45𝑥
• The problem is to maximize 𝑓ሺ𝑥ሻ over the set
𝑆 = {𝑥: 𝑥 > 0}

10
Step 4: Solve the problem
We will use the graphical method.
• Case 1: Not a complete graph

11
Step 4: Solve the problem
We will use the graphical method.
• Case 2: A complete graph

12
Step 4: Solve the problem

• The question: How do we know when we


have a complete graph ?
• There is no simple answer to this
question. It depends on problem at hand
and experiences of modeler.

13
Step 4: Solve the problem
• From the graph, we see that the maximum
occurs around 𝑥 = 20, 𝑦 = 𝑓 𝑥 = 140. To
obtain more accurate solution, we can zoom in
on the maximum point of the graph

14
Step 4: Solve the problem
• Based on below graphs, we would estimate
that the maximum occurs at 𝑥 = 19.5, 𝑦 =
𝑓 𝑥 = 139.395

15
Step 5: Answer the question
• After taking into account the fact that the
growth rate of the young pig is still increasing,
now we recommend waiting 19 or 20 days to
sell. This should result in a net profit of
approximately $140.

16
Sensitivity analysis
• Let examine the sensitivity of the optimum
value to the growth rate 𝑐 = 0.025 for young
pig.
• We should not repeat the graphical method for
several different values of the parameter 𝑐.
• We need a more efficient method!

17
Sensitivity analysis
• Let us begin by generalizing the model.

18
Sensitivity analysis
• First part: Computing the derivative

• Second part: Solve the equation

Not easy to solve by hand


19
Newton’s method

20
Newton’s method

21
Sensitivity analysis

22
Notes on step 5 (Solve the problem)

• Two stage of solving one-variable


optimization
• Stage 1: Apply a global method (graphing)
to locate an approximate solution
• Stage 2: Apply a fast local method
(Newton’s method) to determine the exact
solution to the desired accuracy.

23
Outline

• One-variable optimization

• Multivariable optimization

• Linear programming

• Discrete optimization

24
Multivariable optimization
• Graphical techniques for global method are not
available in case the number of variables is
larger than 3.
• Solving ∇𝑓 = 0 becomes more complicated as
the number of independent variables
increases.
• Constrained optimization is also more difficult
because the geometry of the feasible region
can be more complicated.

25
Example: Fire station location
A suburban community intends to replace its old fire
station with a new facility. The old station was located
at the historical city center. City planners intend to
locate the new facility more scientifically. A statistical
analysis of response–time data yielded an estimate of
3.2 + 1.7𝑟 0.91 minutes required to respond to a call 𝑟
miles away from the station. Estimates of the
frequency of calls from different areas of the city were
obtained from the fire chief. Each block represents one
square mile, and the numbers inside each block
represent the number of emergency calls per year for
that block. Find the best location for the new facility
such that average response time is minimized.
26
Example: Fire station location
Map showing the number of emergency calls per
year in each one square mile area of the city

27
Step 1: Ask a question
• Represent city map as a grid, locations on the
city is described by coordinates ሺ𝑥, 𝑦ሻ
• For simplicity, the map is divided into nine 2 ×
2 −mile squares and assume that each
emergency is located at the center of the
square.
• 𝑥, 𝑦 is the location of new fire station, so the
average response time to a call is 𝑧 = 𝑓ሺ𝑥, 𝑦ሻ
• 0 ≤ 𝑥 ≤ 6, 0 ≤ 𝑦 ≤ 6

28
Step 2: Select a modelling
approach
• We model this problem as a multiple variable
optimization problem.

29
Step 3: Formulate the problem

The problem is to minimize 𝑧 over the feasible regions


0 ≤ 𝑥 ≤ 6, 0 ≤ 𝑦 ≤ 6
30
Step 4: Solve the problem
3-D graph of average response time

31
Step 4: Solve the problem
Contour plot of average response time

32
Step 4: Solve the problem
• From 3-D graph of average response time, we
see that 𝑓 attains its minimum at the unique
interior point at which ∇𝑓 = 0
• The contour plot indicates that ∇𝑓 = 0 near the
point 𝑥 = 2, 𝑦 = 3.

33
Step 4: Solve the problem

34
Step 4: Solve the problem

35
Step 4: Solve the problem
• Result

36
Outline

• One-variable optimization

• Multivariable optimization

• Linear programming

• Discrete optimization

37
Linear programming
• The simplest type of multivariable constrained
optimization where both the objective function
and the constraint functions are linear.
• Study of computational methods for such
problems is called linear programming.
• Huge number of software packages for linear
programming.

38
Example: Planting problem
A family farm has 625 acres available for
planting. The crops the family is considering
are corn, wheat, and oats. It is anticipated that
1,000 acres-ft of water will be available for
irrigation, and the armers will be able to devote
300 hours of labor per week. Additional data
are presented in the next slide. Find the
amount of each crop that should be planted for
maximum profit.

39
Example: Planting problem

40
Step 1: Ask a question

41
Step 1: Ask a question

42
Step 2: Select a modelling
approach
• We model this problem as a linear
programming problem.

43
Step 3: Formulate the problem
• Decision variables are the number of acres of
each crop 𝑥1 , 𝑥2
• Objective function: Maximize the total yield,
𝑦 = 400𝑥1 + 200𝑥2 + 250𝑥3
• Constraint sets:

44
Step 4: Solving the problem
• Using software package, the optimal solution is
𝑍 = 162500 at 𝑥1 = 41.667, 𝑥2 = 0, 𝑥3 =
583.333.

45
Step 5: Answer the question
• The optimal solution is to plant 187.5 acres of
corn, 437.5 acres of wheat, and no oats. This
should yield $162,500.
• The optimal crop mixture we found uses all 625
acres and all 1,000 acre–ft of irrigation water,
but only 237.5 of the available 300 person–
hours of labor per week. Thus, there will be
62.5 person–hours per week that may be
devoted to other profitable activities, or to
leisure.

46
Sensitivity analysis
We will begin our sensitivity analysis by considering the
amount of water available for irrigation. This amount
will vary as a result of rainfall and temperature, which
determine the status of the farm’s irrigation pond. It
would also be possible to purchase additional irrigation
water from a nearby farm. The result illustrates the
effect of one additional acre–ft of irrigation water on our
optimal solution. Now we can plant an additional half–
acre of corn (a more profitable crop), and in fact we
save a little bit of labor (0.3 person–hours per week).
The net result is an additional $100 in yield.

47
Outliner

• One-variable optimization

• Multivariable optimization

• Linear programming

• Discrete optimization

48
Discrete optimization
• In many real-world problems, we must deal
with variables that are discrete, like the
integers.
• As in the continuous case, there are still no
universally effective methods for solving
discrete optimization problems.
• This section, we concentrate on one type of
discrete optimization problem called integer
programming.

49
Example: Planting problem
The family has 625 acres available for planting.
There are 5 plots of 120 acres each and another
plot of 25 acres. The family wants to plant each
plot with only one crop: corn, wheat, or oats. As
before, 1,000 acre–ft of water will be available for
irrigation, and the farmers will be able to devote
300 hours of labor per week. Additional data are
presented in the next slide. Find the crop that
should be planted in each plot for maximum profit.

50
Example: Planting problem

51
Step 1: Ask a question

52
Step 1: Ask a question

53
Step 2: Select a modelling
approach
• We will model this problem as an integer
programming problem.

54
Step 3: Formulate the problem
• Decision variables are the number of 120-arce
plots and the number of 25-arce plots to plant
with corn, wheat, or oats (𝑥1 , 𝑥2 , 𝑥3 , 𝑥4 , 𝑥5 , 𝑥6 ).
• Objective function: Maximize 𝑦 = 48000𝑥1 +
24000𝑥2 + 30000𝑥3 + 10000𝑥4 + 5000𝑥5 +
6250𝑥6
• Constraint set:
• 𝑥1 , … , 𝑥6 ∈ 𝑍 +

55
Step 3: Formulate the problem
• Constraint set:
• 𝑥1 , … , 𝑥6 ∈ 𝑍 +

56
Step 4: Solve the problem
• Using a software package, the optimal solution
is 𝑦 = 156250 which occurs when 𝑥3 = 5, 𝑥6 =
1 and other decision variable are all zero.

57
Step 5: Answer the question
• The best plan is to plant oats in every plot. This
results in an expected total yield of $156250 for
the season.

58
Sensitivity analysis
• Sensitivity analysis can be very time-consuming
for integer programming problem due to integer
programming take so much longer to solve than
linear programming.
• We consider the amount of irrigation water
available. If we add more 100 acre-feet of water.
This leads to another plan: planting one 120-acre
plot of corn, one 120-arc plot of wheat, and
planting oats everywhere else. The expected
revenue in this new plan is higher $12000 than
the old plan.

59
Bài tập

60

You might also like