0% found this document useful (0 votes)
4 views

Lecture Notes - Queuing Theory-1

The document provides an overview of queuing theory, which analyzes waiting lines in various service scenarios. It outlines key components of queuing systems, including arrivals, service facilities, and waiting lines, while discussing the costs associated with waiting and service levels. Additionally, it introduces mathematical models and equations used to evaluate service performance, with a focus on the M/M/1 queuing model and its assumptions.

Uploaded by

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

Lecture Notes - Queuing Theory-1

The document provides an overview of queuing theory, which analyzes waiting lines in various service scenarios. It outlines key components of queuing systems, including arrivals, service facilities, and waiting lines, while discussing the costs associated with waiting and service levels. Additionally, it introduces mathematical models and equations used to evaluate service performance, with a focus on the M/M/1 queuing model and its assumptions.

Uploaded by

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

INSTITUTE OF ACCOUNTANCY ARUSHA

Module: OPERATIONS RESEARCH - AFU07437 / BMU07424 / SSU07404.


Programmes: BA II + BFB II + BET II + BBM II + BEF II + BPLM II + BSS II + BAF II

Lecture Notes

Topic: Queuing (Waiting Line) Theory

Introduction

Waiting lines, or queues, are common occurrence both in everyday life and in a
variety of business and industrial situations. The formation of waiting lines
occurs whenever the demand for service from a facility exceeds the capacity of
that facility.

Examples of common waiting–line situations:

Situation Arrivals Servers


Doctor’s office Patients Doctor and nurses
Railway terminal Travellers Ticket sellers
Bank Customers Bank tellers
Billing office Clients Cashiers
Supermarket Shoppers Cash registers

Waiting line, or queuing theory can be categorized by the following


characteristics:

(i) Customers, or arrivals, that require service.


(ii) Uncertainty concerning the demand and the timing of the demand of
the customers.
(iii) Service facilities, or servers, that perform the service operation.
(iv) Uncertainty concerning the time duration of the service operation.
(v) Uncertainty concerning the behaviour of the customers as they arrive
for service and/or wait in the queue.

The three basic components of a queuing process are arrivals, service facilities,
and the actual waiting line.

The objective of queuing theory is the provision of an adequate but not excessive
service facility. The analytical models of waiting lines can help managers
evaluate the cost and effectiveness of service systems.

Important things to know:


 Waiting line costs
 Characteristics of waiting lines
 Underlying mathematical assumptions used to develop queuing models.
1
 Equations needed to compute the operating characteristics of a service
system and how they are used.

Waiting line costs:

One of the goals of queuing analysis is finding the best level of service for an
organization.
 Supermarket must decide how many cash register checkout positions
should be opened.
 Petrol stations must decide how many pumps should be opened and how
many attendants should be on duty.
 Banks must decide how many teller windows to keep open to service
customers during various hours of the day.
 Manufacturing plants must determine the optimal number of mechanics to
have on duty each shift to repair machines that break down.

Managers must deal with the trade–off between the cost of providing good
service and the cost of customer waiting time. Determining the cost of customer
waiting time may be hard, for example, the loss of goodwill.

One means of evaluating a service facility is thus to look at a total expected cost.
Total expected cost is the sum of the expected service costs and the expected
waiting costs. These costs can be illustrated graphically as shown below:

Total expected cost

Service cost
Expected Cost

Waiting cost

Optimal Service Level Level of Service

Note:
 Queuing models are categorized as stochastic or probabilistic models.
 The two stochastic elements of a queuing model are the arrivals and the
operation of the service facility.
 There are many types of queuing models.
 Only the more important and useful results will be dealt with in this topic.
 Focus will be on the applicability of the results of queuing theory rather
than on its rigorous mathematical framework.

2
Characteristics of a queuing system (Basic structures of queuing systems):

Before mathematical queuing models can be developed we need to look at the


three parts of a queuing system:

(a) The arrivals or input to the system (sometimes referred to as the


calling population or input source).
(b) The queue or the waiting line itself (Queue discipline).
(c) The service facility (service mechanism).

Lets examine the characteristics of each part.

 Arrival characteristics
The input source that generates arrivals or customers for the service
system has three major characteristics:
 Size of the calling population
 Pattern of arrivals at the system
 Behaviour of the arrivals.

