Discrete Event Simulation
Worked Solutions Tutorials 15
About this document. This companion to the DS2SIM Exercise Set
provides worked, explained answers to all exercises of Tutorials 15. Com-
putational exercises are worked out step by step, including the formulas used
and intermediate values. Conceptual questions are answered in full text, so
this document can also be used as a compact revision summary of the course.
Where the o
cial short-answer sheet only points to the slides or textbook, a
complete self-contained answer is written out here; always cross-check with
your own course slides, since those remain the reference for the exam.
,DS2SIM: Discrete Event Simulation Worked Solutions
Contents
1 Tutorial 1 Simulation Concepts and Input Modelling 4
1.1 What is simulation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.2 What is discrete event simulation? . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.3 DES vs. continuous and Monte Carlo simulation . . . . . . . . . . . . . . . . . . . . 4
1.4 Steps of a simulation study . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
1.5 Why keep a simulation model simple? . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.6 Elements of a conceptual model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
1.7 What is an in
uence diagram? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.8 What is a
ow chart? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.9 Why include an in
uence diagram in a conceptual model? . . . . . . . . . . . . . . . 6
1.10 Sojourn time vs. waiting time . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 6
1.11 NegExp when Gamma does not
t . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.12 Distributions for a bounded duration (210 min) . . . . . . . . . . . . . . . . . . . 7
1.13 Time to failure with many causes . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
1.14 Shapes covered by the Beta distribution . . . . . . . . . . . . . . . . . . . . . . . . 7
1.15 Histogram: symmetric bell shape on a
nite range . . . . . . . . . . . . . . . . . . 7
1.16 Histogram: right-skewed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.17 Histogram: left-skewed, peak near the maximum . . . . . . . . . . . . . . . . . . . 8
1.18 Choosing a distribution without data . . . . . . . . . . . . . . . . . . . . . . . . . . 8
1.19 Six issues when modelling exogenous variables . . . . . . . . . . . . . . . . . . . . . 8
1.20 Dependency in a scatterplot . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.21 Why dependency may force a revision of the conceptual model . . . . . . . . . . . 9
1.22 Bimodal service time histogram . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.23 Non-stationary arrivals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
1.24 Distribution for the degree of rust Z ∈ [0, 1] . . . . . . . . . . . . . . . . . . . . . . 10
2 Tutorial 2 Queueing Theory and Random Numbers 10
2.1 Little's law . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.2 M/M/1 basics . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10
2.3 Job shop, machine A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.4 Inverse transform for a triangular density . . . . . . . . . . . . . . . . . . . . . . . . 11
2.5 Linear congruential generator . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11
2.6 Is the 1000th LCG value truly random? . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.7 Transforming an LCG value to Uniform(2,12) . . . . . . . . . . . . . . . . . . . . . 12
2.8 Queueing table for an M/M/1 system . . . . . . . . . . . . . . . . . . . . . . . . . . 12
2.9 Checking an Excel/LCG queueing simulation . . . . . . . . . . . . . . . . . . . . . . 13
2.10 M/M/1 state probabilities . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 13
3 Tutorial 3 Output Analysis and Con
dence Intervals 13
3.1 Terminating vs. non-terminating simulation . . . . . . . . . . . . . . . . . . . . . . . 14
3.2 Warming-up period . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.3 Warm-up in non-terminating simulation . . . . . . . . . . . . . . . . . . . . . . . . . 14
3.4 A PFM that makes a 24-hour supermarket terminating . . . . . . . . . . . . . . . . 14
3.5 Empty system as a representative initial state . . . . . . . . . . . . . . . . . . . . . 14
3.6 CI for the fraction of long-waiting customers . . . . . . . . . . . . . . . . . . . . . . 15
3.7 Quadrupling the runs does not exactly halve the CI . . . . . . . . . . . . . . . . . . 15
3.8 CI from 10 observations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.9 Eect of the number of runs on the CI . . . . . . . . . . . . . . . . . . . . . . . . . 15
3.10 Reading back the standard deviation from a CI . . . . . . . . . . . . . . . . . . . . 16
3.11 Validating simulation output against M/M/1 theory . . . . . . . . . . . . . . . . . 16
2
, DS2SIM: Discrete Event Simulation Worked Solutions
3.12 Which output has the limited queue length? . . . . . . . . . . . . . . . . . . . . . . 16
3.13 Matching four outputs to four service time distributions . . . . . . . . . . . . . . . 16
4 Tutorial 4 Experiments and Comparing Systems 17
4.1 Interpolation vs. extrapolation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.2 Experimental factor . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.3 Experimental factors at Schiphol . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.4 Experiment (scenario) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17
4.5 Design of experiments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.6 Three types of DoE . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.7 Linear vs. factorial design . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.8 Experimental factors for the post o
ce . . . . . . . . . . . . . . . . . . . . . . . . . 18
4.9 When are experimental factors determined? . . . . . . . . . . . . . . . . . . . . . . . 18
4.10 Two call-centre departments: CIs and paired comparison . . . . . . . . . . . . . . . 19
4.11 Pooling identical departments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
4.12 Pooling with inhomogeneous jobs . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.13 Pooling comparison with 100 runs . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.14 Improving accuracy / narrowing CIs . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.15 Overlapping 90% CIs look at 85% or 95%? . . . . . . . . . . . . . . . . . . . . . 21
4.16 Suspecting a dierence despite overlapping CIs . . . . . . . . . . . . . . . . . . . . 21
4.17 Sections of a simulation report . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
4.18 Red Tape insurance: model diagram and routing . . . . . . . . . . . . . . . . . . . 22
5 Tutorial 5 Conceptual Modelling in Enterprise Dynamics 22
5.1 Why keep simulation models simple? . . . . . . . . . . . . . . . . . . . . . . . . . . 22
5.2 Assumptions of the M/M/1 model . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.3 Desk production line . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 23
5.4 Canteen model . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24
5.5 Red Tape model: errors and extensions . . . . . . . . . . . . . . . . . . . . . . . . . 25
5.6 DES applications in logistics and supply chains . . . . . . . . . . . . . . . . . . . . . 25
3