Simulation Chapter 14 Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14-1 Chapter Topics ■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 Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14-2 Overview ■ 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 Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14-3 Monte Carlo Process ■ 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) Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14-4 Monte Carlo Process Use of Random Numbers (1 of 10) In the Monte Carlo process, values for a random variable are generated by sampling from a probability distribution Example: ComputerWorld demand data for laptops selling for $4,300 over a period of 100 weeks Table 14.1 Probability Distribution of Demand for Laptop PC’s Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14-5 Monte Carlo Process Use of Random Numbers (2 of 10) 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 Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14-6 Monte Carlo Process Use of Random Numbers (3 of 10) Figure 14.1 A Roulette Wheel for Demand Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14-7 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 Figure 14.2 umbered Roulette Wheel Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14-8 Monte Carlo Process Use of Random Numbers (5 of 10) Table 14.2 Generating Demand from Random Numbers Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14-9 Monte Carlo Process Use of Random Numbers (6 of 10) Select number from a random number table: Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall Table 14.3 Numbers Delightfully Random 14- Crystal Ball Simulation of Profit Analysis Model (11 of 15) Exhibit 14.19 Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14- Crystal Ball Simulation of Profit Analysis Model (12 of 15) Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall Exhibit 14.20 14- Crystal Ball Simulation of Profit Analysis Model (13 of 15) Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall Exhibit 14.21 14- Crystal Ball Simulation of Profit Analysis Model (14 of 15) Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall Exhibit 14.22 14- Crystal Ball Simulation of Profit Analysis Model (15 of 15) Exhibit 14.23 Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14- Verification of the Simulation Model (1 of 2) ■ 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 Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14- Verification of the Simulation Model (2 of 2) ■ 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 Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14- Some Areas of Simulation Application ■Queuing ■Inventory Control ■Production and Manufacturing ■Finance ■Marketing ■Public Service Operations ■Environmental and Resource Analysis Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14- Example Problem Solution (1 of 6) Willow Creek Emergency Rescue Squad Minor emergency requires two-person crew Regular emergency requires a three-person crew Major emergency requires a five-person crew Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14- Example Problem Solution (2 of 6) Distribution of number of calls per night and emergency type: Manually simulate 10 nights of calls Determine average number of calls each night Determine maximum number of crew members that might be needed on given night Copyright © 2010 Pearson Education, Inc Publishingany as Prentice Hall 14- Example Problem Solution (3 of 6) Step 1: Develop random number ranges for the probability distributions Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14- Example Problem Solution (4 of 6) Step 2: Set Up a Tabular Simulation (use second column of random numbers in Table 14.3) Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14- Example Problem Solution (5 of 6) Step continued: Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14- Example Problem Solution (6 of 6) 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 Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14- Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14- ... for laptops selling for $4,300 over a period of 100 weeks Table 14. 1 Probability Distribution of Demand for Laptop PC’s Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14- 5... Publishing as Prentice Hall Exhibit 14. 2 14- Simulation with Excel Spreadsheets (3 of 3) Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall Exhibit 14. 3 14- Computer Simulation with... two laptops each week (2 of 2) Exhibit 14. 5 Copyright © 2010 Pearson Education, Inc Publishing as Prentice Hall 14- Simulation of a Queuing System Burlingham Mills Example (1 of 3) Table 14. 5 Distribution