0% found this document useful (0 votes)
67 views52 pages

W12 - Queuing Theory 1

This document provides an introduction to queuing theory and its terminology. It discusses key concepts like arrival and service processes, queuing disciplines, probability distributions used in queuing like exponential and Erlang, modeling processes, Kendall notation for describing queuing systems, and birth-death processes. The overall summary is that queuing theory analyzes systems with random inputs and services to determine performance measures and resource needs.

Uploaded by

Ronald W
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)
67 views52 pages

W12 - Queuing Theory 1

This document provides an introduction to queuing theory and its terminology. It discusses key concepts like arrival and service processes, queuing disciplines, probability distributions used in queuing like exponential and Erlang, modeling processes, Kendall notation for describing queuing systems, and birth-death processes. The overall summary is that queuing theory analyzes systems with random inputs and services to determine performance measures and resource needs.

Uploaded by

Ronald W
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/ 52

ENIE614014 - OPERATIONS

RESEARCH

QUEUING THEORY ENRICO LAOH, S.T., M.T.


TEUKU NARASKI ZAHARI, S.T.,
PART 1 M.T.
In this Module
• Introduction
• Modelling The Processes
• Birth-Death Process
• Queuing System Models
• M/M/1/GD/∞/∞ Queuing System
• M/M/1/GD/c/∞ Queuing System
INTRODUCTION
What is Queuing Theory?

Developed by the Danish Mathematician, A.K.


Erlang, in 1904 to help determine the capacity
requirements of the Danish telephone system.
Applied to a large range of service industries
including banks, airlines, and telephone call
centres as well as emergency systems such as
police patrol, fire and ambulances.

Agner Krarup Erlang


Why Queuing Theory?
Many problems can be modelled into a queuing model:
• The Waiting line in the supermarket
• The traffic on the main street
• Airplanes waiting to take-off
• Production waiting for raw materials

Can be very useful in identifying appropriate levels of resources as well as in


making decisions about its allocation and the design of new services.

Requires very little data and results in relatively simple formulae for
predicting various performance measures.
Terminology (1/4)
Input or Arrival Process
• Is the input of the model. Arrivals represent the customers.
• There can be multiple arrivals at a time.
• Models in which arrivals are drawn from a small population are called
finite source models.
• If a customer arrives but fails to enter the system, we say that the
customer has balked.
Terminology (2/4)
Output or Service Process
• A service time is described by the service time distribution which
governs a customer’s service time.
• Servers are entities that provided service to the customer.
• e.g. a cashier in a fast-food restaurant, a machine on the production line, etc.
• Servers can be arranged in series or parallel to each other.
• Series service usually provide a different service while Parallel service provide
the same service.
• Example of series service: assembly line.
• Example of parallel service: teller in a bank.
Terminology (3/4)
Queue Discipline
• The method used to determine the order in which customers are
served.
• First come, first serve (FCFS)
• Customers are served in the order of their arrival
• e.g. queuing in a fast food counter
• Last come, first serve (LCFS)
• Most recent arrivals are the first to enter service
• e.g. exiting the elevator, unloading a container
Terminology (4/4)
Queue Discipline (Cont’d)
• Service in Random Order (SIRO)
• Customers arrive has not effect on the order in which they are served
• e.g. entering buses
• Priority queuing
• Classifies each arrival into one of several categories which are given a priority
level. Within each level, customer enter a service on an FCFS basis.
• e.g. emergency rooms, multi-processing computers
Queuing Models
• Single Queue, Single Server
• Single Queue, Multiple Servers
• Multiple Queues, Multiple Servers
A Generic Queuing System

Source of Input

Arrival Output

.
.
Queue

Service Queuing System


Queuing Network

Queuing Queuing
System 2 System 3

Point where
In Point where Out
Queuing customer
customer
Queuing
System 1 makes a System 5
merge
decision

