You are on page 1of 70

Chapter 8

Queueing Models

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.1


Contents
• Characteristics of Queueing Systems
• Queueing
Q g Notation – Kendall Notation
• Long-run Measures of Performance of Queueing Systems
• Steady-state Behavior of Infinite-Population Markovian
Models
• Steady-state Behavior of Finite-Population Models
• Networks of Queues

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.2


Purpose
• Simulation is often used in the analysis of queueing models.
• A simple but typical queueing model

Calling population

Waiting line Server

• Queueing models provide the analyst with a powerful tool for


designing and evaluating the performance of queueing systems.
• Typical measures of system performance
• Server utilization, length of waiting lines, and delays of customers
• For relatively simple systems: compute mathematically
• For realistic models of complex systems: simulation is usually
required

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.3


Outline
• Discuss some well-known models
• Not development
p of q
queueing
g theory,
y, for this see other class!

• We will deal with


• General characteristics of queues
• Meanings and relationships of important performance
measures
• Estimation of mean measures of performance
• Effect of varying input parameters
• Mathematical solutions of some basic queueing models

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.4


Characteristics of Queueing Systems

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.5


Characteristics of Queueing Systems
• Key elements of queueing systems
• Customer: refers to anything that arrives at a facility and requires
service, e.g., people, machines, trucks, emails, packets, frames.
• Server: refers to any resource that provides the requested service,
e.g., repairpersons, machines, runways at airport, host, switch,
router, disk drive, algorithm.

System
y Customers Server
Reception desk People Receptionist
Hospital Patients Nurses
Ai
Airport
t Ai l
Airplanes R
Runway
Production line Cases Case-packer
Road network Cars Traffic light
Grocery Shoppers Checkout station
Computer Jobs CPU, disk, CD
N t
Network
k P k t
Packets R t
Router

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.6


Calling Population
• Calling population: the population of potential customers, may
be assumed to be finite or infinite.
• Finite population model: if arrival rate depends on the number of
customers being served and waiting, e.g., model of one corporate
jet, if it is being repaired, the repair arrival rate becomes zero.

n nn-11

• Infinite
I fi it population
l ti model:
d l if arrival
i l rate
t iis nott affected
ff t d bby the
th
number of customers being served and waiting, e.g., systems with
large population of potential customers.

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.7


System Capacity
• System Capacity: a limit on the number of customers that
may be in the waiting line or system.
• Limited capacity, e.g., an automatic car wash only has room for 10
cars to wait in line to enter the mechanism.
• If system is full no customers are accepted anymore

Waiting line Server

• Unlimited capacity, e.g., concert ticket sales with no limit on the


number of people allowed to wait to purchase tickets.

Waiting line Server

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.8


Arrival Process
• For infinite-population models:
• In terms of interarrival times of successive customers.
• Arrival types:
• Random arrivals: interarrival times usually characterized by a
probability distribution.
• Most important model: Poisson arrival process (with rate λ), where
a time represents the interarrival time between customer n-1 and
customer n, and is exponentially
p y distributed (with
( mean 1/λ)).
• Scheduled arrivals: interarrival times can be constant or
constant plus or minus a small random amount to represent
y or late arrivals.
early
• Example: patients to a physician or scheduled airline flight arrivals
to an airport
• At least one customer is assumed to always be present,
so the server is never idle, e.g., sufficient raw material for
a machine.

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.9


Arrival Process
• For finite-population models:
• Customer is p pendingg when the customer is outside the q
queueingg
system, e.g., machine-repair problem: a machine is “pending”
when it is operating, it becomes “not pending” the instant it
demands service from the repairman.
p
• Runtime of a customer is the length of time from departure from
the queueing system until that customer’s next arrival to the
queue,, e.g.,
q g , machine-repair
p problem,, machines are customers
p
and a runtime is time to failure (TTF).
• Let A1(i), A2(i), … be the successive runtimes of customer i, and S1(i),
S2(i) be the corresponding
p g successive system
y times:

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.10


Queue Behavior and Queue Discipline
• Queue behavior: the actions of customers while in a
queue waiting for service to begin, for example:
• Balk: leave when they see that the line is too long
• Renege: leave after being in the line when its moving too slowly
• Jockey: move from one line to a shorter line

• Queue discipline: the logical ordering of customers in a


