Professional Documents
Culture Documents
COMPUTER SIMULATION
Machine
(Server)
Arriving
Depar2ng
7
6
5
4
Blank
Parts
Finished
Parts
Queue
(FIFO)
Part
in
Service
Computer Simulation 2
ACD in review …
• How to build ACD for a simple queuing
system the above?
Computer Simulation 3
Event Graph
• Simulation Graphs (originally called Event Graphs)
were introduced by Schruben in 1983 as a means of
graphically representing discrete event simulation
models.
Computer Simulation 4
Discrete Event Simulation
• A discrete event simulation model consists of
two fundamental elements:
– a set of state variables, or states
– a set of events.
En2ty
En2ty
begins
En2ty
completes
arrives
service
service
Time
x
x
x
Event
“Event”
Event
Computer Simulation 6
Example: A Single Server
Events
• Events are defined whenever at least one state
variable changes value.
• For example, the arrival of a customer to a queuing
system could be an event in a model of the system,
since the number in the queue increases by 1
whenever a customer arrives (i.e. Q + &+I, or Q++).
• Similarly, when a customer finishes service and
leaves the system, a server will become (possibly
temporarily) idle.
• Thus the departure of a customer can also be an
event since the value of B is decreased by 1.
Computer Simulation 7
Symbols in Event Graph
• Event graph consists of nodes and edges.
• Each node corresponds to an event, or state transition,
and each edge corresponds to the scheduling of other
• Whenever Event A occurs, if condition (i) is true after
A’s state transition, Event B is scheduled to occur t
time units later event.
• Each edge can optionally have an associated Boolean
condition and/or a time delay.
(i)
A B
t
Computer Simulation 8
Interpretation the Symbols
• The occurrence of Event A causes Event B to be
scheduled after a time delay oft, providing condition
(i) is true (after the state transitions for Event A
have been made).
• By convention, the time delay t is indicated toward
the tail of the scheduling edge and the edge
condition is shown just above the wavy line through
the middle of the edge.
• If there is no time delay, then t is omitted.
• Similarly, if Event B is always scheduled following
the occurrence of Event B, then the edge condition
is omitted, and the edge is called an unconditional
edge.
Computer Simulation 9
Example: EV Single Server
Computer Simulation 10
Algorithm
Computer Simulation 11