Size of the calling population:


 Population sizes are considered to be either unlimited (infinite) or
limited (finite).
 Most queuing models assume an infinite calling population.
 When the calling population is finite, modeling becomes much more
complex.

Pattern of arrivals at the system:


 Customers either arrive at a service facility according to some
known schedule or else they arrive randomly.
 Arrivals are considered random when they are independent of one
another and their occurrence cannot be predicted exactly.
 The Poisson probability distribution is used in many queuing
models to represent arrival patterns.

Behaviour of the arrivals:


 Most queuing models assume that an arriving customer is a patient
customer.
 Patient customer are machines or people that wait in the queue
until they are served and do not switch between lines.
 However, people have been known to balk or renege.
 Balking refers to customers who refuse to join the waiting line
because it is too long to suit their needs or interest.
 Reneging customers are those who enter the queue but then
become impatient and leave without completing their transaction.

 Waiting line characteristics

The length of a line can be either limited or unlimited


 The length of a line can be either limited or unlimited.

3
 A queue is limited when it cannot, by law of physical restrictions,
increase to an infinite length, for example, a small restaurant that
has only 10 tables and can serve no more than 50 diners an
evening.
 The models treated in this topic assume unlimited queue length.
 A queue is unlimited when its size is unrestricted, as in the case of
the tollbooth serving arriving automobiles.

The second waiting line characteristic is queue discipline.


 Queue discipline refers to the rule by which customers in the line
are to receive the service.
 Most queuing models use the FIFO rule. This is obviously not
appropriate in all service systems, especially those dealing with
emergence.

 Service facility characteristics:


In this component of a queuing system we need to examine two basic
properties:

 The configuration of the service system.


 The pattern of service times.

Basic queuing system configurations

Service systems are usually classified in terms of their number


of channels (or number of servers), and number of phases (or
number of service stops that must be made.)
A single-channel has only one server, e.g., drive-in bank that
has only one open teller; drive-through fast-food restaurant.
A multi-channel system has more than one servers, e.g., a
bank with several tellers on duty, a large barber shop and
many airline ticket counters.
A single-phase (or single stage) is one in which the customer
receives service from only one station and then exists the
system, e.g., a fast food restaurant in which a single person
takes your order, brings the food and takes your money.
Multi-phase (or multi-stage) implies two or more stops before
leaving the system, e.g., a restaurant which requires you to
place your order at one station, pay at a second, and pick up
the food at a third service stop.

Four basic queuing system configurations in diagrams:

(i) Single-Channel, Single-phase System

Arrivals Service Departures


Facility after service
Queue

4
(ii) Single – Channel, Multiphase System

Type 1 Type 2
Arrivals service service Departures
facility facility after service
Queue

(iii) Multi channel, Single – phase System

Service Facility 1 Departures

Arrivals Service Facility 2 after

Queue
Service Facility 3 service

(iv) Multi channel, Multiphase System

Type 1 Type 2
Service Service Departures
Facility Facility
1 1 after
Arrivals
Type 1 Type 2
Queue Service Service
Facility Facility service
2 2

Service time distribution

Service patterns are like arrival patterns in that they can be


either constant or random.
A constant service time means the same amount of time to
take care of each customer. This is a case in a machine-
performed service operation such as an automatic car wash.
More often, service times are randomly distributed.
It can be assumed that random service times are described by
exponential probability distribution. This is a mathematically
convenient assumption if arrival rates are Poisson distributed.
The exponential distribution is important to the process of
building mathematical queuing models because many of the
models’ theoretical underpinnings are based on the assumption
of Poisson arrivals and exponential services.
It is important to confirm that the queuing assumptions of
Poisson arrivals and exponential services are valid before
applying the model.

5
Queue Notation (Identification of Models)

Queues are concisely described using the Kendall notation, which specifies:
 Arrival process for customers (or jobs): {M, D, G}
 Service time distribution: {M, D, G}
 Number of servers: {1, m}
 Storage capacity (buffers): {B, infinite}
 Service discipline: {FIFO, PS, …}

Note:
 M describes arrivals or services having Poisson or exponential probability
distribution.
 D describes a constant (deterministic) rate.
 G describes services having a general probability distribution with mean
and variance known.

Examples:
 M/M/1 represents a single channel (single server) queuing model with