queue that determines which customer is chosen for
service when a server becomes free, for example:
• First-in-first-out
Fi t i fi t t (FIFO)
• Last-in-first-out (LIFO)
• Service in random order (SIRO)
( )
• Shortest processing time first (SPT)
• Service according to priority (PR)

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.11


Service Times and Service Mechanism
• Service times of successive arrivals are denoted by S1, S2, S3.
• May be constant or random.
• {S1, S2, S3, …} is usually characterized as a sequence of independent
and identically distributed (IID) random variables, e.g.,
• Exponential, Weibull, Gamma, Lognormal, and Truncated normal
distribution.

• A queueing system consists of a number of service centers and


interconnected queues.
• Each service center consists of some number of servers (c) working
in parallel,
parallel upon getting to the head of the line
line, a customer takes the
1st available server.

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.12


Queuing System: Example 1
• Example: consider a discount warehouse where customers may
• serve themselves before paying at the cashier (service center 1) or
• served by a clerk (service center 2)

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.13


Queuing System: Example 1
• Wait for one of the three clerks:

• Batch service (a server serving several customers


simultaneously), or customer requires several servers
simultaneously.

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.14


Queuing System: Example 1

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.15


Queuing System: Example 2
• Candy production line
• Three machines separated
p by
y buffers
• Buffers have capacity of 1000 candies

Assumption:Allways
sufficient supply of
raw material.

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.16


Queueing Notation
The Kendall Notation

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.17


Queueing Notation: Kendall Notation
• A notation system for parallel server queues: A/B/c/N/K
• A represents the interarrival-time distribution
• B represents the service
service-time
time distribution
• c represents the number of parallel servers
• N represents the system capacity
• K represents
p the size o
of the calling
a g population
popu a o
• N, K are usually dropped, if they are infinity
• Common symbols for A and B
• M Markov,, exponential
p distribution
• D Constant, deterministic
• Ek Erlang distribution of order k
• H Hyperexponential distribution
• G General, arbitrary
• Examples
• M/M/1/∞/∞ same as M/M/1: Single-server with unlimited capacity and call-
population.
l ti IInterarrival
t i l and
d service
i ti
times are exponentially
ti ll di
distributed
t ib t d
• G/G/1/5/5: Single-server with capacity 5 and call-population 5.
• M/M/5/20/1500/FIFO: Five parallel server with capacity 20, call-population 1500,
and service discipline FIFO

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.18


Queueing Notation
• General performance measures of queueing systems:
• Pn steady-state probability of having n customers in system
• Pn(t) probability of n customers in system at time t
• λ arrival rate
• λe effective arrival rate
• μ service rate of one server
• ρ server utilization
• An interarrival time between customers n-1 and n
• Sn service time of the n-th arriving
g customer
• Wn total time spent in system by the n-th customer
• WnQ total time spent in the waiting line by customer n
• L(t) the number of customers in system at time t
• LQ(t) the number of customers in queue at time t
• L long-run time-average number of customers in system
• LQ long-run time-average number of customers in queue
• W long-run average time spent in system per customer
• wQ long-run average time spent in queue per customer

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.19


Long-run Measures of Performance of
Queueing Systems

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.20


Long-run Measures of Performance of Queueing
Systems
• Primary long-run measures of performance are
• L long-run time-average number of customers in system
• LQ long-run time-average number of customers in queue
• W long-run average time spent in system per customer
• wQ long-run average time spent in queue per customer
• ρ server utilization

• Other measures of interest are


• Long-run proportion of customers who are delayed longer than
t0 time units
• Long-run proportion of customers turned away because of
capacity constraints
• Long-run proportion of time the waiting line contains more
than k0 customers

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.21


Long-run Measures of Performance of Queueing
Systems
• Goal of this section
• Major
j measures of pperformance for a g
general G/G/c/N/K
queueing system
• How these measures can be estimated from simulation runs

• Two types of estimators


• Sample average
• Time-integrated sample average

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.22


Time-Average Number in System L

Number of
customers in the
system
y

Time

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.23


Time-Average Number in System L
• Consider a queueing system over a period of time T
• Let Ti denote the total time during [0,T ] in which the system
containedd exactly
l i customers, the
h time-weighted-average
h d number
b in
the system is defined by:
∞ ∞
1 ⎛T ⎞
Lˆ =
T ∑
i =0
iTi = ∑ i⎜ i ⎟
i =0 ⎝
T⎠

• Consider the total area under the function is L(t),


( ), then,,

1 1 T
Lˆ =
T ∑
i =0
iTi =
T ∫ L(t )dt
0

• The long-run time-average number of customers in system, with


probability 1:
ˆ 1 T
L=
T ∫
0
L(t )dt ⎯T⎯
⎯→ L
→∞

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.24


Time-Average Number in System L

Number of
customers in the
system
y

Time

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.25


Time-Average Number in System L
• The time-weighted-average number in queue is:

1 1
LQ = ∑ iTi =
T
ˆ
∫ LQ (t )dt ⎯T⎯
⎯→ LQ
Q
→∞
T i =0 T 0

• G/G/1/N/K example: consider the results from the queueing system (N


≥ 4, K ≥ 3).

Lˆ = [0(3) + 1(12) + 2(4) + 3(1)] / 20


= 23 / 20 = 1.15 customers

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.26


Time-Average Number in System L

⎧0, if L(t) = 0 0(15) + 1(4) + 2(1)


LQ (t ) = ⎨ LˆQ = = 0.3 customers
⎩L(t ) − 1, if L(t) ≥ 1 20

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.27


Average Time Spent in System Per Customer w
• The average time spent in system per customer, called the
average system time, is:
N
1
wˆ =
N
∑W
i =1
i

where W1, W2, …, WN are the individual times that each of the N
customers spend in the system during [0,T].

• For stable systems: wˆ → w as N → ∞

• If the system under consideration is the queue alone:

N
1
wQ =
ˆ
N
∑ i ⎯N⎯→⎯∞ → wQ
W Q

i =1

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.28


Average Time Spent in System Per Customer w
• G/G/1/N/K example (cont.):
• The average
g system
y time is (Wi = Di – Ai)
W1 + W2 + ... + W5 2 + (8 − 3) + (10 − 5) + (14 − 7) + (20 − 16)
wˆ = = = 4.6 time units
5 5

• The average queuing time is


0+ 0+3+3+ 0
wˆ Q = = 1.2 time units
5

A4 D2

A3 D3

A1 D1 A2 D4 A5 D5

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.29


The Conservation Equation or
Little’s
Little s Law

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.30


The Conservation Equation:
Little’s Law
• One of the most common theorems in queueing theory
• Mean number of customers in system
• Conservation equation (a.k.a. Little’s law)

Arrivals Black Box Departures

average number in system = arrival rate × average system time

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.31


The Conservation Equation:
Little’s Law
• Conservation equation (a.k.a. Little’s law)

Average # in
Lˆ = λˆwˆ Average
system System time

A i l rate
Arrival

L = λw as T → ∞ and N → ∞

• Holds for almost all q


queueingg systems
y or subsystems
y (regardless
( g of
the number of servers, the queue discipline, or other special
circumstances).
• G/G/1/N/K example
p ((cont.):
) On average,
g , one arrival everyy 4 time
units and each arrival spends 4.6 time units in the system. Hence, at
an arbitrary point in time, there are (1/4)(4.6) = 1.15 customers
present on average.

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.32


Server Utilization
• Definition: the proportion of time that a server is busy.
• Observed server utilization, ,ρ̂ is defined over a specified time
intervall [0,T ].
• Long-run server utilization is ρ.
y
• For systems with long-run
g stability:
y ρˆ → ρ as T → ∞

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.33


Server Utilization
• For G/G/1/∞/∞ queues:
• Any single-server queueing system with
• average arrival rate λ customers per time unit,
• average service time E(S) = 1/μ time units, and
• infinite queue capacity and calling population.
population
• Conservation equation, L = λw, can be applied.
• For a stable system, the average arrival rate to the server, λs,
must be identical to λ.
• The average number of customers in the server is:
T
T −T
ˆ
Ls =
1
( )
∫ L(t ) − L (t ) dt =
Q
0
T 0
T

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.34


Server Utilization
• In general, for a single-server queue:

Lˆs = ρˆ ⎯T⎯
⎯→ Ls = ρ
→∞

λ
and ρ = λ ⋅ E (s) =
μ

λ
• For a single-server stable queue: ρ= <1
μ

• For an unstable queue (λ > μ),


) long
long-run
run server utilization is 1.
1

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.35


