You are on page 1of 18

1|PageUU CSM By Mesfin Abate

CHAPTER 7: SIMULATION OF QUEUING SYSTEM.

Introduction
A queuing system can be described as a system having a service facility at which units
of some kind (generically called “customers”) arrive for service; whenever there are
more units in the system than the service facility can handle simultaneously, a queue
(or waiting line) develops.
What are the three 3 types of queuing systems?

1) FIFO (First In First Out) also called FCFS (First Come First Serve) - orderly queue.
2) LIFO (Last In First Out) also called LCFS (Last Come First Serve) - stack. 3) SIRO
(Serve In Random Order).

Symbol used :-Elements of Queuing Systems

Population of Customers can be considered either limited (closed systems) or


unlimited (open systems). Unlimited population represents a theoretical model of
systems with a large number of possible customers (a bank on a busy street, a
motorway petrol station). Example of a limited population may be a number of
processes to be run (served) by a computer or a certain number of machines to be
repaired by a service man. It is necessary to take the term "customer" very generally.
Customers may be people, machines of various nature, computer processes, telephone
calls, etc.

Arrival defines the way customers enter the system. Mostly the arrivals are random
with random intervals between two adjacent arrivals. Typically the arrival is described
by a random distribution of intervals also called Arrival Pattern.

Queue represents a certain number of customers waiting for service (of course the
queue may be empty). Typically the customer being served is considered not to be in
the queue. Sometimes the customers form a queue literally (people waiting in a line
for a bank teller). Sometimes the queue is an abstraction (planes waiting for a runway
to land). There are two important properties of a queue: Maximum Size and Queuing
Discipline.

Maximum Queue Size (also called System capacity) is the maximum number of
customers that may wait in the queue (plus the one(s) being served). Queue is always
limited, but some theoretical models assume an unlimited queue length. If the queue
length is limited, some customers are forced to renounce without being served.

Queuing Discipline represents the way the queue is organised (rules of inserting and
removing customers to/from the queue). There are these ways:
2|PageUU CSM By Mesfin Abate

1) FIFO (First In First Out) also called FCFS (First Come First Serve) - orderly queue.
2) LIFO (Last In First Out) also called LCFS (Last Come First Serve) - stack.
3) SIRO (Serve In Random Order).
4) Priority Queue, that may be viewed as a number of queues for various priorities.

5) Many other more complex queuing methods that typically change the customer’s
position in the queue according to the time spent already in the queue, expected
service duration, and/or priority. These methods are typical for computer multi-access
systems.

Most quantitative parameters (like average queue length, average time spent in the
system) do not depend on the queuing discipline. That’s why most models either do
not take the queuing discipline into account at all or assume the normal FIFO queue.
In fact the only parameter that depends on the queuing discipline is the variance (or
standard deviation) of the waiting time. There is this important rule (that may be used
for example to verify results of a simulation experiment):

The two extreme values of the waiting time variance are for the FIFO queue
(minimum) and the LIFO queue (maximum).

Theoretical models (without priorities) assume only one queue. This is not considered
as a limiting factor because practical systems with more queues (bank with several
tellers with separate queues) may be viewed as a system with one queue, because the
customers always select the shortest queue. Of course, it is assumed that the
customers leave after being served. Systems with more queues (and more servers)
where the customers may be served more times are called Queuing Networks.

Service represents some activity that takes time and that the customers are waiting
for. Again take it very generally. It may be a real service carried on persons or
machines, but it may be a CPU time slice, connection created for a telephone call,
being shot down for an enemy plane, etc. Typically a service takes random time.
Theoretical models are based on random distribution of service duration also
called Service Pattern. Another important parameter is the number of servers.
Systems with one server only are called Single Channel Systems, systems with more
servers are called Multi Channel Systems.

Output represents the way customers leave the system. Output is mostly ignored by
theoretical models, but sometimes the customers leaving the server enter the queue
again ("round robin" time-sharing systems).

Queuing Theory is a collection of mathematical models of various queuing systems


that take as inputs parameters of the above elements and that provide quantitative
parameters describing the system performance.

Because of random nature of the processes involved the queuing theory is rather
demanding and all models are based on very strong assumptions (not always satisfied
3|PageUU CSM By Mesfin Abate

in practice). Many systems (especially queuing networks) are not soluble at all, so the
only technique that may be applied is simulation.

Nevertheless queuing systems are practically very important because of the typical
trade-off between the various costs of providing service and the costs associated with
waiting for the service (or leaving the system without being served). High quality fast
service is expensive, but costs caused by customers waiting in the queue are
minimum. On the other hand long queues may cost a lot because customers (machines
e.g.) do not work while waiting in the queue or customers leave because of long
queues. So a typical problem is to find an optimum system configuration (e.g. the
optimum number of servers). The solution may be found by applying queuing theory
or by simulation.

