Seu SlideShare está sendo baixado. ×

Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Anúncio
Carregando em…3
×

1 de 34 Anúncio

# Hillier_Chapter12.pptx

Simulation

Simulation

Anúncio
Anúncio

Anúncio

### Hillier_Chapter12.pptx

1. 1. Table of Contents Chapter 12 (Computer Simulation: Basic Concepts) Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.1 The Essence of Computer Simulation (Section 12.1) 12.2 Example 1: A Coin-Flipping Game (Section 12.1) 12.3–12.7 Example 2: Heavy Duty Company (Section 12.1) 12.8–12.14 A Case Study: Herr Cutter’s Barber Shop (Section 12.2) 12.15–12.23 Analysis of the Case Study (Section 12.3) 12.24–12.31 Outline of a Major Computer Simulation Study (Section 12.4) 12.32–12.34
2. 2. The Essence of Computer Simulation • A stochastic system is a system that evolves over time according to one or more probability distributions. • Computer simulation imitates the operation of such a system by using the corresponding probability distributions to randomly generate the various events that occur in the system. • Rather than literally operating a physical system, the computer just records the occurrences of the simulated events and the resulting performance of the system. • Computer simulation is typically used when the stochastic system ivolved is too complex to be analyzed satisfactorily by analytical models. Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.2
3. 3. Example 1: A Coin-Flipping Game Rules of the game: 1. Each play of the game involves repeatedly flipping an unbiased coin until the difference between the number of heads and tails tossed is three. 2. To play the game, you are required to pay \$1 for each flip of the coin. You are not allowed to quit during the play of a game. 3. You receive \$8 at the end of each play of the game. • Examples: Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.3 HHH 3 flips You win \$5 THTTT 5 flips You win \$3 THHTHTHTTTT 11 flips You lose \$3
4. 4. Computer Simulation of Coin- Flipping Game • A computer cannot flip coins. Instead it generates a sequence of random numbers. • A number is a random number between 0 and 1 if it has been generated in such a way that every possible number within the interval has an equal chance of occurring. • An easy way to generate random numbers is to use the RAND() function in Excel. • To simulate the flip of a coin, let half the possible random numbers correspond to heads and the other half to tails. • 0.0000 to 0.4999 correspond to heads. • 0.5000 to 0.9999 correspond to tails. Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.4
5. 5. Computer Simulation of Coin- Flipping Game Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 A B C D E F G Coin-Flipping Game Required Difference 3 Cash At End of Game \$8 Summary of Game Number of Flips 7 Winnings \$1 Random Total Total Flip Number Result Heads Tails Stop? 1 0.9016 Tails 0 1 2 0.0515 Heads 1 1 3 0.4396 Heads 2 1 4 0.6349 Tails 2 2 5 0.8241 Tails 2 3 6 0.7694 Tails 2 4 7 0.6820 Tails 2 5 Stop 8 0.9856 Tails 2 6 NA 9 0.2223 Heads 3 6 NA
6. 6. Data Table for 14 Replications of Coin- Flipping Game Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.6 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 I J K L M Data Table for Coin-Flipping Game (14 Replications) Number Play of Flips Winnings 7 \$1 1 19 -\$11 2 5 \$3 3 3 \$5 4 11 -\$3 5 9 -\$1 6 5 \$3 7 5 \$3 8 3 \$5 9 3 \$5 10 5 \$3 11 5 \$3 12 5 \$3 13 9 -\$1 14 3 5 Average 6.43 \$1.57 Select the whole table (J6:L20), before choosing Table from the Data menu.
7. 7. Data Table for 1000 Replications of Coin- Flipping Game Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.7 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 1001 1002 1003 1004 1005 1006 1007 1008 I J K L M Data Table for Coin-Flipping Game (1000 Replications) Number Play of Flips Winnings 5 \$3 1 3 \$5 2 9 -\$1 3 9 -\$1 4 5 \$3 5 5 \$3 6 9 -\$1 7 5 \$3 8 7 \$1 9 5 \$3 10 11 -\$3 995 5 \$3 996 7 \$1 997 7 \$1 998 7 \$1 999 17 -\$9 1000 19 -\$11 Average 8.83 -\$0.83
8. 8. Corrective Maintenance versus Preventive Maintenance • The Heavy Duty Company has just purchased a large machine for a new production process. • The machine is powered by a motor that occasionally breaks down and requires a major overhaul. Therefore, a second standby motor is kept, and the two motors are rotated in use. • The breakdowns always occur on the fourth, fifth, or sixth day that the motor is in use. Fortunately, it takes fewer than three days to overhaul a motor, so a replacement is always ready. Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.8 Cost of a Replacement Cycle that Begins with a Breakdown Replace a Motor \$2,000 Lost production during replacement 5,000 Overhaul a motor 4,000 Total \$11,000
9. 9. Probability Distribution of Breakdowns Day Probability of a Breakdown Corresponding Random Numbers 1, 2, 3 0 4 0.25 0.0000 to 0.2499 5 0.5 0.2500 to 0.7499 6 0.25 0.7500 to 0.9999 7 or more Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.9
10. 10. Computer Simulation of Corrective Maintenance Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.10 1 2 3 4 5 6 7 8 9 10 11 12 13 14 30 31 32 33 34 A B C D E F G H I J K Heavy Duty Company Corrective Maintenance Simulation Random Time Since Last Cumulative Cumulative Distribution of Breakdown Number Breakdown Day Cost Cost Time Between Breakdowns 1 0.5267 5 5 \$11,000 \$11,000 Number 2 0.9685 6 11 \$11,000 \$22,000 Probability Cumulative of Days 3 0.8465 6 17 \$11,000 \$33,000 0.25 0 4 4 0.4735 5 22 \$11,000 \$44,000 0.5 0.25 5 5 0.4525 5 27 \$11,000 \$55,000 0.25 0.75 6 6 0.9994 6 33 \$11,000 \$66,000 7 0.4022 5 38 \$11,000 \$77,000 Breakdown Cost \$11,000 8 0.1556 4 42 \$11,000 \$88,000 9 0.9489 6 48 \$11,000 \$99,000 10 0.2082 4 52 \$11,000 \$110,000 26 0.0688 4 132 \$11,000 \$286,000 27 0.7892 6 138 \$11,000 \$297,000 28 0.6054 5 143 \$11,000 \$308,000 29 0.1216 4 147 \$11,000 \$319,000 Average Cost per Day 30 0.0506 4 151 \$11,000 \$330,000 \$2,185
11. 11. Preventive Maintenance Options • Preventive maintenance would involve scheduling the motor to be removed (and replaced) for an overhaul at a certain time, even if a breakdown has not occurred. • The goal is to provide maintenance early enough to prevent a breakdown. • Scheduling the overhaul enables removing and replacing the motor at a convenient time when the machine is not in use, so no production is lost. Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.11 Cost of a Replacement Cycle that Begins without a Breakdown Replace a motor on overtime \$3,000 Lost production during replacement 0 Overhaul a motor before a breakdown 3,000 Total \$6,000
12. 12. Replace Motor After 3 Days • Cost of a replacement cycle is \$6,000. (Replacement always occurs without a breakdown). • Replacement cycle occurs every three days. • E(Cost per day) = (\$6,000) / (3 days) = \$2,000 per day. Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.12
13. 13. Replace Motor After 4 Days Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.13 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 A B C D E F G H I J K L M Heavy Duty Company Preventive Maintenance Simulation (Replace After 4 Days) Random Time Until Scheduled Time Event That Cumulative Cumulative Distribution of Cycle Number Breakdown Until Replacement Concludes Cycle Day Cost Cost Time Between Breakdowns 1 0.0298 4 4 Breakdown 4 \$11,000 \$11,000 Number 2 0.7147 5 4 Replacement 8 \$6,000 \$17,000 Probability Cumulative of Days 3 0.3191 5 4 Replacement 12 \$6,000 \$23,000 0.25 0 4 4 0.7966 6 4 Replacement 16 \$6,000 \$29,000 0.5 0.25 5 5 0.4653 5 4 Replacement 20 \$6,000 \$35,000 0.25 0.75 6 6 0.3701 5 4 Replacement 24 \$6,000 \$41,000 7 0.1245 4 4 Breakdown 28 \$11,000 \$52,000 Breakdown Cost \$11,000 8 0.1751 4 4 Breakdown 32 \$11,000 \$63,000 Replacement Cost \$6,000 9 0.8580 6 4 Replacement 36 \$6,000 \$69,000 10 0.7298 5 4 Replacement 40 \$6,000 \$75,000 Replace After 4 days 11 0.0324 4 4 Breakdown 44 \$11,000 \$86,000 12 0.9562 6 4 Replacement 48 \$6,000 \$92,000 13 0.2773 5 4 Replacement 52 \$6,000 \$98,000 14 0.2109 4 4 Breakdown 56 \$11,000 \$109,000 15 0.9327 6 4 Replacement 60 \$6,000 \$115,000 16 0.4827 5 4 Replacement 64 \$6,000 \$121,000 17 0.3666 5 4 Replacement 68 \$6,000 \$127,000 18 0.3375 5 4 Replacement 72 \$6,000 \$133,000 19 0.2818 5 4 Replacement 76 \$6,000 \$139,000 20 0.6351 5 4 Replacement 80 \$6,000 \$145,000 21 0.4333 5 4 Replacement 84 \$6,000 \$151,000 22 0.9768 6 4 Replacement 88 \$6,000 \$157,000 23 0.1488 4 4 Breakdown 92 \$11,000 \$168,000 24 0.4420 5 4 Replacement 96 \$6,000 \$174,000 25 0.2325 4 4 Breakdown 100 \$11,000 \$185,000 26 0.7521 6 4 Replacement 104 \$6,000 \$191,000 27 0.8106 6 4 Replacement 108 \$6,000 \$197,000 28 0.2376 4 4 Breakdown 112 \$11,000 \$208,000 29 0.3160 5 4 Replacement 116 \$6,000 \$214,000 Average Cost per Day 30 0.8749 6 4 Replacement 120 \$6,000 \$220,000 \$1,833
14. 14. Replace Motor After 5 Days Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.14 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 A B C D E F G H I J K L M Heavy Duty Company Preventive Maintenance Simulation (Replace After 5 Days) Random Time Until Scheduled Time Event That Cumulative Cumulative Distribution of Cycle Number Breakdown Until Replacement Concludes Cycle Day Cost Cost Time Between Breakdowns 1 0.6401 5 5 Breakdown 5 \$11,000 \$11,000 Number 2 0.4804 5 5 Breakdown 10 \$11,000 \$22,000 Probability Cumulative of Days 3 0.8561 6 5 Replacement 15 \$6,000 \$28,000 0.25 0 4 4 0.0251 4 5 Breakdown 19 \$11,000 \$39,000 0.5 0.25 5 5 0.5282 5 5 Breakdown 24 \$11,000 \$50,000 0.25 0.75 6 6 0.5269 5 5 Breakdown 29 \$11,000 \$61,000 7 0.3786 5 5 Breakdown 34 \$11,000 \$72,000 Breakdown Cost \$11,000 8 0.9322 6 5 Replacement 39 \$6,000 \$78,000 Replacement Cost \$6,000 9 0.7445 5 5 Breakdown 44 \$11,000 \$89,000 10 0.3389 5 5 Breakdown 49 \$11,000 \$100,000 Replace After 5 days 11 0.1712 4 5 Breakdown 53 \$11,000 \$111,000 12 0.6093 5 5 Breakdown 58 \$11,000 \$122,000 13 0.3909 5 5 Breakdown 63 \$11,000 \$133,000 14 0.3067 5 5 Breakdown 68 \$11,000 \$144,000 15 0.7306 5 5 Breakdown 73 \$11,000 \$155,000 16 0.9599 6 5 Replacement 78 \$6,000 \$161,000 17 0.8690 6 5 Replacement 83 \$6,000 \$167,000 18 0.9593 6 5 Replacement 88 \$6,000 \$173,000 19 0.1577 4 5 Breakdown 92 \$11,000 \$184,000 20 0.1414 4 5 Breakdown 96 \$11,000 \$195,000 21 0.6092 5 5 Breakdown 101 \$11,000 \$206,000 22 0.5343 5 5 Breakdown 106 \$11,000 \$217,000 23 0.7374 5 5 Breakdown 111 \$11,000 \$228,000 24 0.9481 6 5 Replacement 116 \$6,000 \$234,000 25 0.2882 5 5 Breakdown 121 \$11,000 \$245,000 26 0.1733 4 5 Breakdown 125 \$11,000 \$256,000 27 0.1046 4 5 Breakdown 129 \$11,000 \$267,000 28 0.0690 4 5 Breakdown 133 \$11,000 \$278,000 29 0.4880 5 5 Breakdown 138 \$11,000 \$289,000 Average Cost per Day 30 0.1791 4 5 Breakdown 142 \$11,000 \$300,000 \$2,113
15. 15. Herr Cutter’s Barber Shop • Herr Cutter is a German barber who runs a one-man barber shop. He opens his shop at 8:00 AM each weekday morning. His customers arrive randomly at an average rate of two customers per hour. He requires an average of 20 minutes for each haircut. • As his business has increased, his customers now often wait awhile (sometimes over half-an-hour). His loyal customers are willing to wait, but new customers are much less likely to return if they have to wait. • An article in The Barber’s Journal states • In a well-run barber shop, loyal customers will tolerate an average wait of 20 minutes, while new customers will tolerate only a 10 minute average wait. (With longer waits, they typically take their business elsewhere in the future.) Question: Should Herr Cutter hire a new associate to share the workload? Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.15
16. 16. Probability Distributions • The time required to give a haircut varies between 15 and 25 minutes. His best estimate is that the times between 15 and 25 minutes are equally likely. • Estimated distribution of service times: The Uniform distribution over the interval from 15 to 25 minutes. • To generate a random observation from the uniform distribution, with values between a and b equally likely, =a + (b–a)*RAND() • For a uniform distribution between 15 and 25 minutes, = 15 + 10*RAND() Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.16
17. 17. Probability Distributions • The barber shop has random arrivals of customers, averaging two per hour. • Estimated distribution of interarrival times: An exponential distribution with a mean of 30 minutes. • To generate a random observation from the exponential distribution, = –(mean) * LN(RAND()) • For a mean of 30 minutes, = –30*LN(RAND()) Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.17
18. 18. Building Blocks of a Simulation Model 1.A description of the components of the system, including how they are assumed to operate and interrelate. 2.A simulation clock. 3.A definition of the state of the system. 4.A method for randomly generating the (simulated) events that occur over time. 5.A method for changing the state of the system when an event occurs. 6.A procedure for advancing the time on the simulation clock. Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.18
19. 19. Building Blocks for Herr Cutter’s Simulation Model 1.A description of the components of the system, including how they are assumed to operate and interrelate. • The components are the customers, the queue, and Herr Cutter as the server. 2.A simulation clock. • t = Amount of simulated time that has elapsed so far 3.A definition of the state of the system. • N(t) = Number of customers in the barber shop at time t. 4.A method for randomly generating the (simulated) events that occur over time. • The interarrival and service times are generated using the inverse transformation method. Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.19
21. 21. AComputerSimulationofHerr Cutter’sBarberShop Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.21 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 111 112 113 114 115 A B C D E F G H I Herr Cutter's Barber Shop (exponential) Mean Interarrival Time 30 minutes (uniform) Min Service Time 15 minutes Max Service Time 25 minutes Average Time in Line (Wq) 14.1 minutes Average Time in System (W) 34.0 minutes Time Time Time Time Time Customer Interarrival of Service Service Service in in Arrival Time Arrival Begins Time Ends Line System 1 43.8 43.8 43.8 23.1 66.9 0.0 23.1 2 65.6 109.4 109.4 19.7 129.1 0.0 19.7 3 26.0 135.4 135.4 20.3 155.7 0.0 20.3 4 12.1 147.6 155.7 20.1 175.8 8.2 28.2 5 6.8 154.4 175.8 18.3 194.1 21.4 39.7 96 25.3 3,082.6 3,082.6 20.1 3,102.7 0.0 20.1 97 23.7 3,106.3 3,106.3 17.2 3,123.5 0.0 17.2 98 31.7 3,138.0 3,138.0 19.7 3,157.8 0.0 19.7 99 24.3 3,162.3 3,162.3 22.7 3,185.0 0.0 22.7 100 12.9 3,175.2 3,185.0 15.0 3,200.0 9.8 24.8
22. 22. Evolution of Number of Customers Over First 100 Minutes Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.22 20 40 60 80 100 1 2 3 Elapsed time (in minutes) Number of customers in the system
23. 23. Simulating the Barber Shop with an Associate • The only difference occurs when the next-event time-advance procedure is determining which event occurs next. • Instead of just two possibilities, there are now three: 1. A departure because Herr Cutter completes a haircut. 2. A departure because the associate completes a haircut. 3. An arrival. Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.23
24. 24. Analysis of the Case Study: Financial Factors • Revenue = \$15 per haircut • Average tip = \$2 per haircut • Cost of maintaining the shop = \$50 per working day • Salary of an associate = \$120 per working day • Commission for an associate = \$5 per haircut given by the associate. • In addition to his salary and commission, the associate would keep his own tips. Otherwise, the revenue would go to Herr Cutter. • The shop is open from 8:00 AM to 5:00 PM, so it admits customers for nine hours. Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.24
25. 25. Analysis of Continuing without an Associate • The current distribution of interarrival times has a mean of 30 minutes. Therefore, he averages 18 customers per working day. • After subtracting the cost of maintaining the shop, his average net income per working day is Net daily income = (\$15 + \$2) (18 customers) – \$50 = \$306 – \$50 = \$256 Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.25
26. 26. Features of the Queueing Simulator 1. Can run computer simulations of various kinds of basic queueing systems. 2. Can have any number of servers up to a maximum of 25. 3. Can use any of the following probability distributions for either interarrival times or service times: a) Constant time (also called the degenerate distribution). b) Exponential distribution. c) Translated exponential distribution (the sum of a constant time and a time from an exponential distribution). d) Uniform distribution. e) Erlang distribution. 4. Provides estimates of various key measures of performance: L = Expected number of customers in the system, including those being served. Lq = Expected number of customers in the queue. W = Expected waiting time in the system (includes service time) for a customer. Wq = Expected waiting time in the queue (excluding service time) for a customer. Pn = Probability of exactly n customers in the system (for n = 1, 2, … , 10). Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.26
27. 27. Queueing Simulator for Herr Cutter (Without Associate) Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.27 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 B C D E F G H Data Results Number of Servers = 1 Point Estimate Low High Interarrival Times L = 1.358 1.332 1.385 Distribution = Exponential Lq = 0.689 0.666 0.712 Mean = 30 W = 40.582 39.983 41.180 5 Wq = 20.577 19.980 21.174 Service Times P0 = 0.330 0.326 0.335 Distribution = Uniform P1 = 0.310 0.307 0.313 Minimum Value = 15 P2 = 0.183 0.180 0.185 Maximum Value = 25 P3 = 0.0492 0.0920 0.0963 P4 = 0.0451 0.0433 0.0469 Length of Simulation Run P5 = 0.0206 0.0192 0.0220 Number of Arrivals = 10,000 P6 = 0.00950 0.00849 0.01050 P7 = 0.00432 0.00360 0.00503 P8 = 0.00219 0.00163 0.00274 P9 = 0.000876 0.000540 0.001210 P10 = 0.000372 0.000165 0.000579 95% Confidence Interval Run Simulation
28. 28. Testing the Validity of the Simulation Model Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.28 1 2 3 4 5 6 7 8 9 10 11 12 A B C D E F G Template for the M/G/1 Queueing Model Data Results  0.0333 (mean arrival rate) L = 1.344  20 (expected service time) Lq = 0.678  2.887 (standard deviation) s = 1 (# servers) W = 40.356 Wq = 20.356  0.666 P0 = 0.334
29. 29. Analysis of the Option of Adding an Associate • Adding an associate would • reduce the average waiting time before a haircut begins to less than 10 minutes. • gradually attract new business until this average waiting time reaches 10 minutes. Queueing Simulator Results: Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.29 Mean of Interarrival Times Point Estimate of Wq 95 Percent Confidence Interval for Wq 20 minutes 3.33 minutes 3.05 to 3.61 minutes 15 minutes 8.10 minutes 6.98 to 9.22 minutes 14 minutes 10.80 minutes 9.51 to 12.08 minutes 14.2 minutes 9.83 minutes 8.83 to 10.84 minutes 14.3 minutes 9.91 minutes 8.76 to 11.05 minutes
30. 30. Queueing Simulator for Herr Cutter (With an Associate) Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.30 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 B C D E F G H Data Results Number of Servers = 2 Point Estimate Low High Interarrival Times L = 2.126 2.090 2.163 Distribution = Exponential Lq = 0.719 0.689 0.748 Mean = 14.3 W = 30.212 29.833 30.591 5 Wq = 10.211 9.834 10.588 Service Times P0 = 0.163 0.160 0.166 Distribution = Uniform P1 = 0.266 0.262 0.270 Minimum Value = 15 P2 = 0.233 0.230 0.235 Maximum Value = 25 P3 = 0.1541 0.1518 0.1564 P4 = 0.0877 0.0855 0.0898 Length of Simulation Run P5 = 0.0467 0.0448 0.0487 Number of Arrivals = 100,000 P6 = 0.02417 0.02264 0.02570 P7 = 0.01282 0.01162 0.01401 P8 = 0.00634 0.00546 0.00722 P9 = 0.003208 0.002530 0.003890 P10 = 0.001546 0.001076 0.002017 95% Confidence Interval Run Simulation
31. 31. Analysis of the Option of Adding an Associate • Herr Cutter believes 14.3 minutes provides an adequate and conservative estimate of the mean interarrival rate with an associate. • This corresponds to a mean arrival rate of 37.8 customers per day. • Net daily income = 37.8 (\$15) (shop revenue) + 18.9 (\$2) (his tips) – \$50 (shop maintenance) – \$120 (associate’s salary) – \$18.9 (\$5)(associate’s commission) Total \$340.30 • This compares to Herr Cutter’s current net daily income of \$256. Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.31
32. 32. Outline of a Major Computer Simulation Study • Step 1: Formulate the Problem and Plan the Study • What is the problem that management wants studied? • What are the overall objectives for the study? • What specific issues should be addressed? • What kinds of alternative system configurations should be considered? • What measures of performance of the system are of interest to management? • What are the time constraints for performing the study? • Step 2: Collect the Data and Formulate the Simulation Model • The probability distributions of the relevant quantities are needed. • Generally it will only be possible to estimate these distributions. • A simulation model often is formulated in terms of a flow diagram. • Step 3: Check the Accuracy of the Simulation Model • Walk through the conceptual model before an audience of all the key people. Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.32
33. 33. Outline of a Major Computer Simulation Study • Step 4: Select the Software and Construct a Computer Program • Classes of software • Spreadsheet software (e.g., Excel, Crystal Ball) • A general purpose programming language (e.g., C, FORTRAN, Pascal, etc.) • A general purpose simulation language (e.g., GPSS, SIMSCRIPT, SLAM, SIMAN) • Applications-oriented simulators • Step 5: Test the Validity of the Simulation Model • If the real system is currently in operation, performance data should be compared with the corresponding output generated by the simulation model. • Conduct a field test to collect data to compare to the simulation model. • Have knowledgeable personnel check how the simulation results change as the configuration of the simulated system is changed. • Watch animations of simulation runs. Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.33
34. 34. Outline of a Major Computer Simulation Study • Step 6: Plan the Simulations to Be Performed • Determine length of simulation runs. • Keep in mind that the simulation runs do no produce exact values. Each simulation run can be viewed as a statistical experiment that is generating statistical observations of the performance of the system. • Step 7: Conduct the Simulation Runs and Analyze the Results • Obtain point estimates and confidence intervals to indicate the range of likely values for the measures. • Step 8: Present Recommendations to Management Copyright © 2019 McGraw-Hill Education. All rights reserved. No reproduction or distribution without the prior written consent of McGraw-Hill Education. 12.34