Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
Course facilitators: Prof. Ajith Kumar
Prof. T N Badri
QUEUEING THEORY & MODELS
OPERATIONS RESEARCH
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OORQUEUEING THEORY
The motivation to study queueing systems
In the US alone, people collectively spend 37,000,000,000 man-hours per year waiting in queues (Hillier and Lieberman, 2005)
This amounts to an opportunity loss of nearly 1.5 billion man-days of work per year! (this is for the US alone).
FROM THE PERSPECTIVE OF A COUNTRY
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OORQUEUEING THEORYThe motivation to study queueing systems
Increasing service counters decreases customer waiting time and increases customer satisfaction. But costs of providing servicegoes up.
Decreasing service counters increases customer waiting time and decreases customer satisfaction. It decreases cost of providingservice, but cost of customer dissatisfaction goes up.
SO, WHAT IS THE OPTIMAL SERVICE LEVEL?
Total cost = Cost of providing service + Cost of customer dissatisfaction
If you reduce one of the components, the other one increases….
FROM THE PERSPECTIVE OF A COMPANY
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
MODEL OF A QUEUEING
SYSTEMInput Characteristics
Output Characteristics
QUEUEING THEORY
The basic queueing model
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OORThe inside of a queueing system
QUEUEING THEORY
S
customer receiving service
customers waiting (in the Q)
Waiting line (Q)server
Calling population
customer rejoins the population
customer does not
rejoin population
(Not in the Q)
A single-channel, single-phase system
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
SSingle channel, Single phase
Single channel, Multi phase
Multi channel, Single phase
Multi channel, Multi phase
S1
S2
S3
S1S2S3
S1
S2
S3
T1
T2
T3
U
QUEUEING SYSTEMS INPUTS
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OORInputs
QUEUEING SYSTEMS INPUTS
Arrival rate, arrival time, and arrival size.
Type of population
Service characteristics (service rate, service time).
Exit fates (rejoins population, does not rejoin).
Capacities (of the systems, of the sub-systems).
Q behavior (balking, reneging, jockeying)
These are the typical inputs considered -
Each of these is explored briefly in the next few slides…
Q discipline (FIFO, LIFO, SIRO, SPT, PR)
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
No. of customers that arrive in a given period of time.
ARRIVAL RATE
Given period is chosen as convenient (per minute; per hour; per day).Usually a variable, e.g. # customers arriving at a bank can be different between different 1-hour periods.
Often seen to follow the Poisson Process, and is modeled thus.
P(r) = (λre-λ) / r!r: number of arrivals in the given time period. r = 0, 1, 2, …. ∞
P(r): the probability that exactly n arrivals will occur in the given period.λ: mean arrival rate (mean number of arrivals in a given time period).
Inputs > Arrival Characteristics
QUEUEING SYSTEMS INPUTS
But, in general, arrival rate can follow any distribution.
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
The time elapsed between two consecutive arrivals into the system.
INTER-ARRIVAL TIME (t)
Usually a variable, e.g. the time between two customers arriving at a bank can be different
If the arrival behaviour follows a Poisson Process, then t follows the exponential distribution, and is modeled thus.
f(t) = λe-λt
f(t): the probability density function of t
λ: mean arrival rate = 1 / (mean of t).
Inputs > Arrival Characteristics
QUEUEING SYSTEMS INPUTS
ARRIVAL SIZE Can be single arrivals, or batch arrivals
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
No. of customers that a server can handle in a given time period.
SERVICE RATE
For a given server, this can vary from one period to the next period. Hence, this is a random variable and has a distribution.
As with the arrival process, the service process is often found to be Poisson.
Multiple server system: distribution, its mean, variance can vary from server to server.
Pi(X) = (µiXe-µ) / X!
X: number of customers served in the given time period. X = 0, 1, 2, …. ∞
Pi(X): the probability that exactly X customers will be served by server i in the given period.
µi: mean service rate (the mean of X) of server i.
Inputs > Service Characteristics
i = 0, 1, 2, …. m
m: number of servers (channels).
QUEUEING SYSTEMS INPUTS
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
Time taken by a server to handle a customer. For a given server, this can vary from customer to customer.
SERVICE TIME
Distribution can vary across servers.
Multiple server system: distribution, its mean, variance can vary from server to server.
Inputs > Service Characteristics
fi(t) = µie-µit
fi(t): the probability density function of t
µi: mean service rate at server i = (mean service time or server i)-1.
QUEUEING SYSTEMS INPUTS
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OORInputs > Population
Limited pool of customers.FINITE POPULATION
Type of the population influences the arrival characteristics of the system.
When customer leaves population, probability of next occurrence (or arrival rate) decreases, and vice versa.E.g. a small set of machines that need maintenance & service.
Unlimited pool of customers.INFINITE POPULATION
Customers leaving and rejoining the population does not influence arrival rate.
E.g. the customer pool of a large bank, or a big retail store.
QUEUEING SYSTEMS INPUTS
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
a part of the system may be able to hold only up to a certain number of customers.
CAPACITIES
particularly relevant in multi-phase systems, with finite capacities.
Inputs > Capacities
e.g. the number of cars that can stand in line for drying after a car-wash may be 10, hence car-wash has to become idle when the drying waiting line reaches 10.
QUEUEING SYSTEMS INPUTS
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
FIFO: First In First Out (FCFS: First Come First Served)
Inputs > Q discipline
A set of rules that determine the order of service offered to the customers in a given waiting line
LIFO: Last In First Out
SIRO: Service in Random Order
SPT: Shortest Processing Time First
PR: Service according to priority
Find real-life examples of each of these…
QUEUEING SYSTEMS INPUTS
For all problems in this course, we assume the FIFO discipline
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
Balking A customer does not enter the Q when he perceives its too long, and/or he does not have enough time to wait and avail the service.
Inputs > Q behavior
Do customers always wait in the line patiently? No, they also exhibit these behaviors -
Reneging A customer waits in the Q for some time, but leaves when he sees it moving too slowly, and he does not have enough time.
Jockeying A customer moves from his current line to another, e.g. if he feels he will receive service earlier by changing lines.
QUEUEING SYSTEMS INPUTS
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
CUSTOMER REJOINS CALLING POPULATION
Inputs > Exit Fates
A serviced machine that may need the same service again.
CUSTOMER DOES NOT REJOIN CALLING POPULATION
A cardiac patient passes away in a hospital.The machine overhauled, modified or repaired in such a way that there is a low probability of needing the same service again, or it is discarded.
Significantly influences the arrival characteristics of the system, when calling population is finite, but not when it is infinite.
QUEUEING SYSTEMS INPUTS
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
TOGETHER, THE INPUT CHARACTERISTICS HELP DEFINE THE
STRUCTURE OF THE QUEUEING SYSTEM
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OORKENDALL QUEUEING NOTATION
A: distribution of inter-arrival time.if exponential/markov, M.if constant/deterministic, D.if Erlang or order k, Ekif phase-type, P Hif hyper-exponential, Hif arbitrary, or general, GIf general independent, G I
The Kendall notation has been widely adopted in queueing theory to depict the structure of the system in a simple manner.
A / B / c / N / K
B: distribution of service-time.(same notation as for A)
c: no. of channels / parallel servers.
N: System capacity
K: Size of the calling population.
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OORKENDALL QUEUEING NOTATION
Example 1: M / M / 1 / ∞ / ∞Single-channel (server) system;Both inter-arrival and service times follow exponential distributions;System capacity is unlimited; population is infinite
Example 2: G / G / 2 / 10 / 52 server system;Both inter-arrival and service times follow arbitrary distributions;System capacity is 10 customers; population has only 5 members
e.g. a set of 5 machines in a factory, maintained by 2 technicians, who can actually handle 10 machines with the resources available.
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OORKENDALL QUEUEING NOTATION
Simplified Kendall Notation
When system capacity and calling population are infinite, they can be excluded from the notation.
e.g. M / M / 1 / ∞ / ∞ can be written as M / M / 1
Many queueing systems can be approximated as having infinite calling population and system capacity; hence the simplified notation is popular.
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
NEXT, THE OUTPUTS
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
Server utilization, or the proportion of time the server is busy (ρ).
Long-run average time spent by a customer in the system (W) and the queue (Wq).
Long-run time-average of number of customers in the system (L) and the queue (Lq).
These – not the inputs – influence customer satisfaction / delight.
Q stability vs. instability.
QUEUEING SYSTEMS OUTPUTS
Outputs: These are our performance measures.
Long-run proportion of time, the system contains more than k customers.
Server idle-time, or the proportion of time the no customer is in the system(Po).
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
STANDARD QUEUEING MODELS
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
Service times vary from one customer to next & are independent; but their average rate is known.
Queue discipline: arrivals are served FIFO.
Important Assumptions
Average service rate (µ) is > average arrival rate (λ).
STANDARD QUEUEING MODELS
M/M/1: single-channel; exponential inter-arrival times & service times; infinite capacity & population
Queue behavior: no balking/reneging; every arrival waits & receives service.
Arrivals independent of each other; avg number of arrivals is constant over time.
Arrival rate follows a Poisson distribution; and come from an infinite population.
1
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OOR
λ = Mean # arrivals in given time period, (or mean arrival rate)
formulas for the performance measures
STANDARD QUEUEING MODELSM/M/1:
1. Avg. # customers in the system over time (L):
1
µ = Mean # customers served in given time period, (or mean service rate)
2. Avg. # customers in the queue over time (Lq):
3. Avg. time a customer spends in the system (W):
4. Avg. time a customer spends in the queue (Wq):
5. Utilization factor (ρ):
6. % idle time; probability that no one in the system (Po):
7. Probability that no. of customers greater than k (Pn > k):
L = λ / (µ – λ)
Lq = λ2 / µ(µ – λ)
W = 1 / (µ – λ)
Wq = λ / µ (µ – λ)
ρ = λ / µ
P0 = 1 – (λ / µ)
Pn > k = (λ / µ)k+1
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OORSTANDARD QUEUEING MODELS2 M/M/m: multi-channel; exponential inter-arrival times &
service times; infinite capacity & population
Same as for a single-channel queueing system.
Important Assumptions
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OORSTANDARD QUEUEING MODELS
M/M/m:2
Lq = L – λ/µ
1. Avg. # customers in the system over time (L):
L = P0 [ λ µ (λ/µ)m / (m-1)! (mµ – λ)2 ] + λ/µ
m: number of channels (servers)
2. Avg. # customers in the queue over time (Lq):
3. Avg. time a customer spends in the system (W):
4. Avg. time a customer spends in the queue (Wq):
W = L / λ
Wq = W – 1 / λ = Lq / λ
contd…
formulas for the performance measures
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OORformulas for the performance measures
STANDARD QUEUEING MODELS
M/M/m:2
= λ / mµ
m: number of channels (servers)
5. Utilization factor (ρ):
6. % idle time; probability that no one in the system (Po):
1
Σ (1/n!) (λ/µ)n + (1/m!) (λ/µ)m (mµ/(mµ – λ)n = 0
n = m-1for mµ > λ
…contd
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OORSTANDARD QUEUEING MODELS
1. Avg. # customers in the system over time (L):
3
2. Avg. # customers in the queue over time (Lq):
3. Avg. time a customer spends in the system (W):
4. Avg. time a customer spends in the queue (Wq):
L = Lq + (λ / µ)
Lq = λ2 / 2µ(µ – λ)
W = Wq + 1 / (µ – λ)
Wq = λ / 2µ(µ – λ)
M/D/1: single-channel; exponential inter-arrival times, constant service times; infinite capacity & population.
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OORSTANDARD QUEUEING MODELS
1. Avg. # customers in the system over time (L):
4
2. Avg. # customers in the queue over time (Lq):
3. Avg. time a customer spends in the system (W):
4. Avg. time a customer spends in the queue (Wq):
L = Lq + (1 – P0)
Lq = N – [(λ + µ) / λ ] (1 – P0)
W = Wq + 1 / µ
Wq = Lq / λ(K – L)
M / M / 1 / ∞ / K: single-channel, exponential inter-arrival time and service times, finite population of size K
5. % idle time; probability that no one in the system (Po):
1
Σ [K!/(K-n)!] (λ/µ)nn = 0
n = K
6. Probability of n units in the system (Pn): P0 [K!/(K-n)!] (λ/µ)n
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OORSTANDARD QUEUEING MODELS
General Relationships under Steady State Conditions
Applicable for any queue, under steady state (except the finite population model)
(or W = L / λ)L = λ W
(or Wq = Lq / λ)Lq = λ Wq
Little’s Flow Equations
Also, avg. time in system = avg. time in q + avg. time in service
W = Wq + 1 / µ
The formulas are applicable under steady-state conditions.
Operations Research TAPMI, Theme 3, B2008, Feb-Apr 2009 Prof. Ajith Kumar
OORThe preceding formulas are applicable under steady-state conditions, and under the respective assumptions made.
What should we do when one or more of the assumptions do not hold and/or the queue in a transient state?
SIMULATION MODELS ARE DEVELOPED FOR THIS