Kendall Classification of Queuing Systems


The Kendall classification of queuing systems (1953) exists in several modifications.
The most comprehensive classification uses 6 symbols:

A/B/s/q/c/p

where:

A is the arrival pattern (distribution of intervals between arrivals).

B is the service pattern (distribution of service duration).

s is the number of servers.

q is the queuing discipline (FIFO, LIFO, ...). Omitted for FIFO or if not specified.

c is the system capacity. Omitted for unlimited queues.

p is the population size (number of possible customers). Omitted for open systems

 queue characteristics:
o how, from the set of customers waiting for service, do we choose the one to be
served next (e.g. FIFO (first-in first-out) - also known as FCFS (first-come first
served); LIFO (last-in first-out); randomly) (this is often called the queue discipline)
o do we have:
 balking (customers deciding not to join the queue if it is too long)
 reneging (customers leave the queue if they have waited too long for service)
 jockeying (customers switch between queues if they think they will get served
faster by so doing)
 a queue of finite capacity or (effectively) of infinite capacity

4|PageUU CSM By Mesfin Abate

M/M/1 Queuing System (∞/FIFO)


It is a queuing model where the arrivals follow a Poisson process, service times are
exponentially distributed and there is only one server. In other words, it is a system with
Poisson input, exponential waiting time and Poisson output with single channel.

Queue capacity of the system is infinite with first in first out mode. The first M in the
notation stands for Poisson input, second M for Poisson output, 1 for the number of
servers and ∞ for infinite capacity of the system.

Formulas
λ
Probability of zero unit in the queue (Po) = 1 − -----
μ

λ2
Average queue length (Lq ) = --------
μ (μ - λ )
λ
Average number of units in the system (Ls) = --------
μ-λ
λ
Average waiting time of an arrival (Wq) = ----------
μ(μ - λ )
1
Average waiting time of an arrival in the system
---------
(Ws) =
μ-λ

Example 1
Students arrive at the head office of Universal Teacher Publications according to a
Poisson input process with a mean rate of 40 per hour. The time required to serve a
student has an exponential distribution with a mean of 50 per hour. Assume that the
students are served by a single individual, find the average waiting time of a student.

Solution.

Given
λ = 40/hour, μ = 50/hour

40
Average waiting time of a student before
--------- = 4.8 minutes
receiving service (Wq) =
50(50 - 40)
5|PageUU CSM By Mesfin Abate

Example 2
New Delhi Railway Station has a single ticket counter. During the rush hours, customers
arrive at the rate of 10 per hour. The average number of customers that can be served
is 12 per hour. Find out the following:

 Probability that the ticket counter is free.


 Average number of customers in the queue.

Solution.

Given
λ = 10/hour, μ = 12/hour

10
Probability that the counter is free = 1- ----- = 1/6
12
(10)2
Average number of customers in the queue (Lq ) = -------- = 25/6
12 (12 - 10)

Example 3
At Bharat petrol pump, customers arrive according to a Poisson process with an
average time of 5 minutes between arrivals. The service time is exponentially distributed
with mean time = 2 minutes. On the basis of this information, find out

1. What would be the average queue length?


2. What would be the average number of customers in the queuing system?
3. What is the average time spent by a car in the petrol pump?
4. What is the average waiting time of a car before receiving petrol?

Solution.

1 1
Average inter arrival time = --- = 5minutes = --- hour
λ 12
λ = 12/hour

1 1
Average service time = --- = 2 minutes = --- hour
μ 30
μ = 30/hour

(12)2 4
Average queue length, Lq = ----------- = ---
30(30 - 12) 15

Average number of customers, 12 2


=
Ls = ------- ----
6|PageUU CSM By Mesfin Abate

30 - 12 3

1
Average time spent at the petrol
---------- = 3.33 minutes
pump =
30 - 12

12
Average waiting time of a car
--------- = 1.33 minutes
before receiving petrol =
30(30 - 12)

Example 4
Universal Bank is considering opening a drive in window for customer service.
Management estimates that customers will arrive at the rate of 15 per hour. The teller
whom it is considering to staff the window can service customers at the rate of one
every three minutes.

Assuming Poisson arrivals and exponential service find

1. Average number in the waiting line.


2. Average number in the system.
3. Average waiting time in line.
4. Average waiting time in the system.

Solution.

Given
λ = 15/hour,
μ = 3/60 hour
or 20/hour

(15)2
Average number in the waiting line = ---------- = 2.25 customers
20(20 - 15)

15
Average number in the system = ---------- = 3 customers
20 - 15

15
Average waiting time in line = ------------ = 0.15 hours
20(20 - 15)

1
Average waiting time in the system = --------- = 0.20 hours
20 - 15

Example 5
7|PageUU CSM By Mesfin Abate