Server Utilization
• For G/G/c/∞/∞ queues:
• A system with c identical servers in parallel.
• If an arriving customer finds more than one server idle, the
customer chooses a server without favoring any particular
server.
server
• For systems in statistical equilibrium, the average number of
busy servers, Ls, is:
λ
LS = λE ( S ) =
• Clearly 0 ≤ LS ≤ c
μ
• The long-run
long run average server utilization is:

Ls λ
ρ= = , where λ < cμ for stable systems
c cμ

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.36


Server Utilization and System Performance
• System performance varies widely for a given utilization ρ.
• For example, a D/D/1 queue where E(A) = 1/λ and E(S) = 1/μ,
where:
L = ρ = λ/μ, w = E(S) = 1/μ, LQ = WQ = 0
• By varying λ and μ, server utilization can assume any value
between 0 and 1.

• In
I general, l variability
i bilit off iinterarrival
t i l and
d service
i titimes causes
lines to fluctuate in length.

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.37


Server Utilization and System Performance
• Example: A physician who • Consider the system is
schedules patients every 10 simulated with service times:
minutes and spends Si minutes S1= 9, S2=12, S3 = 9, S4 = 9, S5 = 9,...
with the i-th
i th patient:
⎧ 9 minutes with probability 0.9 • The system becomes:
Si = ⎨
⎩12 minutes with probability 0.1

• Arrivals are deterministic:

A1 = A2 = … = λ-11 = 10
• Services are stochastic
• E(Si) = 99.3
3 min
• V(S0) = 0.81 min2
• σ = 0.9 min
• The occurrence of a
relatively long service time
• On average, the physician's (S2 = 12) causes a waiting line
utilization is
to form temporarily.
ρ = λ/μ
μ = 0.93 < 1

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.38


Costs in Queueing Problems
• Costs can be associated with various aspects of the waiting line
or servers:
• System incurs a cost for each customer in the queue
queue, say at a rate of
$10 per hour per customer.
• The average cost per customer is: WjQ is the time
customer j spends
in queue
N $10 ⋅ W jQ

j =1 N
= $10 ⋅ wˆ Q

• If λ̂ customers per hour arrive (on average), the average cost per
hour is:
⎛ ˆ customer ⎞⎛ $10 ⋅ wˆ Q ⎞ $ 10 ⋅ ˆ
L
⎜λ ⎟⎜⎜ ⎟⎟ = $10 ⋅ λˆ ⋅ wˆ Q = Q

⎝ hour ⎠⎝ customer ⎠ hour


• Server may also impose costs on the system, if a group of c parallel
servers (1 ≤ c ≤ ∞) have utilization ρ, each server imposes a cost of
$5 per hour while busy.
• The
Th ttotal i $5 ⋅ c ⋅ ρ
t l server costt is:

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.39


Steady-state Behavior of Infinite-
Population Markovian Models

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.40


Steady-State Behavior of Markovian Models
• Markovian models:
• Exponential-distributed arrival process (mean arrival rate = 1/λ).
• Service times may be exponentially (M) or arbitrary (G) distributed.
• Queue discipline is FIFO.
• A queueing system is in statistical equilibrium if the probability that
the system is in a given state is not time dependent:

P ( L(t ) = n) = Pn (t ) = Pn

• Mathematical models in this chapter can be used to obtain


approximate results even when the model assumptions do not strictly
hold, as a rough guide.
• Simulation can be used for more refined analysis, more faithful
representation for complex systems.

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.41


Steady-State Behavior of Markovian Models

• Properties of processes with statistical equilibrium


• The state of statistical equilibrium
q is reached from any
y starting
g
state.
• The process remains in statistical equilibrium once it has
reached it.
it

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.42


Steady-State Behavior of Markovian Models
• For the simple model studied in this chapter, the steady-
state parameter, L, the time-average number of
customers in the system is:

L= ∑ nP
n =0
n

• Apply Little’s
Little s equation L=λ w, to the whole system and to the
equation, L
queue alone:
L 1
w= , wQ = w − , LQ = λwQ
λ μ
• G/G/c/∞/∞ example: to have a statistical equilibrium, a
necessary and sufficient condition is:
λ
ρ= <1

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.43
M/G/1 Queues
• Single-server queues with Poisson arrivals and unlimited capacity.
• Suppose service times have mean 1/μ and variance σ 2 and ρ = λ / μ < 1,
the steady-state parameters of M/G/1 queue:
λ
ρ=
μ
P0 = 1 − ρ
ρ 2 (1 + σ 2 μ 2 ) The particular
L=ρ+ distribution is not
2(1 − ρ ) known!