Poisson arrivals, exponential service times, FIFO service discipline, infinite
capacity, with no loss.
 M/M/2 represents a two channel queuing model with Poisson arrivals,
exponential service times, FIFO service discipline, infinite capacity, with
no loss.
 M/M/m represents a queuing model with multiple channels, Poisson
arrivals, exponential service times, FIFO service discipline, infinite
capacity, with no loss.
 M/D/1 represent a queuing model with single channel, Poisson arrivals,
deterministic (constant) service times, FIFO service discipline, infinite
capacity, with no loss..
 M/G/1 represent a queuing model with single channel, Poisson arrivals,
general service times, FIFO service discipline, infinite capacity, with no
loss.
 G/G/1 represent a queuing model with single channel, general arrival
process, general service times, FIFO service discipline, infinite capacity,
with no loss.

The Basic Queuing Model (M/M/1)

We will use analytical approach to determine important measures of performance


in a typical service system. With these numeric measures, it will be possible to
add in cost data and begin to make decisions that balance desirable service
levels with waiting line service costs.

Assumptions of the Model:

Seven assumptions must be met if the single channel, single-phase model is to


be applied:

6
(i) Arrivals are served on a FIFO (or FCFS) basis.
(ii) Every arrival waits to be served regardless of the length of the line; that
is, there is no balking or reneging.
(iii) Arrivals are independent of preceding arrivals, but the average number
of arrivals (the arrival rate) does not change over time.
(iv) Arrivals are described by a Poisson probability distribution and come
from an infinite or very large population.
(v) Service times also vary from one customer to the next and are
independent of one another, but their average rate is known.
(vi) Service times occur according to the exponential probability
distribution.
(vii) The average service rate is greater than the average arrival rate.

When these seven conditions are met, we can develop a series of equations that
define the queue’s operating characteristics (queue’s performance).

M/M/1 Queue Results:

Let  = mean number of arrivals per unit of time.


 = mean number of people or items served per unit of time.

NB: The arrival rate (  ) and the service rate (  ) must use the same time
period.

Seven queuing equations for the single-channel, single phase model:

1. The average number of customers or units in the system, L, (i.e. the


number in line plus the number being served):

L= .
 
2. The average time a customer spends in the system, W, (i.e. the time
spent in line plus the time spent being served):
1
W= .
 

3. The average number of customers in the queue, Lq:


2
Lq = .
 (   )

4. The average time a customer spends waiting in the queue, Wq:



Wq = .
 (   )

5. The utilization factor for the system,  (the Greek letter rho), that is, the
probability that the service facility is being used:
7

 (also known as system load, 0    1).

6. The percent idle time, Po, that is, the probability that no one is in the
system:

Po = 1 - .

7. The probability of exactly n customers in the system:


n

Pn =   Po

8. The probability that the number of customers in the system is greater
that k, Pn>k:
k 1

Pn>k =  


Example 1

Consider the case of KB Muffler shop in Unga Limited, Arusha. KB’s mechanic,
Ndeliso, is able to install new mufflers at an average rate of 3 per hour, or about
1 every 20 minutes.

Customers needing this service arrive at the shop on the average rate of 2 per
hour. KB, the shop owner, studied queuing models in an ADA programme and
feels that all seven of the conditions for a single-channel model are met.
Calculate the numerical values of the preceding operating characteristics.

Required Calculations:

λ = 2 cars arriving per hour

 = 3 cars serviced per hour

 2 2
L = = = = 2 cars in the system on the average.
  3 1 1

1 1
W = = = 1 hour that an average car spends in the system.
  32

2 22 4
Lq = = = = 1.33 cars waiting on line on the average.
 (    ) 3(3  2) 3

 2 2
Wq = = = hour = 40 minutes = average waiting time per car.
 (    ) 3(3  2) 3
8
NB: W and W q are in hours, since λ is defined as the number of arrivals per
hour.
 2
= = = 0.67 = percent of time mechanic is busy, or the probability
 3
that the server is busy.

 2
Po = 1 - =1- = 0.33 = probability that there are 0 cars in the system.
 3

Probability of more than k cars in the system:

k 1
 2
k Pn>k =  
 3