Chhabra Saree Emporium has a single cashier. During the rush hours, customers arrive
at the rate of 10 per hour. The average number of customers that can be processed by
the cashier is 12 per hour. On the basis of this information, find the following:

 Probability that the cashier is idle


 Average number of customers in the queuing system
 Average time a customer spends in the system
 Average number of customers in the queue
 Average time a customer spends in the queue

Solution.

Given
λ = 10/hour, μ = 12/hour
8|PageUU CSM By Mesfin Abate
9|PageUU CSM By Mesfin Abate
10 | P a g e U U C S M B y M e s f i n A b a t e

Students arrive at the head office of Universal Teacher Publications according to a


Poisson input process with a mean rate of 40 per hour. The time required to serve a
student has an exponential distribution with a mean of 50 per hour. Assume that the
students are served by a single individual, find the average waiting time of a student.

Solution.

Given
λ = 40/hour, μ = 50/hour

40
Average waiting time of a student before
--------- = 4.8 minutes
receiving service (Wq) =
50(50 - 40)

Example 2
New Delhi Railway Station has a single ticket counter. During the rush hours, customers
arrive at the rate of 10 per hour. The average number of customers that can be served
is 12 per hour. Find out the following:

 Probability that the ticket counter is free.


 Average number of customers in the queue.

Solution.

Given
λ = 10/hour, μ = 12/hour

10
Probability that the counter is free = 1- ----- = 1/6
12
(10)2
Average number of customers in the queue (Lq ) = -------- = 25/6
12 (12 - 10)

Example 3
At Bharat petrol pump, customers arrive according to a Poisson process with an
average time of 5 minutes between arrivals. The service time is exponentially distributed
with mean time = 2 minutes. On the basis of this information, find out

1. What would be the average queue length?


2. What would be the average number of customers in the queuing system?
3. What is the average time spent by a car in the petrol pump?
4. What is the average waiting time of a car before receiving petrol?
11 | P a g e U U C S M B y M e s f i n A b a t e

Solution.

1 1
Average inter arrival time = --- = 5minutes = --- hour
λ 12
λ = 12/hour

1 1
Average service time = --- = 2 minutes = --- hour
μ 30
μ = 30/hour

(12)2 4
Average queue length, Lq = ----------- = ---
30(30 - 12) 15

12 2
Average number of customers,
------- = ----
Ls =
30 - 12 3

1
Average time spent at the petrol
---------- = 3.33 minutes
pump =
30 - 12

12
Average waiting time of a car
--------- = 1.33 minutes
before receiving petrol =
30(30 - 12)

Example 4
Universal Bank is considering opening a drive in window for customer service.
Management estimates that customers will arrive at the rate of 15 per hour. The teller
whom it is considering to staff the window can service customers at the rate of one
every three minutes.

Assuming Poisson arrivals and exponential service find

1. Average number in the waiting line.


2. Average number in the system.
3. Average waiting time in line.
4. Average waiting time in the system.
12 | P a g e U U C S M B y M e s f i n A b a t e

Solution.

Given
λ = 15/hour,
μ = 3/60 hour
or 20/hour

(15)2
Average number in the waiting line = ---------- = 2.25 customers
20(20 - 15)

15
Average number in the system = ---------- = 3 customers
20 - 15

15
Average waiting time in line = ------------ = 0.15 hours
20(20 - 15)

1
Average waiting time in the system = --------- = 0.20 hours
20 - 15

Example 5
Chhabra Saree Emporium has a single cashier. During the rush hours, customers arrive
at the rate of 10 per hour. The average number of customers that can be processed by
the cashier is 12 per hour. On the basis of this information, find the following:

 Probability that the cashier is idle


 Average number of customers in the queuing system
 Average time a customer spends in the system
 Average number of customers in the queue
 Average time a customer spends in the queue

Solution.

Given
λ = 10/hour, μ = 12/hour

10
Po = 1- ----- = 1/6
12
10
Ls = ------- = 5 customers
12 - 10

1
Ws = ---------- = 30 minutes
12 - 10
13 | P a g e U U C S M B y M e s f i n A b a t e

(10)2
Lq = ----------- = 25/6 customers
12(12 - 10)

10
Wq = --------- = 25 minutes
12(12 - 10)

λ = 20/hour,
μ=25/hour

ρ=20/25= 0.8 Idle time 1-p=0.2

ρ=1/15min= 4 cars per Hour , p=2/4=0.5

Lq=p2/(1-p) 0.25/.5=1/2=0.5

Lq=λWqWq=Lq/λ =0.5/2=.25hours0.25x60 min=15min


14 | P a g e U U C S M B y M e s f i n A b a t e
1|PageUU CSM By Mesfin Abate

1
2|PageUU CSM By Mesfin Abate

2
3|PageUU CSM By Mesfin Abate

3
4|PageUU CSM By Mesfin Abate

You might also like