■ The Monte Carlo Process■ Computer Simulation with Excel Spreadsheets ■ Simulation of a Queuing System ■ Continuous Probability Distributions ■ Statistical Analysis of Simulation Resul
Trang 1Copyright © 2010 Pearson Education, Inc Publishing as
Simulation
Chapter 14
Trang 2■ The Monte Carlo Process
■ Computer Simulation with Excel
Spreadsheets
■ Simulation of a Queuing System
■ Continuous Probability Distributions
■ Statistical Analysis of Simulation Results
■ Crystal Ball
■ Verification of the Simulation Model
■ Areas of Simulation Application
Chapter Topics
Trang 3■ Analogue simulation replaces a physical system
with an analogous physical system that is easier to manipulate
■ In computer mathematical simulation a system
is replaced with a mathematical model that is
analyzed with the computer.
■ Simulation offers a means of analyzing very
complex systems that cannot be analyzed using
the other management science techniques in the
text.
Overview
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 4■ A large proportion of the applications of
simulations are for probabilistic models
■ The Monte Carlo technique is defined as a
technique for selecting numbers randomly from a
probability distribution for use in a trial (computer
run) of a simulation model.
■ The basic principle behind the process is the same
as in the operation of gambling devices in casinos
(such as those in Monte Carlo, Monaco).
Monte Carlo Process
Trang 5Table 14.1 Probability Distribution of Demand
variable are generated by sampling from a
probability distribution.
selling for $4,300 over a period of 100 weeks.
Monte Carlo Process
Use of Random Numbers (1 of 10)
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 6 The purpose of the Monte Carlo process is
to generate the random variable,
demand, by sampling from the probability
distribution P(x).
The partitioned roulette wheel replicates
the probability distribution for demand if
the values of demand occur in a random
manner.
The segment at which the wheel stops
Monte Carlo Process
Use of Random Numbers (2 of 10)
Trang 7Figure 14.1 A Roulette Wheel for Demand
Monte Carlo Process
Use of Random Numbers (3 of 10)
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 8Figure 14.2 Numbered Roulette Wheel
Monte Carlo Process
Use of Random Numbers (4 of 10)
When the wheel is spun, the actual demand for PCs is
determined by a number at rim of the wheel.
Trang 9Table 14.2 Generating Demand from Random Numbers
Monte Carlo Process
Use of Random Numbers (5 of 10)
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 10Select number from a random number table:
Monte Carlo Process
Use of Random Numbers (6 of 10)
Trang 11 Repeating selection of random numbers
simulates demand for a period of time.
Estimated average demand = 31/15 = 2.07 laptop PCs per week.
Estimated average revenue = $133,300/15
= $8,886.67.
Monte Carlo Process
Use of Random Numbers (7 of 10)
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 12Monte Carlo Process
Use of Random Numbers (8 of 10)
Trang 13Average demand could have been calculated
analytically:
per week s
PC' 1.5
) 4 )(
10 (.
) 3 )(
10 (.
) 2 )(
20 (.
) 1 )(
40 (.
) 0 )(
20 (.
) (
: therefore
values demand
different of
number the
demand of
y probabilit )
( demand value i
: where
1 ( )
) (
i i
i i
Monte Carlo Process
Use of Random Numbers (9 of 10)
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 14 The more periods simulated, the more accurate
the results.
Simulation results will not equal analytical results unless enough trials have been conducted to reach
steady state
Often difficult to validate results of simulation -
that true steady state has been reached and that
simulation model truly replicates reality.
When analytical analysis is not possible, there is no analytical standard of comparison thus making
Monte Carlo Process
Use of Random Numbers (10 of 10)
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 15 As simulation models get more complex they
generated by a mathematical process instead of
a physical process (such as wheel spinning).
computer using a numerical technique and thus are
Trang 16Artificially created random numbers must
have the following characteristics:
1 The random numbers must be
uniformly distributed
2 The numerical technique for generating
the numbers must be efficient
3 The sequence of random numbers should
Trang 18Exhibit 14.2
Simulation with Excel Spreadsheets (2 of 3)
Trang 20Revised ComputerWorld example; order size of one laptop each week.
Computer Simulation with Excel
Spreadsheets
Decision Making with Simulation (1
of 2)
Exhibit 14.4
Trang 21Order size of two laptops each week.
Computer Simulation with Excel
Trang 22Table 14.5 Distribution of
Arrival Intervals
Table 14.6 Distribution of
Simulation of a Queuing System
Burlingham Mills Example (1 of 3)
Trang 23Average waiting time = 12.5days/10 batches
= 1.25 days per batch Average time in the system = 24.5 days/10
batches
= 2.45 days per batch
Simulation of a Queuing System
Burlingham Mills Example (2 of 3)
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 24Simulation of a Queuing System
Burlingham Mills Example (3 of 3)
Caveats:
■ Results may be viewed with skepticism.
■ Ten trials do not ensure steady-state
replicates normal operating system.
■ If system starts with items already in the system, simulation must begin with
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 25Exhibit 14.6
Computer Simulation with Excel
Burlingham Mills Example
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 26minutes 2
.25 4
x 25,
r if : Example
determined is
time"
"
for
x value a
r, number, random
a generating
By
r 4
x 16
x2
r
r number random
the F(x)
Let 16
2 x F(x)
x 0
2 x 2
1
x
0 8
1 dx
x
8 1 dx
x
0 8
x F(x)
: x of
y probabilit Cumulative
(minutes) time
x where 4
x 0
,
8 x f(x)
: Example
ons.
distributi continuous
for used be
must function
Trang 27Machine Breakdown and
A continuous probability distribution of the time
between machine breakdowns:
f(x) = x/8, 0 x 4 weeks, where x = weeks between machine breakdowns
x = 4*sqrt(r i ), value of x for a given value of r i
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 28Table 14.8 Probability Distribution of Machine Repair Time
Machine Breakdown and
Maintenance System
Simulation (2 of 6)
Trang 29Table 14.9
Machine Breakdown and
Trang 30Machine Breakdown and
Maintenance System
Simulation (4 of 6) Simulation of system without
maintenance program (total annual
repair cost of $84,000):
Trang 31Table
Machine Breakdown and
Maintenance System
Simulation (5 of 6) Simulation of system with maintenance program
(total annual repair cost of $42,000):
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 32Machine Breakdown and
Maintenance System
Simulation (6 of 6)
Results and caveats:
savings appear to be $42,000 per year and maintenance program will cost $20,000 per year.
■ However, there are potential problems caused
by simulating both systems only once
■ Simulation results could exhibit significant
variation since time between breakdowns and repair times are probabilistic.
■ To be sure of accuracy of results, simulations of
average results computed.
■ Efficient computer simulation required to do this.
Trang 33Exhibit 14.7
Machine Breakdown and
Maintenance System
Simulation with Excel (1 of 2) Original machine breakdown example:
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 34Machine Breakdown and
Maintenance System
Simulation with Excel (2 of 2)
Simulation with maintenance program.
Trang 35 Outcomes of simulation modeling are
statistical measures such as averages.
Statistical results are typically subjected to
additional statistical analysis to
determine their degree of accuracy.
Confidence limits are developed for the
analysis of the statistical validity of
Trang 36Formulas for 95% confidence limits:
upper confidence limit lower confidence limit where is the mean and s the standard deviation from a sample of size n from any
Trang 37Simulation Results
Statistical Analysis with Excel (1 of
3) Simulation with maintenance program.
Copyright © 2010 Pearson Education, Inc Publishing as
Exhibit 14.9
Trang 38Simulation Results
Statistical Analysis with Excel (2 of
3)
Exhibit 14.10
Trang 4040
14-Crystal Ball
Overview
Many realistic simulation problems contain
more complex probability distributions than
those used in the examples.
However there are several simulation add-ins
for Excel that provide a capability to perform simulation analysis with a variety of
probability distributions in a spreadsheet
Trang 41Recap of Western Clothing Company
break-even and profit analysis:
Price (p) for jeans is $23 variable cost (c v ) is $8
Trang 42Modifications to demonstrate Crystal Ball
is defined by a normal probability distribution
with mean of 1,050 and standard deviation of
410 pairs of jeans.
Price is uncertain and defined by a uniform
probability distribution from $20 to $26.
Variable cost is not constant but defined by a
triangular probability distribution.
Will determine average profit and profitability with given probabilistic variables.
Crystal Ball
Simulation of Profit Analysis Model
(2 of 15)
Trang 46Crystal Ball
Simulation of Profit Analysis Model
(6 of 15)
Exhibit 14.14
Trang 48Crystal Ball
Simulation of Profit Analysis Model
(8 of 15)
Trang 50Crystal Ball
Simulation of Profit Analysis Model
(10 of 15)
Exhibit 14.18
Trang 52Crystal Ball
Simulation of Profit Analysis Model
(12 of 15)
Exhibit 14.20
Trang 54Crystal Ball
Simulation of Profit Analysis Model
(14 of 15)
Exhibit 14.22
Trang 56■ Analyst wants to be certain that model is
internally correct and that all operations are
logical and mathematically correct .
■ Testing procedures for validity:
Run a small number of trials of the model and compare with manually derived
solutions .
Divide the model into parts and run parts separately to reduce complexity of
checking.
Simplify mathematical relationships (if
possible) for easier testing.
Compare results with actual real-world
Verification of the Simulation Model (1 of 2)
Trang 57■ Analyst must determine if model starting conditions
are correct (system empty, etc).
insure steady-state conditions.
■ A standard, fool-proof procedure for validation is
not available.
■ Validity of the model rests ultimately on the
expertise and experience of the model developer.
Verification of the Simulation Model (2 of 2)
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 58■ Public Service Operations
■ Environmental and Resource Analysis
Some Areas of Simulation
Application
Trang 59Willow Creek Emergency Rescue Squad
Minor emergency requires two-person crew Regular emergency requires a three-person crew
Major emergency requires a five-person
crew
Example Problem Solution (1 of 6)
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 60Distribution of number of calls per night and
Emergency Type Probability Minor
Regular Major
.30 56 14 1.00
Example Problem Solution (2 of 6)
1 Manually simulate 10
nights of calls
2 Determine average number
of calls each night
3 Determine maximum
number of crew members that might be needed on any given night.
Trang 61Calls Probability Cumulative Probability Random Number Range, r
.05 17 32 57 79 94 1.00
.30 86 1.00
Example Problem Solution (3 of 6)
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 62Step 2: Set Up a Tabular Simulation (use second
column of random numbers in Table 14.3).
Example Problem Solution (4 of 6)
Trang 63Step 2 continued:
Example Problem Solution (5 of 6)
Copyright © 2010 Pearson Education, Inc Publishing as
Trang 64Step 3: Compute Results:
average number of minor emergency calls per night
If calls of all types occurred on same night,
maximum number of squad members required
would be 14.
Example Problem Solution (6 of 6)
Trang 65Copyright © 2010 Pearson Education, Inc Publishing as