λ (1 / μ 2 + σ 2 )
1
w= +
μ 2(1 − ρ )
ρ 2 (1 + σ 2 μ 2 ) ρ server utilization
LQ = P0 probability of empty system
2(1 − ρ ) L long-run time-average number of customers in system
λ (1 / μ 2 + σ 2 ) w long-run average time spent in system per customer
wQ = LQ long-run time-average number of customers in queue
2(1 − ρ ) wQ long-run average time spent in queue per customer

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.44


M/G/1 Queues
• There are no simple expressions for the steady-state
probabilities P0, P1, P2 ,…
• L – LQ = ρ is the time-average number of customers being
served.
• Average length of queue,
queue LQ, can be rewritten as:

ρ2 λ2σ 2
LQ = +
2(1 − ρ ) 2(1 − ρ )

• If λ and μ are held constant, LQ depends on the variability, σ 2, of the


service times.

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.45


M/G/1 Queues
• Example: Two workers competing for a job, Able claims to be faster
than Baker on average, but Baker claims to be more consistent,
• Poisson arrivals at rate λ = 2 per hour (1/30 per minute).
• Able: 1/μ = 24 minutes and σ 2 = 202 = 400 minutes2:

(1 / 30) 2 [24 2 + 400]


LQ = = 2.711 customers
2(1 − 4 / 5)

• The proportion of arrivals who find Able idle and thus experience no delay is
P0 = 1-ρ = 1/5 = 20%.

• Baker: 1/μ = 25 minutes and σ 2 = 22 = 4 minutes2:


(1 / 30) 2 [25 2 + 4]
LQ = = 2.097 customers
2(1 − 5 / 6)
• The proportion of arrivals who find Baker idle and thus experience no delay is
P0 = 1-ρ = 1/6 = 16.7%.

• Although working faster on average, Able’s greater service variability results


in an average queue length about 30% greater than Baker’s.

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.46


M/M/1 Queues
• Suppose the service times in an M/G/1 queue are exponentially
distributed with mean 1/μ, then the variance is σ 2 = 1/μ2.
• M/M/1 queue is a useful approximate model when service times
have standard deviation approximately equal to their means.
• The steady
steady-state
state parameters
0,35
0,30 M/M/1 Queue Pn
λ 0,25
ρ=
μ 0,20

Pn = (1 − ρ )ρ n
0,15
P0 = 1 − ρ 0,10
λ ρ 0,05
L= =
μ −λ1− ρ 0 00
0,00
1 3 5 7 9 11 13 15 17 19 21
1 1
w= =
μ − λ μ (1 − ρ ) ρ server utilization
λ2 ρ2 P0 probability of empty system
LQ = = L long-run time-average number of customers in system
μ (μ − λ ) 1 − ρ w long-run average time spent in system per customer
λ ρ LQ long-run time-average number of customers in queue
wQ = = wQ long-run average time spent in queue per customer
μ (μ − λ ) μ (1 − ρ )

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.47


M/M/1 Queues

• Single-chair unisex hair-styling shop


• Interarrival and service times are exponentially
distributed
• λ = 2 customers/hour and µ = 3 customers/hour
λ 2 λ 2
ρ= = L= = = 2 Customers
μ 3 μ −λ 3− 2
1 L 2
P0 = 1 − ρ = w= =
= 1 hour
3 λ 2
1
1 ⎛2⎞ 2 1 1 2
P1 = ⋅ ⎜ ⎟ = wQ = w − = 1 − = hour
h
3 ⎝3⎠ 9 μ 3 3
1 ⎛2⎞ 4
2
λ2 4 4
P2 = ⋅ ⎜ ⎟ = LQ = = = Customers
3 ⎝3⎠ 27 μ ( μ − λ ) 3(3 − 2) 3
3
16 λ 4 2
P≥ 4 = 1 − ∑ Pn = L = LQ + = + = 2 Customers
n =0 81 μ 3 3

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.48


M/M/1 Queues
• Example: M/M/1 queue
with service rate μ =10 λ 5 6 7.2 8.64 10
customers per hour. ρ 0.5 0.60 0.72 0.864 1
• Consider how L and w increase L 1.0 1.50 2.57 6.350 ∞
as arrival rate, λ, increases w 0.2 0.25 0.36 0.730 ∞
from 5 to 8.64 by increments
of 20% 20
L
18 w

