0% found this document useful (0 votes)
12 views23 pages

Chapter 4

ENGR502 lecture

Uploaded by

jtflag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
12 views23 pages

Chapter 4

ENGR502 lecture

Uploaded by

jtflag
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPT, PDF, TXT or read online on Scribd
You are on page 1/ 23

Chapter 4: Discrete-

event Simulation
EGR 502

4-1
"When the only tool you have is a
hammer, every problem begins to
resemble a nail."
- Abraham Maslow

Army Motto: If the tool doesn’t work,


get a BIGGER hammer.
4-2
Types of Events

• Scheduled (independent) events –


Events that occur after some passage of time, independent of
conditions in the system.
• Conditional (dependent) events –
Events that occur after some condition is met or some other event
occurs.

• Both are used in Discrete-Event Simulation (the type that ProModel


represents), but the timeline is based upon the Scheduled events.

4-3
How does discrete event
simulation (DES) work?

4-4
Sequence of steps:

1. events are scheduled


2. the clock moves to the next
event time
3. the event is processed
(usually scheduling more
events)
4. any conditional events are
processed
5. Go to step 2

4-5
From Chapter 3 and painfully
documented step-by-step in Chapter 4:
ATM Simulation Example

Arriving ATM ATM Departing


Customers Queue Server Customers

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

• There are no customers in the system initially


• queue is empty
• ATM is idle (empty as well).
• The move time from the queue to the ATM is negligible
• therefore move time is not modeled in time.
• queue output based upon first-in, first-out (FIFO) basis.
• ATM is 100% available (reliable)
• never experiences failures or “Down Time” (DT)

4-8
Simulation Setup

• Entity Attributes – values that are unique to the Entities created


• Arrival Time
• Nothing else needed if you are doing discrete event scheduling
(which you are)
• State Variables – System Conditions of interest at any point in time
• Number of Entities in queue = NQ @ ti
• ATM status @ ti = {0 if empty, 1 if serving} . Capacity is set at 1.

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,

AVG Wait = (0+0+0+3.08+4.76) / 5 = 1.57 minutes


• This number only accounts for entities that entered AND exited the queue!
• Time average
• SUM{ (Time increment)(observation during each time increment) } / Total time
• Example: Time-weighted queue level –known as the average queue level or “average
number of entities in queue”

Avg number in queue = SUM(Ti NQi ) / Total Time

4-10
Issues

• Starting conditions – queue empty

• Run length – reach steady state?

• Must determine how you are content with that time

• 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

• Rest discusses the general architecture of simulation software


• Notice how text is tied into a single computer (processing system) per single
simulation operator.
• We are using a remote ‘server’ and a network ‘profile’ to log in, from
a local computer. So where does the data go?
• Server hard drive
• Network profile virtual drive (H:\, for example)
• Local computer drive
• You must know WHERE YOUR DATA IS STORED AND WHERE IT GOES TO.
• That’s why I emphasize you store at least the model file locally
• Downside: A network-based model file runs slowly because it is pushing all these
simulation, schedule-based fraction of time outputs back and forth across the Ethernet
(slow) between local file and server processor.

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

• Can run off a USB drive.


• Example follows…

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

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy