Chapter 4
Chapter 4
event Simulation
EGR 502
4-1
"When the only tool you have is a
hammer, every problem begins to
resemble a nail."
- Abraham Maslow
4-3
How does discrete event
simulation (DES) work?
4-4
Sequence of steps:
4-5
From Chapter 3 and painfully
documented step-by-step in Chapter 4:
ATM Simulation Example
8 7 6 5 4 3 2 1
4-6
Problem Definition
• Define problem:
• ATM service has one line (queue) and can serve only one customer (entity) at
a time.
• A customer arrives every E(3) min.
• ATM can serve (process) one customer with a service time of E(2.4) min
• ATM is in lobby and thus is only available 10 hours per day
• Desire to find out
• Average waiting time per customer
• Average number of people in queue
• For the desired output to examine above, what OTHER things might
be of interest?
4-7
Model Assumptions
4-8
Simulation Setup
4-9
Simulation Setup
• Statistical Accumulators
• Simple average
• SUM{(observation value)} / (number of observations)
• Example: as each entity exits queue, note the time in queue
• This means if an entity goes straight through to the ATM, queue time = 0 for that entity.
• Based upon the manual simulation, for the first 5 entities through the queue,
4-10
Issues
• It is possible that, for your problem definition and simulation scenario, you
NEVER reach steady state.
• IF so, then your mathematical steady state predictions will not hold for verification.
(after all, why did text only go to 22 events that were manually calculated in Table 4.1?)
4-11
Is this ‘steady state’?
4-12
Text info after section 4.3
4-13
Evolution of Simulation Software
4-14
LaTeX stuff
• Converting table data to LaTeX: Create the format, then copy into
TeXWorks RECOMMENDED
• Web-based creator from scratch: http://www.tablesgenerator.com/
• You can paste into the cells, merge them, etc.
• A tool that is “near WYSIWYG” and you can carry around with you
• La Table:
http://ctan.math.utah.edu/ctan/tex-archive/help/Catalogue/entries/latable.
html
4-15
From Antithi Restaurant model file, time series data. 16 Columns x 64 Rows
4-16
Open La Table. Create new sheet with 16 Columns x 64 Rows
4-17
Under Edit, Select All
4-18
Paste into the selected area. Do formatting as needed.
4-19
Paste into the selected area. Do formatting as needed.
4-20
Save as a .tex file, or just copy to clipboard.
4-21
Paste into your main .tex document. Done.
4-22
Create PDF. You still need to fiddle with format (my columns were too wide).
4-23