Queuing
System 4
PROBABILITY DISTRIBUTIONS IN
QUEUING
Probability Distributions
The time between customers arrivals and the time required for a
process are rarely uniform; It is a random value defined by a certain
probability distribution.
Common probability distribution in queuing theory:
• Uniform Distribution
• Gamma Distribution
• Exponential Distribution
• Poisson Distribution
• Erlang Distribution
Uniform Distribution
The density function of the continuous
uniform random variable 𝑿 on the interval
[A, B] is

1
𝑓 𝑥; 𝐴, 𝐵 = ቐ𝐵 − 𝐴 , 𝐴<𝑥<0
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
Gamma Distributions
The continuous random variable 𝑋 has a gamma
distribution, with parameters 𝛼 and 𝛽, if its
density function is given by
1 𝛼−1
−𝑥ൗ
𝛼 𝑥 𝑒 𝛽, 𝑥>0
𝑓 𝑥; 𝛼, 𝛽 = ൞𝛽 Γ(𝛼)
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
Where

Γ 𝛼 = න 𝑥 𝛼−1 𝑒 −𝑥 𝑑𝑥, 𝑓𝑜𝑟 𝛼 > 0
0
Not memoryless i.e. the probability at different
stages depends on its current state
Exponential Distribution
Is a special form of gamma distribution with
𝛼 = 1.
The density function of the continuous
exponential random variable 𝑿 with parameter
𝛽 is

1 −𝑥ൗ𝛽
𝑒 , 𝑥>0
𝑓 𝑥; 𝛽 = ൞𝛽
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
Where 𝛽 > 0
The exponential distribution has the
memoryless property
Poisson Distributions
Used to compute the probability of specific
numbers of “events” during a particular time
period or span of space.
Developed as a single-parameter distribution
with parameter 𝜆, where 𝜆 may be
interpreted as the mean number of events per
unit “time”.
The density function of a Poisson Distribution
is the exponential distribution with 𝛽 = 1Τ𝜆
𝑓 𝑥 = 𝜆𝑒 −𝜆𝑥
Also has the memoryless property
Erlang Distributions
A special form of Gamma Distribution with 𝛼 =
𝑘, where 𝑘 is a positive integer and 𝛽 = 𝜇. 𝑘 is
referred as the “shape” parameter.
𝑛−1 −𝑥ൗ𝜇
𝑥 𝑒
𝑓 𝑥 = ൞𝜇 𝑛 𝑛 − 1 ! , 𝑥>0
0, 𝑒𝑙𝑠𝑒𝑤ℎ𝑒𝑟𝑒
With 𝜇 = 1Τ𝜆, then the equation can be re-
written as
𝜆𝑛 𝑥 𝑛−1 𝑒 −𝜆𝑥
𝑓 𝑥 = , 𝑥>0
𝑛−1 !
MODELLING THE PROCESSES
Arrival Process Modelling
• The time of an 𝑖𝑡ℎ arrival is written as 𝑡𝑖 .
• The time gap between 𝑖𝑡ℎ arrival and the next
arrival is called Interarrival, written as 𝑇𝑖 .
• Break the time of day into segments to model
realistic interarrival times (e.g. rush-hour in
the morning or normal elsewhere).
• 𝑇𝑖 are independent, continuous random
variables described by the random variable 𝑨.
• 𝑇1 has no effect on 𝑇2, 𝑇3, … , 𝑇𝑛.
• The distribution of arrivals is independent of
the time of day or the day of the week.
• 𝑨 is a random variable with probability
distribution that has a density function 𝑎(𝑡)
Service Process Modelling
• Assuming that the service times of different customers are
independent random variables and that each customer’s service time
is governed by a random variable 𝑺 having a density function 𝑠(𝑡).
• Actual service times may not be memoryless i.e. it does depend on
the previous service time.
• For this reason, it is often assumed that 𝑠(𝑡) is an Erlang distribution
with shape parameters 𝑘 and rate parameter 𝑘µ
Kendall-Lee Notation
Standard notation used to describe many queuing systems. Each
queuing system is described by six characters:

[Arrival Process]/[Service Times]/[# of parallel servers]/[queue


discipline]/[max. system capacity]/[population size]
Kendall-Lee Notation
[Arrival Process] & [Service Times]
M = Interarrival times are independent, identically distributed (IID)
D = Interarrival times are IID and deterministic
Ek = Interarrival times are IID Erlangs with shape parameter k.
GI = Interarrival times are IID and governed by some general
distribution
Kendall-Lee Notation
[Queue Discipline]
FCFS = First come, first served
LCFS = Last come, first served
SIRO = Service in random order
GD = General queue discipline
Kendall-Lee Notation
• In many important models, [queue discipline]/[max.
system capacity]/[population size] is GD/∞/∞. If this is the
case, then they are often omitted.
• M/E2/8/FCFS/10/∞ might represent a health clinic with 8
doctors, exponential interarrival times, two-phase Erlang
service times, an FCFS queue discipline, and a total
capacity of 10 patients.
THE BIRTH-DEATH PROCESS
The Birth-Death Process (1/2)

Life can be seen as a queuing system. Our birth is our arrival at the system
and our death is a service completion. Population is the number of customer
waiting to receive service i.e. waiting to die.
The Birth-Death Process (2/2)
• A special case of continuous-time Markov process where the state
transitions are of only two types: "births", which increase the state
variable by one and "deaths", which decrease the state by one
• The number of people present in any queuing system at time 𝑡
defined to be the state of the queuing system at time 𝑡. At 𝑡 = 0, the
state of the system will equal the number of people initially present
in the system
Laws of Motion for Birth–Death Processes
Law 1 A birth increases the system state by 1, to 𝑗 + 1. The variable 𝜆𝑗 is
called the birth rate in state 𝑗. A birth is simply an arrival.
Law 2 A death decreases the system state by 1, to 𝑗 − 1. The variable 𝜇𝑗
is the death rate in state 𝑗. A death is a service completion
Law 3 Births and deaths are independent of each other

Traffic intensity of a queuing system is notated as 𝜌 where 𝜌 = 𝜆Τ𝜇


Steady-State Probabilities
• 𝑃𝑖𝑗(𝑡) is defined as the probability that 𝑗 people will be present in the
queuing system at time 𝑡, given that at time 𝑡 = 0, 𝑖 people are
present. 𝑃𝑖𝑗(𝑡) approached a limit π𝑗 , which is independent of the
initial state 𝑖. π𝑗 is the steady state of state 𝑗.
• The behavior of 𝑃𝑖𝑗(𝑡) before the steady state is reached is called the
transient behavior of the queuing system.
Flow Balance Equations (1/3)
The expected number of departures from state 𝑗 is equal to the
expected number of arrivals into state 𝑗,
𝜋𝑗 𝜆𝑗 + 𝜇𝑗 = 𝜋𝑗−1 𝜆𝑗−1 + 𝜋𝑗+1 𝜇𝑗+1

When 𝑗 = 0, 𝜋0 𝜆0 = 𝜋1 𝜇1 and
𝜋0 𝜆0
𝜋1 =
𝜇1
Flow Balance Equations (2/3)
When 𝑗 = 1, 𝜋1 𝜆1 + 𝜇1 = 𝜋2 𝜇2 + 𝜋0 𝜆0 or

𝜋0 𝜆0 𝜆1 + 𝜇1
− 𝜋0 𝜆0 = 𝜋2 𝜇2
𝜇1 Type equation here.
and
𝜆0 𝜆1
𝜋2 = 𝜋0
𝜇1 𝜇2
𝜆0 𝜆1 𝜆2 …𝜆𝑗−1
If we define 𝑐𝑗 = , then it can be shown that
𝜇1 𝜇2 …𝜇𝑗−1

𝜋𝑗 = 𝜋0𝑐𝑗 (1)
Flow Balance Equations (3/3)
At any given time, we must be in some state, the steady-state probabilities
must sum to 1
𝑗=∞

෍ 𝜋𝑗 = 1
𝑗=1

