Lecture Note on Discrete Event Sim (1)
Lecture Note on Discrete Event Sim (1)
Discrete event simulation relies on the occurrence of specific events to advance a model from one
state to another over time while continuous simulation represents model behaviour over a
continuum of time independent of events occurring in the system.
Discrete event simulation: This can be defined as the variation in a model caused by a
chronological sequence of events acting on it.
Events: These are instantaneous occurrences that may cause variations or changes in the state
of a system.
State: The current condition of the system at any given time, defined by the values of the
attributes.
A state variable is a set of variables that captures the salient properties of the system or some
entities at a given time.
Clock: This keeps track of simulation time and may be used to trigger events in the system
Simulation time may or may not be the same as wall clock or real time. Wall clock time refers
to how humans perceive the passage of time. A simulation may run at wall clock time to provide
a realistic representation as perceived by a human. It may also run considerably faster than wall
clock time to allow for analysis of a system that would normally take hours, weeks, or months
to evolve in real time.
Queuing System
This is a representative of many types of systems found in our daily lives. Any system where
the customer requests a service for a finite - capacity resource may be considered to be a
queuing system.
1
A queuing system can also be referred to as a system of flow. A new customer enters the queuing
system and joins the queue, i.e., line, of customers, unless there is no queue and another
customer who completes his service may exit the system at the same time. During the
execution, a waiting line is formed in a system because the arrival time of each customer is not
predictable, and the service time often exceeds customer inter - arrival times.
2
Fig 3. Multiple Queue Multiple Servers
• Customer Arrival: This is usually a random event. Random event refers to occurring
without a recognizable pattern. Random events can be represented by statistical
distributions that allow one to simulate these seemingly random occurrences.
• Customer service time: This is the time it takes the server to attend to a customer. It may
also be random since it may depend on the amount of items the customer has or the
complexity of the transaction that must occur.
In a discrete event simulation these random events are controlled by an event list, which is
a list that contains the next time an event will occur. The time for each event is randomly
chosen by an event generator and added to the event list. The event list is ordered in
increasing time. When the simulation clock matches the time of the next event in the event
3
list, that event is executed and the state of the system will instantaneously change to a new
state. That event is then removed from the event list and the next event waits to be executed.
• Inter-arrival Time: This is the time between customer arrivals. This time is important
because it will indicate the random time at which the next customer will arrive at the queue.
This number will need to be computed for the simulation to account for the arrival of each
customer
• Queue Behaviour: This refers to the actions of customers while in a queue waiting for
service to begin. This include:
o Balking: a situation where incoming customer leaves when he/she sees that the line
is too long.
o Reneging: a situation where incoming customer leaves after being in the line when
he/she sees that the line is moving too slowly.
o Jockeying: a situation where incoming customer moves from one line to another if
he/she has chosen a slow line.
• Queue Discipline: This refers to the logical ordering of customers in a queue and
determines which customer will be chosen for service when a server becomes free.
Common queue discipline include: first- in- first – out (FIFO), last – in –last –out (LIFO),
Service in random order (SIRO), shortest processing time (SPT), and service according to
priority (PR).
NOTATION
Kendall ’ s notation , A/B/c/N/K, is used to concisely define a queue and its parameters.
A= inter – arrival B =
service distribution c=
number of servers
N= queue capacity;
K= the size of the calling population.
D =deterministic
M = Poisson
G = general
Ek =Erlang
Usually the A/B/c notation is used when “ N ” and “ K ” are infinite. For example, M/M/1
represents a single server queuing model, and the inter - arrival and service time are
exponentially distributed.
4
Notations for Queuing Model Statistics
Little’s Law
The average number of customers (L) is equal to the arrival rate ( λ ) multiplied by the average
time ( w ) the customer spends in the system: L = λ w . Little ’ s law is meaningful in that the
law holds regardless of any kind of the arrival and service distribution. Thus, Little ’ s law does
not require restricted assumptions for the types of arrival and service patterns.
5
Useful formula