0 0.667 Note that this is equal to
1 - Po = 1 -0.33 = 0.667
1 0.444
2 0.296
3 0.198 Implies that there is a 19.8%
chance that more than 3 cars
are in the system
4 0.132
5 0.088
6 0.058
7 0.039

The waiting line model helped in predicting potential waiting times, queue
lengths, idle times and so on. But it did not identify optimal decisions or consider
cost factors.

The solution to a queuing problem may require management to make a trade –


off between the increased cost of providing better service and the decreased
waiting costs derived from providing that service. These two costs are called the
waiting cost and the service cost.

Total service cost = mCs

Where m = number of channels


Cs = service cost (labour cost) of each channel.

Total waiting cost = (  w) Cw

Where:  = number of arrivals


W = average wait per arrivals
9
Cw = cost of waiting

If the waiting time cost is based on time in the queue, the equation becomes.

Total waiting cost = = (  wq) Cw

Note: These costs are based on whatever time units (often hours) are used in
determining  .

Adding the total service cost to the total waiting cost, we have total cost of the
queuing system. When the waiting cost is based on the time in the system, then

Total cost = total service cost + total waiting cost

i.e. Total cost = mcs +  wCw

When the waiting cost is based on time in the queue, the total cost is:

Total cost = mCs +  wqCw

If we wish to determine the daily cost then we simply find the total number of
arrivals per day.

Note: λW = total time spent waiting by all arrivals.

Example 2:

KB estimates that the cost of customer waiting time, in terms of customer


dissatisfaction and lost goodwill, is Tsh. 10,000 per hour of time spent waiting in
line. The pay rate of Ndeliso, the mechanic, is Tsh. 7000 per hour. Also the KB
muffler shop’s working day is 8 hours. After customers cars are actually being
serviced on the rack, customers don’t seem to mind waiting. Determine the total
daily cost of the queuing system as it is currently configured.

Solution:

Given: Number of arrivals per hour, λ =2


2
Average wait for a car, Wq = hour
3
Working day is 8 hours
Ndeliso’s pay rate, Cs = Tsh. 7,000 per hour
Waiting cost, Cw = Tsh. 10,000 per hour
Hence, total daily waiting cost = 8  wqCw

 2
= (8) (2)   (10,000)
 3
= Tsh. 106,666.67

Total daily service cost = 8 mcs


10
= 8 (1) (7000)
= Tsh. 56, 000

Therefore, total daily cost of the queuing system


= Tshs. 106,666.67 + Tsh. 56
= Tshs. 162,666.67

Example 3

KB finds out through the muffler grapevine, a cross town competitor, employ a
mechanic named Samanya who can efficiently install new mufflers at the rate of
4 per hour. KB contacts Samanya and inquires as to his interest in switching
employers. Samanya says that he would consider leaving the MP muffler but
only if he were paid a Tsh. 9000 per hour salary. KB, being a crafty
businessman, decides that it may be worthwhile to fire Ndeliso and replace him
with the speedier but more expensive Samanya. What would you advise KB?

Solution

First recompute the operating characteristics using a new service rate of 4


mufflers per hour.

λ = 2

= 4

 2
L = = = 1 car in the system on the average
  42

1 1 1
W = = = hour in the system on the average
  42 2

2 22 4 1
Lq = = = = cars waiting on line on the average.
 (    ) 4( 4  2) 8 2

 2 2 1
Wq = = = = hour = 15 minutes average waiting time
 (    ) 4( 4  2) 8 4
per car.

 2
…… = = = 0.5 = percent of time mechanic is busy
 4


Po = 1 - = 1 – 0.5 = 0.5 = probability that there are 0 cars in the system.

Probability of more than k cars in the system

11
k 1
 2
k Pn>k =  
 4
0 0.5
1 0.25
2 0.125
3 0.062
4 0.031
5 0.016
6 0.008
7 0.004

Now, with Samanya as the mechanic the costs will be:

Total daily waiting cost = 8 λ W q Cw


1
= (8) (2) ( ) (10,000)
4
= Tsh. 40,000

Total daily service cost = 8m Cs


= 8 (  ) (9000)
= Tsh. 72,000

 Total expected cost = waiting cost + service cost


= Tsh. 40,000 + Tsh. 72,000
= Tsh. 112, 000

