Lecture Notes for Week 13

Download Report

Transcript Lecture Notes for Week 13

Chapter 14
Simulation
Chapter Topics
• Monte Carlo Process
• Statistical Analysis of Simulation Results
• Verification of the Simulation Model
• Computer Simulation with Excel Spreadsheets
• Areas of Simulation Application
Overview
• Simulation replaces physical systems
• 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 with other OR techniques
Monte Carlo Process
• Many applications of simulations are for probabilistic
models
• Monte Carlo technique: a technique for selecting numbers
randomly from a probability distribution
• Generate the random variable, demand, by sampling from
the probability distribution P (x)
• Example: Demand data for an item selling for $100 over a
period of 100 weeks
Demand/
Week
Freq. of
Demand
Probability
0
1
2
3
4
20
40
20
10
10
0.2
0.4
0.2
0.1
0.1
Cumulative Corresponding
Probability
RN
0.2
0.6
0.8
0.9
1.00
0-19
20-59
60-79
80-89
90-99
Monte Carlo Process
Use of Random Numbers
• Select number from a random number table:
Monte Carlo Process
Use of Random Numbers
• Repeat selection of random numbers to simulate demand
(say for 15 week)
• Calculate average demand = 31/15 = 2.07 units per week
• Estimated average revenue = $3100/15 =206
• Expected average demand (analytically):
n
E( x)   P(x )x
i1
E( x)  (.20)(0)  (.40)(1)  (.20)(2)  (.10)(3)  (.10)(4)
 1.5 units/wk
i
i
Monte Carlo Process
Use of Random Numbers
• More periods simulated, the more accurate the results
• Have to have enough trials in order to have identical results
(reach steady state)
• Often difficult to validate results of simulation
• When reaches the steady state, simulation model truly
replicates reality
• When analytical analysis is not possible, there is no
comparison; validation even more difficult
Computer Simulation with Excel Spreadsheets
Generating Random Numbers (1 of 2)
• Random numbers are typically generated using a numerical
technique
• Thus are not true random numbers but pseudorandom
numbers
• Random numbers must have the following characteristics:
•
Must be uniformly distributed
•
Numerical technique used for generating the numbers
must be efficient
•
Sequence of random numbers should not reflect any
pattern
Simulation with Excel Spreadsheets (1 of 3)