16

• If λ/μ ≥ 1, waiting lines tend to 14

of Customers
continually grow in length 12

10

Number o
8

• Increase in average system 6

time (w) and average number 4

i system
in t (L) is
i highly
hi hl 2

nonlinear as a function of ρ. 0
0.5 0.6 0.7 0.8 0.9 1
rho

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.49


Effect of Utilization and Service Variability

• For almost all queues, if lines are too long, they can be
reduced by decreasing server utilization (ρ) or by decreasing
the service time variability (σ2).
• A measure of the variability of a distribution:
• coefficient
ff off variation (cv):

V (X )
(cv) 2 =
[E ( X )]2
• The larger cv is, the more variable is the distribution relative to its
expected value
• For exponential service times with rate µ
• E(X) = 1/µ
• V(X) = 1/µ2
¨ cv = 1

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.50


Effect of Utilization and Service Variability
• Consider LQ for any For any M/G/1
M/G/1 q
queue: (cv)2 = σ2/(1/µ)2= σ2µ2

ρ 2 (1 + σ 2 μ 2 )
LQ =
2(1 − ρ )
⎛ ρ 2 ⎞⎛ 1 + (cv) 2 ⎞
=⎜ ⎟⎜ ⎟
⎜ 1 − ρ ⎟⎜ 2 ⎟
⎝ ⎠⎝ ⎠

LQ for M/M/1 Corrects the M/M/1


queue formula to account for a
non-exponential service
time dist’n

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.51


Multiserver Queue: M/M/c
• M/M/c/∞/∞ queue: c servers operating in parallel
• Arrival process is poisson with rate λ
• Each server has an independent and identical exponential service-
time distribution, with mean 1/μ.
• To achieve statistical equilibrium,
q , the offered load (λ/μ
μ) must satisfy
y
λ/μ < c, where λ/(cµ) = ρ is the server utilization.

Calling population
λ 1

Waiting line
2

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.52


Multiserver Queue: M/M/c

• The steady-state parameters for M/M/c

λ
ρ=

−1
⎧⎪⎡ c −1 (λ / μ ) n ⎤ ⎡⎛ λ ⎞ c ⎛ 1 ⎞⎛ cμ ⎞⎤ ⎫⎪
P0 = ⎨⎢∑ ⎥ + ⎢⎜⎜ ⎟⎟ ⎜ ⎟⎜⎜ ⎟⎟⎥ ⎬
Probability that ⎪⎩⎣ n =0 n! ⎦ ⎢⎣⎝ μ ⎠ ⎝ c! ⎠⎝ cμ − λ ⎠⎥⎦ ⎪⎭
all servers are (cρ ) c P0
P ( L (∞ ) ≥ c ) =
busy c!(1 − ρ )
(cρ ) c +1 P0 ρ ⋅ P ( L (∞ ) ≥ c )
L = cρ + = cρ +
c(c!)(1 − ρ ) 2
1− ρ
L
w=
λ
ρ ⋅ P (L (∞ ) ≥ c )
LQ =
1− ρ
L − LQ = cρ

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.53


Multiserver Queue: M/M/c

Probability of empty system Probability of empty system


log scale on y axis

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.54


Multiserver Queue: M/M/c

Probability of empty system Number of customers in system

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.55


Multiserver Queue: Common Models
• Other common multiserver queueing models
⎛ ρ 2 ⎞⎛ 1 + (cv) 2 ⎞
LQ = ⎜⎜ ⎟⎟⎜⎜ ⎟⎟
⎝ 1 − ρ ⎠⎝ 2 ⎠

LQ for M/M/1 Corrects the M/M/1


formula
queue

• M/G/c/∞: general service times and c parallel server. The


parameters can be approximated
p pp from those of the M/M/c/∞/∞
model.
• M/G/∞: general service times and infinite number of servers.
• M/M/c/N/∞: service times are exponentially distributed at rate μ and
c servers where the total system capacity is N ≥ c customer. When
an arrival occurs and the system is full, that arrival is turned
away.

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.56


Multiserver Queue: M/G/∞
• M/G/∞: general service times and infinite number of servers
• customer is its own server
• service capacity far exceeds service demand
• when we want to know how many servers are required so that
customers are rarely delayed