Because the total daily expected cost with Ndeliso as mechanic was Tsh.
162,666.67, we recommended KB to hire Samany and reduce costs by Tsh.
162,666.67 – Tsh. 112, 000 = Tsh. 50,666.67 per day.

Enhancing the Queuing Environment

One way of reducing the overall cost of waiting is by reducing the time spend
waiting (based on W or W q) and the cost of waiting (Cw). However, reducing the
total cost by lowering W or W q may be difficult, and managers may need other
ways to reduce the cost of waiting. Enhancing the queuing environment by
making the wait less unpleasant may reduce Cw as customers will not be done in
various ways as mentioned below:

 Place magazines in the waiting rooms for customers to read while waiting
 Playing music, e.g. music is often played while telephone callers are
placed on hold
 Use video screens and televisions in some of the queue lines to make the
wait more interesting, etc.

All of these things are designed to keep the customer busy and to enhance the
conditions surrounding the waiting so that it appears that time is passing more

12
quickly than it actually is. Consequently, the cost of waiting (Cw) becomes lower
and the total cost of the queuing system is reduced.

Multiple – channel Queuing Model With Poisson Arrivals and Exponential


Service Times (M/M/m)
_______________________________________________________________

A multiple – channel queuing system has two or more servers or channels


available to handle arriving customers. In this case, we assume that customers
awaiting service form one single line and then proceed to the first available
server.

Assumptions of the model:

The multi – channel system discussed here assumes that arrivals follow a
Poisson probability distribution and that service times are distributed
exponentially. The queue discipline is FIFO, and all servers are assumed to
perform at the same rate. Other assumptions mentioned earlier for the single –
channel model apply as well.

Equations for the multi – channel Queuing Model:

Let m = number of channels open


λ = average arrival rate
 = average service rate at each channel

The following equations are appropriate for M/M/m model:

(i) The probability that there are zero customers or units in the system:
1
Po = for m >λ
n  m 1 1     1    m m
n

       
 n 0 n!     m    m  
(ii) The average number of customers or units in the system
m

 
L =  Po +

m  1!m   2 

(iii) The average time a unit spends in the waiting line or being serviced
(namely, in the system):
m

  
W =  P +
1
OR W =
Lq
+
1
m  1!m   
o
2
  
(iv) The average number of customers or units in line waiting for service:

Lq = L -

13
(v) The average time a customer or unit spends in the queue waiting for
service:
1 Lq
Wq = W - =
 
(vi) Utilization rate:


m
(vii) The probability of exactly n customers in the system:
n
Pn = Po, for 0 ≤ n ≤ m
n!
n
Pn = Po, for n ≥ m
m!m n  m
(viii) The probability that the number of customers in the system is greater that
m, Pn>m:
 m m
Pn≥m = Po
m! m   

These equations are used in exactly the same fashion and provide the same type
of information as did the simpler model.

In the previous case of KB muffler shop, KB examined two options. He could


retain his current mechanic, Ndeliso, at a total expected cost of Tsh. 162,666.67
per day; or he could fire Ndeliso and hire a slightly more expensive but faster
worker named Samanya. With Samanya on board, service system costs could
be reduced to Tsh. 112,000. per day. In the following example a third option is
explored.

Example 4:
KB finds that at minimal after tax cost he can open a second garage bay in which
mufflers can be installed. Instead of firing his first mechanic, Ndeliso, he would
hire a second worker. The new mechanic would be expected to install mufflers
at the same rate as Ndeliso – about  = 3 per hour. Customers, who would still
arrive at the rate of λ = 2 per hour, would wait in a single line until one of the two
mechanic is free. Find out how this option compares with the old single –
channel waiting line system.

14
Solution:

Computes the operating characteristics for the m = 2 channel system:

Effect of service level on KB muffler’s Operating Characteristics.

Level of Service
Operating One Mechanic Two One fast Mechanic
Characteristic (Ndeliso)  = 3 Mechanics  (Samanya)  = 4
= 3 for each

Probability that the 0.33 0.50 0.50


system is empty (Po)

Average number of 2 cars 0.75 car 1 car


cars in the system (L)

Average time spent 60 minutes 22.5 minutes 30 minutes


in the system (W)

Average number of 1.33 cars 0.083 car 0.50 car


cars in the queue (Lq)

Average time spent 40 minutes 2.5 minetes 15 minutes


in the queue (W q)

15

You might also like