Substituting it to the equation (1) we will have


1
𝜇0 = 𝑗=∞
1 + σ𝑗=1 𝑐𝑗
A steady-state will fail to exist when arrival rate is at least as large as the
𝑗=∞
maximum rate at which customers can be served i.e. σ𝑗=1 𝑐𝑗 is infinite.
Analyzing Queuing Model
There are several parameters of interest in a queuing model’s:
• Steady State Probabilities
• The expected number of people on the system
• The expected number of people in queue
• The expected number of people in service
• Waiting Times (in queue, in system, in service)
M/M/1/GD/∞/∞ QUEUING SYSTEM
Understanding the Model
𝑴 Exponential arrivals with arrival rate 𝜆
𝑴 Exponential service time with service rate 𝜇
𝟏 Single server
𝑮𝑫 General queue discipline
∞ Infinite system capacity
∞ Infinite population
Understanding the Model
Can be modelled as a birth-death process with the following
parameters:
𝜆𝑗 = 𝜆, 𝑗≥0
0, 𝑗=0
𝜇𝑗 = ቊ
𝜇, 𝑗>0
Steady-State Probabilities
From the flow balance equation we will find that
𝜋0 𝜆 𝜋0𝜆2 𝜋0𝜆𝑗
𝜋1 = , 𝜋2 = 2 , …, 𝜋𝑗 = 𝑗
𝜇 𝜇 𝜇
𝑗=∞
Since σ𝑗=1 𝜋𝑗 = 1 and 𝜌 = 𝜆Τ𝜇 then we find that
𝜋0 1 + 𝜌 + 𝜌2 + ⋯ = 1
1
If 𝑆 = 1 + 𝜌 + 𝜌2 + ⋯ and is an infinite geometric series then 𝑆 = .
1−𝜌
Hence, we will have
𝜋𝑗 = 𝜌𝑗 1 − 𝜌 , ( 0 ≤ 𝜌 < 1)
The expected number of people in system
Assuming that the steady state has been reached, the average number
of customers present in the queuing system 𝐿 is given by
𝑗=∞ 𝑗=∞

𝐿 = ෍ 𝑗𝜋𝑗 = (1 − 𝜌) ෍ 𝑗𝜌𝑗
𝑗=0 𝑗=0
𝑗=∞ 𝜌
Defining 𝑆 ′ = σ𝑗=0 𝑗𝜌𝑗 = 𝜌 + 2𝜌2 + 3𝜌3 + ⋯ then we have 𝑆 ′ − 𝜌𝑆 ′ =
1−𝜌
′ 𝜌
and 𝑆 = ,thus
(1−𝜌)2
𝜌 𝜌 𝜆
𝐿 = 1−𝜌 2
= =
1−𝜌 1−𝜌 𝜇−𝜆
The expected number of people in queue
If there are more than 1 people, then there will be a certain number of people
in queue. If there are j people in the system, then there will be 𝑗 − 1
customers in queue (1 customer is being served). Thus if we are at steady-
state, the expected number of people in queue is
𝑗=∞ 𝑗=∞ 𝑗=∞
𝜌
𝐿𝑞 = ෍ (𝑗 − 1)𝜋𝑗 = ෍ 𝑗𝜋𝑗 − ෍ 𝜋𝑗 = 𝐿 − 1 − 𝜋0 =𝐿−𝜌= −𝜌
1−𝜌
𝑗=0 𝑗=0 𝑗=0

𝜌2
𝐿𝑞 =
(1 − 𝜌)
The expected number of people in service
• Since every customer who is present is either in line or in
service, it follows that for any queuing system the
expected number of customers in service
𝜌 𝜌2
𝐿𝑠 = 𝐿 − 𝐿𝑞 = −
1 − 𝜌 (1 − 𝜌)

