Simulation 1.1
Simulation 1.1
Simulation 1.1
Simulation
IB3200
LECTURE 1
How DES works
Dr Katy Hoad
http://www.wbs.ac.uk/about/person/Kathryn-Hoad/
Join at vevox.app
Or
Search Vevox in the app store
ID: 152-860-971
Covered
in this lecture:
3
Example: the bank
Resource
Time
Events
4
Manual simulation
Assume Simulation clock starts at 9am. Result of
interest
6
Join: vevox.app ID: 152-860-971
How DES works…
Types of queue discipline
• FIFO (first in, first out)
• LIFO (last in, first out)
• SIRO (serve in random order)
• Priority (e.g. most urgent, shortest
processing time, etc…)
7
Join: vevox.app ID: 152-860-971
How DES works…
Queue types
Can have single or multi-server queues
8
Join: vevox.app ID: 152-860-971
How DES works…
Queue types
Can have single or multi-server queues
9
Join: vevox.app ID: 152-860-971
How DES works…
Service times
Again services times can be:
10
Join: vevox.app ID: 152-860-971
How DES works…
Service times
Again services times can be:
12
Join: vevox.app ID: 152-860-971
How DES works…
The main components of a DES model
• Activities
– what the entities do
13
Join: vevox.app ID: 152-860-971
How DES works…
The main components of a DES model
• Attributes (called labels in Simul8)
– characteristics of entities which can determine what
activities they do, in what order, for how long etc...
What could be the attributes in our simple bank
simulation?
14
Join: vevox.app ID: 152-860-971
How DES works…
The main components of a DES model
15
Join: vevox.app ID: 152-860-971
How DES works…
The main components of a DES model
• Queues
– real queues (as in a bank)
– virtual queues (hospital waiting list)
– buffers (storage)
What are the queues in our simple bank simulation?
16
Join: vevox.app ID: 152-860-971
How DES works…
The main components of a DES model
• Resources
– required for activities to occur: people, equipment,
materials etc…
– may be
• dedicated (attached to one activity only)
• floating (attached to several activities, although only
one at a time)
• shared (attached to several activities simultaneously)
17
Join: vevox.app ID: 152-860-971
How DES works…
The main components of a DES model
• Resources
– required for activities to occur (people, equipment,
materials etc..): dedicated, floating, shared.
18
Join: vevox.app ID: 152-860-971
How DES works…
The main components of a DES model
19
Example: Identifying components
In a simulation of a petrol station identify which of the
following are events, which are activities and which are
queues: (assume can not pay at pump)
customer arrives
waits for a petrol pump
starts filling car with petrol
fills car with petrol
finishes filling car with petrol
waits to pay
starts paying
pays and buys sweets
finishes paying
20
Join: vevox.app ID: 152-860-971
DES Process Flow Diagram
- - Building a simple diagram of your system
• Software independent Useful for
conceptual
• Circles = queues Circles and modelling
boxes should – Lecture 2
21
e.g. Process flow for the petrol station simulation
Wait to
Pay
pay
Cashier
22
e.g. Process flow for the petrol station simulation
Capacity?
Service
Queue discipline?
Inter-arrival times
times
Wait for Petrol
Fill car
fuel pump pump
Quantity
available?
Service times
Wait to
Pay
pay
Capacity?
Queue discipline?
Cashier
Quantity
23
available?
How DES software works…
• A DES program keeps a list of future events
and actions them in time order.
• Uses two types of event: conditional and
bound (= can be scheduled)
– Conditional (C-)events: start activities
– Bound (B-)events: end activities and arrivals
• The simulation maintains a future events list
that contains future B-events
24
How DES software works…
The three phases
• Time phase: Move simulation clock
to time of next B-event
• B-phase: Execute all B-events due
at this time
• C-phase: Test conditions of all C-
events and execute any which are
satisfied
25
How DES software works: The Three Phases
• Time phase: Move simulation clock to time of next B-event
• B-phase: Execute all B-events due at this time:
Time
Events
27
How DES software works: The Three Phases
Time now
09.00 Future B-Events list
09.01 Mrs Blonde arrives
56
POST- LECTURE
ON-LINE
ACTIVITY
57
End of live lecture
58
Exercise: a launderette