− λμ ( λμ ) n
Pn = e , n = 0,1, K
n!
− λμ
P0 = e
1
w=
μ
wQ = 0
λ
L=
μ
LQ = 0

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.57


Multiserver Queue: M/G/∞
• How many users can be logged in simultaneously in a computer
system
• Customers log on with rate λ = 500 per hour
• Stay connected in average for 1/µ =180 minutes = 3 hours
• For planning purposes it is pretended that the simultaneous logged in
users is infinite
• Expected number of simultaneous users L

λ
L = = 500 ⋅ 3 = 1500
μ
• To ensure providing adequate capacity 95% of the time, the number
of parallel users c has to be restricted
c c
e −1500 (1500) n
P ( L(∞) ≤ c) = ∑ Pn = ∑ ≥ 0.95
n =0 n =0 n!

• The capacity c =1564 simultaneous users satisfies this requirement

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.58


Multiserver Queue with Limited Capacity
• M/M/c/N/∞: service times are exponentially distributed at rate μ and
c servers where the total system capacity is N ≥ c customer
• When an arrival occurs and the system is fullfull, that arrival is turned away
• Effective arrival rate λe is defined as the mean number of arrivals per
time unit who enter and remain in the system

λ ⎡ c
a n a c N n −c ⎤
−1

a= P0 = ⎢1 + ∑ + ∑ ρ ⎥
μ ⎣ n =1 n ! c! n = c +1 ⎦
λ aN
ρ= PN =
c!c N −c
P0

P0 a c ρ
LQ =
c!(1 − ρ )
( 1 − ρ N −c − ( N − c) ρ N −c (1 − ρ ) )
λe = λ (1 − PN )
LQ
wQ =
λe (1 - PN) probability
b bilit that
th t a
customer will find a
1
w = wQ + space and be able to
μ enter the system
L = λe w

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.59


Multiserver Queue with Limited Capacity
Single-chair unisex hair-styling shop (again!)
• Space only for 3 customers: one • Queue time
in service and two waiting LQ 28
wQ = = = 0.246
• First compute P0 λe 114
1
P0 = = 0.415 • System time, time in shop
⎡ 2 2 3 ⎛ 2 ⎞ n −1 ⎤
⎢1 + + ∑ ⎜ ⎟ ⎥
⎣⎢ 3 3 n = 2 ⎝ 3 ⎠ ⎦⎥ 1 66
w = wQ + = = 0.579
μ 114
• P(system is full)
PN = P3
( )
2 3
= 3 P =
8
= 0.123 • Expected number of customers
0
in shop
2
1!1 65
• Average of the queue L = λe w =
66
= 1.015
65
LQ = 0.431
• Probability of busy shop
• Effective arrival rate λe
1 − P0 = = 0.585
⎛ 8 ⎞ 114 μ
λe = 2⎜1 − ⎟= = 1.754
⎝ 65 ⎠ 65

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.60


Steady-state Behavior of Finite-Population
Models

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.61


Steady-State Behavior of Finite-Population
Models
• In practical problems calling population is finite
• When the calling population is small, the presence of one or more customers
in the system has a strong effect on the distribution of future arrivals.
• Consider a finite-calling population model with K customers (M/M/c/K/K)
• The time between the end of one service visit and the next call for service is
exponentially distributed with mean = 1/λ.
• Service times are also exponentially distributed with mean 1/µ.
• c parallel servers and system capacity is K.

K Customers
Mean runtime 1
1/λ
Waiting line with capacity K-c
2

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.62


Steady-State Behavior of Finite-Population
Models
• Some of the steady-state probabilities of M/M/c/K/K :
−1
⎡ c −1 ⎛ K ⎞⎛ λ ⎞ n K K! ⎛λ⎞
n

P0 = ⎢∑ ⎜⎜ ⎟⎟⎜⎜ ⎟⎟ + ∑ ⎜⎜ ⎟⎟ ⎥
⎢⎣ n =0 ⎝ n ⎠⎝ μ ⎠ n =c ( K − n)!c!c ⎝μ⎠
n −c
⎥⎦
⎧⎛ K ⎞⎛ λ ⎞ n
⎪⎜⎜ ⎟⎟⎜⎜ ⎟⎟ P0 , n = 0,1,..., c − 1
⎪ n μ
Pn = ⎨⎝ ⎠⎝ ⎠ n
⎪ K! ⎛λ⎞
⎪ ( K − n)!c!c n −c ⎜⎜ ⎟⎟ , n = c, c + 1,...K
⎩ ⎝μ⎠
K
λe
L = ∑ nPn , w = L / λe , ρ=
n =0 cμ