𝐿𝑠 = 𝜌
Little’s Queuing Formula
𝑊 is defined as the expected time a customer spends in the
queuing system, including time in queue plus time in service. 𝑊𝑞
is the expected time a customer spends waiting in queue.
The total customer is the system is equals to the rate of arrival
times the time a customer spends in the queuing system or
𝐿 = 𝜆𝑊
Consequently
𝐿𝑞 = 𝜆𝑊𝑞
𝐿𝑠 = 𝜆𝑊𝑠
As long as a steady state exists we may apply these equations to
any queuing system
Example
An average of 10 cars per hour arrive at a single-server drive-in teller.
Assume that the average service time for each customer is 4 minutes,
and both interarrival times and service times are exponential.
1. What is the probability that the teller is idle?
2. What is the average number of cars waiting in line for the teller?
3. What is the average amount of time a drive-in customer spends in
the bank parking lot?
4. On the average, how many customers per hour will be served by the
teller?
Example
𝜆 = 10, 𝜇 = 60ൗ4 = 15, 𝜌 = 2ൗ3

1. If server is idle then there is no customer in the system, 𝑗 = 0 and


𝜋0 = 1 − 2Τ3 = 1Τ3
𝜌2 4
2. The average number of customer in queue is 𝐿𝑞 = =
3(1−𝜌)
customers.
3. The average amount of time a drive-in customer spends in the
𝜌 2
system is 𝑊 = 𝐿Τ𝜆 = = hours.
1−𝜌 𝜆 10
4. Since the server is idle 1Τ3 of the time and 𝜇 = 15, then the server
2
will serve an average of 3 × 15 = 10 customers.
M/M/1/GD/C/∞ QUEUING SYSTEM
Understanding the Model
𝑴 Exponential arrivals with arrival rate 𝜆
𝑴 Exponential service time with service rate 𝜇
𝟏 Single server
𝑮𝑫 General queue discipline
𝒄 Finite system capacity, 𝑐
∞ Infinite population
Understanding the Model
Identical to M/M/1/GD/∞/∞ except for the fact that when c customers
are present, all arrivals are turned away and are forever lost to the
system.
May also be modelled as birth-process model with parameters.
0, 𝑗=𝑐
𝜆𝑗 = ቊ
𝜆, 0<𝑗<𝑐
0, 𝑗=0
𝜇𝑗 = ቊ
𝜇, 0<𝑗≤𝑐
Steady-State Probabilities
Using the flow balance equation, since 𝑆 = (1 + 𝜌 + 𝜌2 + ⋯ + 𝜌𝑐 ) is a
1−𝜌𝑐+1
finite geometric series, then 𝑆 = . Hence, when 𝜆 ≠ 𝜇 and 𝑗 = 0
1−𝜌
1−𝜌
𝜋0 =
1 − 𝜌𝑐+1
For 𝑗 > 0
𝜋0𝜌𝑗, 𝑗 = 1,2, … , 𝑐
𝜋𝑗 = ቊ
0, 𝑗 ≥𝑐+1
When 𝜆 = 𝜇
1
𝜋𝑗 =
𝑐+1
The expected number of people in system
When 𝜆 ≠ 𝜇
𝜌(1 − 𝑐 + 1 𝜌𝑐 + 𝑐𝜌𝑐+1 )
𝐿=
(1 − 𝜌𝑐+1 )(1 − 𝜌)

When 𝜆 = 𝜇
𝑐
𝐿=
2
The expected number of people in service and
queue
As with 𝑀/𝑀/1/𝐺𝐷/∞/∞ system,
𝐿𝑠 = 1 − 𝜋0
And
𝐿𝑞 = 𝐿 − 𝐿𝑠
The Expected Waiting Time
An average of 𝜆 arrivals per unit time arrive, but 𝜆𝜋𝑐 of these arrivals
find the system is full and leave. Thus on average 𝜆(1 − 𝜋𝑐 ) arrivals per
unit time will enter the system. Hence the average waiting time in the
system is
𝐿
𝑊=
𝜆(1 − 𝜋𝑐 )
And the average waiting time in the queue is
𝐿𝑞
𝑊𝑞 =
𝜆(1 − 𝜋𝑐 )

You might also like