Upload
gary-bater
View
237
Download
6
Tags:
Embed Size (px)
Citation preview
1Chapter 14 - Simulation
Introduction to Management Science
9th Edition
by Bernard W. Taylor III
Chapter 14Simulation
© 2007 Pearson Education
2Chapter 14 - Simulation
The Monte Carlo Process
Computer Simulation with Excel Spreadsheets
Simulation of a Queuing System
Continuous Probability Distributions
Statistical Analysis of Simulation Results
Verification of the Simulation Model
Areas of Simulation Application
Chapter Topics
3Chapter 14 - Simulation
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
4Chapter 14 - Simulation
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).
Gambling devices produce numbered results from well-defined populations.
Monte Carlo Process
5Chapter 14 - SimulationTable 14.1 Probability Distribution of Demand for Laptop PC’s
In the Monte Carlo process, values for a random variable are In the Monte Carlo process, values for a random variable are generated by sampling from a probability distribution.generated by sampling from a probability distribution.
Example: ComputerWorld demand data for laptops selling for Example: ComputerWorld demand data for laptops selling for $4,300 over a period of 100 weeks.$4,300 over a period of 100 weeks.
Monte Carlo ProcessUse of Random Numbers (1 of 10)
6Chapter 14 - Simulation
The purpose of the Monte Carlo process is to generate the The purpose of the Monte Carlo process is to generate the random variable, demand, by sampling from the probability random variable, demand, by sampling from the probability distribution P(x).distribution P(x).
The partitioned roulette wheel replicates the probability The partitioned roulette wheel replicates the probability distribution for demand if the values of demand occur in a distribution for demand if the values of demand occur in a random manner.random manner.
The segment at which the wheel stops indicates demand The segment at which the wheel stops indicates demand for one week.for one week.
Monte Carlo ProcessUse of Random Numbers (2 of 10)
7Chapter 14 - Simulation
Figure 14.1 A Roulette Wheel for Demand
Monte Carlo ProcessUse of Random Numbers (3 of 10)
8Chapter 14 - Simulation
Figure 14.2Numbered Roulette Wheel
Monte Carlo ProcessUse of Random Numbers (4 of 10) When wheel is spun actual demand for PC’s is determined by a When wheel is spun actual demand for PC’s is determined by a
number at rim of the wheel.number at rim of the wheel.
9Chapter 14 - SimulationTable 14.2 Generating Demand from Random Numbers
Monte Carlo ProcessUse of Random Numbers (5 of 10)
Process of spinning a wheel can be replicated using random Process of spinning a wheel can be replicated using random numbers alone.numbers alone.
Transfer random numbers for each demand value from roulette Transfer random numbers for each demand value from roulette wheel to a table.wheel to a table.
10Chapter 14 - Simulation
Select number from a Select number from a random number table:random number table:
Table 14.3 Random Number Table
Monte Carlo ProcessUse of Random Numbers (6 of 10)
11Chapter 14 - Simulation
Repeating selection of random numbers simulates demand Repeating selection of random numbers simulates demand for a period of time.for a period of time.
Estimated average demand = 31/15 = 2.07 laptop PCs per Estimated average demand = 31/15 = 2.07 laptop PCs per week.week.
Estimated average revenue = $133,300/15 = $8,886.67.Estimated average revenue = $133,300/15 = $8,886.67.
Monte Carlo ProcessUse of Random Numbers (7 of 10)
12Chapter 14 - Simulation
Monte Carlo ProcessUse of Random Numbers (8 of 10)
13Chapter 14 - Simulation
Average demand could have been calculated Average demand could have been calculated analytically:analytically:
per week sPC' 1.5 )4)(10(.)3)(10(.)2)(20(.)1)(40(.)0)(20(.)(
:therefore
valuesdemanddifferent ofnumber thedemand ofy probabilit )(i valuedemand
:where
1)()(
xE
nxPx
n
ixxPxE
i
i
ii
Monte Carlo ProcessUse of Random Numbers (9 of 10)
14Chapter 14 - Simulation
The more periods simulated, the more accurate the results.The more periods simulated, the more accurate the results.
Simulation results will not equal analytical results unless Simulation results will not equal analytical results unless enough trials have been conducted to reach enough trials have been conducted to reach steady statesteady state..
Often difficult toOften difficult to validate validate results of simulation - that true results of simulation - that true steady state has been reached and that simulation model steady state has been reached and that simulation model truly replicates reality.truly replicates reality.
When analytical analysis is not possible, there is no When analytical analysis is not possible, there is no analytical standard of comparison thus making validation analytical standard of comparison thus making validation even more difficulteven more difficult..
Monte Carlo ProcessUse of Random Numbers (10 of 10)
15Chapter 14 - Simulation
As simulation models get more complex they become As simulation models get more complex they become impossible to perform manually.impossible to perform manually.
In simulation modeling, random numbers are generated by In simulation modeling, random numbers are generated by a mathematical process instead of a physical process (such a mathematical process instead of a physical process (such as wheel spinning).as wheel spinning).
Random numbers are typically generated on the computer Random numbers are typically generated on the computer using a numerical technique and thus are not true random using a numerical technique and thus are not true random numbers but numbers but pseudorandom numberspseudorandom numbers..
Computer Simulation with Excel SpreadsheetsGenerating Random Numbers (1 of 2)
16Chapter 14 - Simulation
Artificially created random numbers must have the following Artificially created random numbers must have the following characteristics:characteristics:
The random numbers must be The random numbers must be uniformly uniformly distributeddistributed..
The numerical technique for generating the The numerical technique for generating the numbers numbers must be must be efficientefficient..
The sequence of random numbers should The sequence of random numbers should reflect reflect no no patternpattern..
Computer Simulation with Excel SpreadsheetsGenerating Random Numbers (2 of 2)
17Chapter 14 - Simulation
Exhibit 14.1
Simulation with Excel Spreadsheets (1 of 3)
18Chapter 14 - Simulation
Exhibit 14.2
Simulation with Excel Spreadsheets (2 of 3)
19Chapter 14 - Simulation
Exhibit 14.3
Simulation with Excel Spreadsheets (3 of 3)
20Chapter 14 - Simulation
Exhibit 14.4
Revised ComputerWorld example; order size of one laptop each week.Revised ComputerWorld example; order size of one laptop each week.
Computer Simulation with Excel SpreadsheetsDecision Making with Simulation (1 of 2)
21Chapter 14 - SimulationExhibit 14.5
Order size of two laptops each week.Order size of two laptops each week.
Computer Simulation with Excel SpreadsheetsDecision Making with Simulation (2 of 2)
22Chapter 14 - Simulation
Table 14.5 Distribution of Arrival Intervals
Table 14.6 Distribution of Service Times
Simulation of a Queuing SystemBurlingham Mills Example (1 of 3)
23Chapter 14 - Simulation
Average 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 SystemBurlingham Mills Example (2 of 3)
24Chapter 14 - Simulation
Simulation of a Queuing SystemBurlingham Mills Example (3 of 3)
Caveats:Caveats:
Results may be viewed with skepticism.Results may be viewed with skepticism.
Ten trials do not ensure steady-state results.Ten trials do not ensure steady-state results.
Starting conditions can affect simulation results.Starting conditions can affect simulation results.
If no batches are in the system at start, If no batches are in the system at start, simulation simulation must run until it replicates normal operating must run until it replicates normal operating system.system.
If system starts with items already in the system, If system starts with items already in the system, simulation must begin with items in the system.simulation must begin with items in the system.
25Chapter 14 - SimulationExhibit 14.6
Computer Simulation with ExcelBurlingham Mills Example
26Chapter 14 - Simulation
minutes 2 .254 x.25,r if :Example
.determined is time"" for x value a r,number, random a generatingBy r4x
16x2r
r number random the F(x) Let16
2xF(x)
x
02x
21x
0 81dxx
81dx
x
0
8xF(x)
: xofy probabilit Cumulative
(minutes) time x where4x0 ,8xf(x)
:Exampleons.distributi continuous for used be must function continuousA
Continuous Probability Distributions
27Chapter 14 - Simulation
Machine Breakdown and Maintenance SystemSimulation (1 of 6)
Bigelow Manufacturing Company must decide if it should Bigelow Manufacturing Company must decide if it should implement a machine maintenance program at a cost of implement a machine maintenance program at a cost of $20,000 per year that would reduce the frequency of $20,000 per year that would reduce the frequency of breakdowns and thus time for repair which is $2,000 per breakdowns and thus time for repair which is $2,000 per day in lost production.day in lost production.
A continuous probability distribution of the time between A continuous probability distribution of the time between machine breakdowns:machine breakdowns:
f(x) = x/8, 0 f(x) = x/8, 0 x x 4 weeks, where x = weeks 4 weeks, where x = weeks between between machine breakdownsmachine breakdowns
x = 4*sqrt(rx = 4*sqrt(rii), value of x for a given value of r), value of x for a given value of rii..
28Chapter 14 - Simulation
Table 14.8Probability Distribution of Machine Repair Time
Machine Breakdown and Maintenance SystemSimulation (2 of 6)
29Chapter 14 - Simulation
Table 14.9 Revised Probability Distribution of Machine Repair Time with the Maintenance Program
Machine Breakdown and Maintenance SystemSimulation (3 of 6) Revised probability of time between machine breakdowns:Revised probability of time between machine breakdowns:
f(x) = x/18, 0 f(x) = x/18, 0 x x6 weeks where x = weeks between 6 weeks where x = weeks between machine breakdownsmachine breakdowns
x = 6*sqrt(rx = 6*sqrt(rii))
30Chapter 14 - SimulationTable 14.10 Simulation of Machine Breakdowns and Repair Times
Machine Breakdown and Maintenance SystemSimulation (4 of 6)
Simulation of system without maintenance program (total annual Simulation of system without maintenance program (total annual repair cost of $84,000):repair cost of $84,000):
31Chapter 14 - Simulation
Table 14.11 Simulation of Machine Breakdowns and Repair with the Maintenance Program
Machine Breakdown and Maintenance SystemSimulation (5 of 6) Simulation of system with maintenance program (total annual Simulation of system with maintenance program (total annual
repair cost of $42,000):repair cost of $42,000):
32Chapter 14 - Simulation
Machine Breakdown and Maintenance SystemSimulation (6 of 6)
Results and caveats:Results and caveats:
Implement maintenance program since cost savings Implement maintenance program since cost savings appear to be $42,000 per year and maintenance appear to be $42,000 per year and maintenance
program program will cost $20,000 per year.will cost $20,000 per year.
However, there are potential problems caused by However, there are potential problems caused by simulating both systems onlysimulating both systems only once once..
Simulation results could exhibit Simulation results could exhibit significant variationsignificant variation since since time between breakdowns and repair times are time between breakdowns and repair times are probabilistic.probabilistic.
To be sure of accuracy of results, simulations of each To be sure of accuracy of results, simulations of each system must be system must be run many timesrun many times and and average resultsaverage results computed.computed.
Efficient computer simulation required to do this.Efficient computer simulation required to do this.
33Chapter 14 - SimulationExhibit 14.7
Machine Breakdown and Maintenance SystemSimulation with Excel (1 of 2)
Original machine breakdown example:Original machine breakdown example:
34Chapter 14 - SimulationExhibit 14.8
Machine Breakdown and Maintenance SystemSimulation with Excel (2 of 2)
Simulation with maintenance program.Simulation with maintenance program.
35Chapter 14 - Simulation
Outcomes of simulation modeling are Outcomes of simulation modeling are statistical measuresstatistical measures such as averages.such as averages.
Statistical results are typically subjected to Statistical results are typically subjected to additional additional statistical analysisstatistical analysis to determine their degree of accuracy. to determine their degree of accuracy.
Confidence limitsConfidence limits are developed for the analysis of the are developed for the analysis of the statistical validity of simulation results.statistical validity of simulation results.
Statistical Analysis of Simulation Results (1 of 2)
36Chapter 14 - Simulation
Formulas for 95% confidence limits:Formulas for 95% confidence limits:
upper confidence limitupper confidence limit
lower confidence limitlower confidence limit
where is the mean and s the standard deviation where is the mean and s the standard deviation from a sample of size n from any population.from a sample of size n from any population.
We can be 95% confident that the true population mean will We can be 95% confident that the true population mean will be between the upper confidence limit and lower be between the upper confidence limit and lower confidence limit.confidence limit.
)/)(.( nsx 961
)/)(.( nsx 961
x
Statistical Analysis of Simulation Results (2 of 2)
37Chapter 14 - SimulationExhibit 14.9
Simulation ResultsStatistical Analysis with Excel (1 of 3) Simulation with maintenance program.Simulation with maintenance program.
38Chapter 14 - Simulation
Exhibit 14.10
Simulation ResultsStatistical Analysis with Excel (2 of 3)
39Chapter 14 - SimulationExhibit 14.11
Simulation ResultsStatistical Analysis with Excel (3 of 3)
40Chapter 14 - Simulation
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 data.
Verification of the Simulation Model (1 of 2)
41Chapter 14 - Simulation
Analyst must determine if model starting conditions are correct (system empty, etc).
Must determine how long model should run to 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)
42Chapter 14 - Simulation
Queuing
• Inventory Control
• Production and Manufacturing
• Finance
• Marketing
• Public Service Operations
• Environmental and Resource Analysis
Some Areas of Simulation Application
43Chapter 14 - Simulation
Data
Willow Creek Emergency Rescue Squad
Minor emergency requires two-person crew, regular, a three-person crew, and major emergency, a five- person crew.
Example Problem Solution (1 of 6)
44Chapter 14 - Simulation
Distribution of number of calls per night and emergency type:
Required: Manually simulate 10 nights of calls; determine average number of calls each night and maximum number of crew members that might be needed on any given night.
Calls Probability 0 1 2 3 4 5 6
.05
.12
.15
.25
.22
.15
.06 1.00
Emergency Type Probability Minor Regular Major
.30
.56
.14 1.00
Example Problem Solution (2 of 6)
45Chapter 14 - Simulation
Calls Probability Cumulative Probability
Random Number Range, r1
0 1 2 3 4 5 6
.05
.12
.15
.25
.22
.15
.06 1.00
.05
.17
.32
.57
.79
.94 1.00
1 – 5 6 – 17
18 – 32 33 – 57 58 – 79 80 – 94
95 – 99, 00
Emergency Type
Probability Cumulative Probability
Random Number Range, r1
Minor Regular Major
.30
.56
.14 1.00
.30
.86 1.00
1 – 30 31 – 86
87 – 99, 00
Solution Step 1: Develop random number ranges for the probability distributions.
Example Problem Solution (3 of 6)
46Chapter 14 - Simulation
Step 2: Set Up a Tabular Simulation (use second column of random numbers in Table 14.3).
Example Problem Solution (4 of 6)
47Chapter 14 - Simulation
Step 2 continued:
Example Problem Solution (5 of 6)
48Chapter 14 - Simulation
Step 3: Compute Results:
average number of minor emergency calls per night = 10/10 =1.0
average number of regular emergency calls per night = 14/10 = 1.4
average number of major emergency calls per night = 3/10 = 0.30
If calls of all types occurred on same night, maximum number of squad members required would be 14.
Example Problem Solution (6 of 6)
49Chapter 14 - Simulation
End of chapter
The rest of the transparencies are given as a brief overview of Crystall Ball software; which not included in the exam.
50Chapter 14 - Simulation
Crystal BallOverview
Many realistic simulation problems contain more Many realistic simulation problems contain more complex complex probability distributionsprobability distributions than those used in the examples. than those used in the examples.
However there are several However there are several simulation add-inssimulation add-ins for Excel that for Excel that provide a capability to perform simulation analysis with a provide a capability to perform simulation analysis with a variety of probability distributions in a spreadsheet format.variety of probability distributions in a spreadsheet format.
Crystal BallCrystal Ball, published by Decisioneering, is one of these., published by Decisioneering, is one of these.
Crystal Ball is a risk analysis and forecasting program that Crystal Ball is a risk analysis and forecasting program that uses Monte Carlo simulation to provide a uses Monte Carlo simulation to provide a statistical rangestatistical range of of results.results.
51Chapter 14 - Simulation
Recap of Western Clothing Company break-even and profit Recap of Western Clothing Company break-even and profit analysis:analysis:
Price (p) for jeans is $23; variable cost (cPrice (p) for jeans is $23; variable cost (cvv) is $8; ) is $8;
fixed fixed cost (ccost (cff ) is $10,000. ) is $10,000.
Profit Z = vp - cProfit Z = vp - cff - v - vcc; break-even volume v = c; break-even volume v = cff/(p /(p
- c- cvv) ) = 10,000/(23-8) = 666.7 pairs.= 10,000/(23-8) = 666.7 pairs.
Crystal BallSimulation of Profit Analysis Model (1 of 17)
52Chapter 14 - Simulation
Modifications to demonstrate Crystal Ball:Modifications to demonstrate Crystal Ball:
Assume volume is now Assume volume is now volume demandedvolume demanded and is and is defined by a defined by a normal probabilitynormal probability distributiondistribution with with
mean mean of 1,050 and standard deviation of 410 pairs of of 1,050 and standard deviation of 410 pairs of jeans.jeans.
Price is uncertain and defined by a Price is uncertain and defined by a uniform uniform probability probability distributiondistribution from $20 to $26. from $20 to $26.
Variable cost is not constant but defined by a Variable cost is not constant but defined by a triangular triangular probability distributionprobability distribution..
Will determineWill determine average average profit and profitability with profit and profitability with given given probabilistic variables.probabilistic variables.
Crystal BallSimulation of Profit Analysis Model (2 of 17)
53Chapter 14 - Simulation
Exhibit 14.12
Crystal BallSimulation of Profit Analysis Model (3 of 17)
54Chapter 14 - Simulation
Exhibit 14.13
Crystal BallSimulation of Profit Analysis Model (4 of 17)
55Chapter 14 - Simulation
Exhibit 14.14
Crystal BallSimulation of Profit Analysis Model (5 of 17)
56Chapter 14 - Simulation
Exhibit 14.15
Crystal BallSimulation of Profit Analysis Model (6 of 17)
57Chapter 14 - Simulation
Exhibit 14.16
Crystal BallSimulation of Profit Analysis Model (7 of 17)
58Chapter 14 - Simulation
Exhibit 14.17
Crystal BallSimulation of Profit Analysis Model (8 of 17)
59Chapter 14 - Simulation
Exhibit 14.18
Crystal BallSimulation of Profit Analysis Model (9 of 17)
60Chapter 14 - Simulation
Exhibit 14.19
Crystal BallSimulation of Profit Analysis Model (10 of 17)
61Chapter 14 - Simulation
Exhibit 14.20
Crystal BallSimulation of Profit Analysis Model (11 of 17)
62Chapter 14 - Simulation
Exhibit 14.21
Crystal BallSimulation of Profit Analysis Model (12 of 17)
63Chapter 14 - Simulation
Exhibit 14.22
Crystal BallSimulation of Profit Analysis Model (13 of 17)
64Chapter 14 - Simulation
Exhibit 14.23
Crystal BallSimulation of Profit Analysis Model (14 of 17)
65Chapter 14 - Simulation
Exhibit 14.24
Crystal BallSimulation of Profit Analysis Model (15 of 17)
66Chapter 14 - Simulation
Exhibit 14.25
Crystal BallSimulation of Profit Analysis Model (16 of 17)
67Chapter 14 - Simulation
Exhibit 14.26
Crystal BallSimulation of Profit Analysis Model (17 of 17)