Simulation 2
Simulation 2
Also: mixed
discrete-
continuous
Peak Clearance
revenue revenue
• For each h, get statistics on the 50 observed (simulated) Z(h)’s – average, standard deviation, 95% confidence interval on
E(Z(h)), min, max, and proportion < 0 (estimates probability of losing money)
• Also make histogram of the 50 IID values of the Z(h)’s for each h, I-beam confidence-interval plot vs. h to estimate
expected-profit-maximizing h
o Will not get into the Excel graphics details for these graphs … see file
• Identify “response” cells or interest, in this case the profit cells for each value of h
• Specify number of replications (hundreds, thousands no problem)
• @RISK automatically compiles many statistics on the identified response cells (mean, standard deviation, extremes,
quantiles, histograms, …)
• Also, it’s the logic used if coding a dynamic simulation in C++, Java, etc. Given Arrival, Service Times (Minutes)
Entity (patient) Arrival Interarrival Service
▪ Example: single-server queue, same as registration desk in urgent-care clinic in Chapt. 2 Number Time Time Time
1 0.000000 0.486165
Registration 2 1.965834 1.965834 0.665121
3 2.275418 0.309584 0.354917
Arriving Reg. Desk Departing 4 2.909957 0.634539 0.563653
5 4.033363 1.123406 0.051575
patients patients 6 5.136229 1.102866 2.652734
7 6.539427 1.403198 0.379540
8 6.744513 0.205086 0.330272
The last three service times
Patient being 9 7.845616 1.101103 2.985174
are not used.
registered 10 8.330407 0.484791 0.290218
Queue
• First arrival at time 0, arrival times “given” (actually, see Sec. 5.2.1) … inter-arrival times computed from them, more useful
File: Model_03_01.xls
• Service times “given” (Sec. 5.2.1, again) from book’s website
▪ Schedule the next arrival (Col. J) for now (clock in Col. A), plus next interarrival time (Col. C, rows 6-14)
▪ Compute rectangle areas under B(t), L(t), Lq(t) between time of last event and now; record into Cols. O-Q
(will be added up at end of simulation for total areas)
▪ If server is now idle
• Arriving (lucky) entity goes right into service, no wait in queue
• Note time of arrival (now, Col. A) in Col. G for later computation of time in system
• Schedule entity’s departure for now (Col. A) plus next service time (Col. D, rows 5-10), put into Col. K
• Record 0 queue time (Col. N)
▪ Else (server is already busy)
• Entity queues up; put arrival time at end of queue list (Cols. H-I)
▪ Specialized dynamic simulation software has actually been around since the 1960s (see text for a very brief
history)
• Simio is a relatively new entry, but developed by the same people who earlier developed several other packages, so lots of
experience behind it
• Simio uses an object-oriented graphical approach to simplify modeling