where λe is the long run effective arrival rate of customers to queue (or entering/exiting service)
K
λe = ∑ ( K − n)λPn
n =0

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.63


Steady-State Behavior of Finite-Population
Models
• Example: two workers who are responsible for 10 milling
machines.
• Machines run on the average for 20 minutes, then require an
average 5-minute service period, both times exponentially
distributed: λ = 1/20 and μ = 1/5.
• All of the performance measures depend on P0:
−1
⎡ 2−1 ⎛10 ⎞⎛ 5 ⎞ n 10 10! ⎛ 5 ⎞ ⎤
n

P0 = ⎢∑ ⎜⎜ ⎟⎟⎜ ⎟ + ∑ n−2 ⎜ ⎟ ⎥ = 0.065


n 20
⎢⎣ n =0 ⎝ ⎠⎝ ⎠ n = 2 (10 − n )!2!2 20
⎝ ⎠ ⎥⎦

• Then, we can obtain the other Pn, and can compute the
expected number of machines in system:
10
L= ∑ nP
n =0
n = 3.17 machines

• The average number of running machines:


K − L = 10 − 3.17 = 6.83 machines

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.64


Networks of Queues

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.65


Networks of Queues
• No simple notation for networks of queues
• Two types
yp of networks of queues
q
• Open queueing network
• External arrivals and departures
• Number
b off customers in system varies over time
• Closed queueing network
• No external arrivals and departures
• Number of customers in system is constant

Out Out
In In

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.66


Networks of Queues
• Many systems are modeled as networks of single queues
• Customers departing from one queue may be routed to
another
h
λi λj=λipij Out
i j
In

• The following
g results assume a stable system
y with infinite
calling population and no limit on system capacity:
• Provided that no customers are created or destroyed in the queue,
then the departure rate out of a queue is the same as the arrival rate
into the queue, over the long run.
• If customers arrive to queue i at rate λi, and a fraction 0 ≤ pij ≤ 1 of
them are routed to queue j upon departure, then the arrival rate
f
from queue i to i λj =λi pij over the
t queue j is th long
l run.

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.67


Networks of Queues
• The overall arrival rate into queue j:

λj = aj + ∑λ p
all i
i ij

Arrival rate Sum of arrival rates


from outside f
from other
th queues in i
the network network
• If queue j has cj < ∞ parallel servers, each working at rate μj, then
the long-run utilization of each server is: (where ρj < 1 for stable
queue).
λ
ρj = j
cjμ j

• If arrivals from outside the network form a Poisson process with rate
aj for each queue j, and if there are cj identical servers delivering
exponentially
i ll di
distributed
ib d service
i times
i i h mean 1//μj, then,
with h in
i
steady state, queue j behaves likes an M/M/cj queue with arrival rate
λj = aj + ∑λ p
all i
i ijj

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.68


Network of Queues
• Discount store example: c=∞
0.4
• Suppose customers Customer 80 Cust.
c=1
arrive at the rate 80 per Population hour
hour and 40% choose
self-service. 0.6

• Hence:
• Arrival rate to service center 1 is λ1 = 80(0.4) = 32 per hour
• Arrival rate to service center 2 is λ2 = 80(0.6)
( ) = 48 p per hour.
• c2 = 3 clerks and μ2 = 20 customers per hour.
• The long-run utilization of the clerks is:
ρ2 = 48/(3×20)
( ) = 0.8
• All customers must see the cashier at service center 3, the overall rate to
service center 3 is λ3 = λ1 + λ2 = 80 per hour.
• If μ3 = 90 per hour, then the utilization of the cashier is:
ρ3 = 80/90 = 0.89

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.69


Summary
• Introduced basic concepts of queueing models.
• Showed how simulation, and sometimes mathematical analysis, can be
used
d tto estimate
ti t th
the performance
f measures off a system.
t
• Commonly used performance measures: L, LQ, w, wQ, ρ, and λe.
• When simulating any system that evolves over time, analyst must
decide whether to study transient or steady-state behavior.
• Simple formulas exist for the steady-state behavior of some queues.
• Simple
p models can be solved mathematically,
y, and can be useful in
providing a rough estimate of a performance measure.

Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models 8.70

You might also like