This document discusses queueing models and their analysis. It begins by outlining key characteristics of queueing systems such as customers, servers, arrival processes, and service times. It then introduces common performance measures used to evaluate queueing systems like average time in system and number of customers. The document presents Kendall notation for describing queueing models and discusses estimating long-run performance measures through simulation. It provides examples of queueing systems and models to illustrate the concepts.
2. Contents
• Characteristics of Queueing Systems
• Queueing Notation – Kendall Notation
Q g
• 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
8.2
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
3. Purpose
• Simulation is often used in the analysis of queueing models.
• A simple but typical queueing model
Server
Waiting line
Calling population
• 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 relatively simple systems: compute mathematically
• For realistic models of complex systems: simulation is usually
required
8.3
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
4. Outline
• Discuss some well-known models
• Not development of queueing theory, for this see other class!
p q g y,
• 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
Effect of varying input parameters
• Mathematical solutions of some basic queueing models
8.4
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
5. Characteristics of Queueing Systems
Characteristics of Queueing Systems
8.5
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
6. 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 Customers Server
y
Reception desk People Receptionist
Hospital Patients Nurses
Ai t Ai l R
Airport Airplanes Runway
Production line Cases Case-packer
Road network Cars Traffic light
Grocery Shoppers Checkout station
Computer Jobs CPU, disk, CD
N t k P k t R t
8.6
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
Network Packets Router
7. 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 n-1
I fi it l ti d l if i l t i t ff t d b th
n n 1
• Infinite population model: if arrival rate is not affected by the
number of customers being served and waiting, e.g., systems with
large population of potential customers.
∞
8.7
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
8. 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
If system is full no customers are accepted anymore
Server
Waiting line
• Unlimited capacity, e.g., concert ticket sales with no limit on the
number of people allowed to wait to purchase tickets.
Server
Waiting line
8.8
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
Server
Waiting line
9. 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.
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 distributed (with mean 1/λ).
p y ( )
• Scheduled arrivals: interarrival times can be constant or
constant plus or minus a small random amount to represent
early or late arrivals.
y
• Example: patients to a physician or scheduled airline flight arrivals
to an airport
• At least one customer is assumed to always be present,
At least one customer is assumed to always be present,
so the server is never idle, e.g., sufficient raw material for
a machine.
8.9
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
10. Arrival Process
• For finite-population models:
• Customer is pending when the customer is outside the queueing
p g q g
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., machine-repair problem, machines are customers
q , g , p 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 successive system times:
2 p g y
8.10
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
11. 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
• Jockey: move from one line to a shorter line
• Queue discipline: the logical ordering of customers in a
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:
Fi t i fi t t (FIFO)
• First-in-first-out (FIFO)
• Last-in-first-out (LIFO)
• Service in random order (SIRO)
( )
• Shortest processing time first (SPT)
• Service according to priority (PR)
8.11
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
12. 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
• 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 upon getting to the head of the line a customer takes the
in parallel, upon getting to the head of the line, a customer takes the
1st available server.
8.12
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
13. 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)
8.13
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
14. Queuing System: Example 1
• Wait for one of the three clerks:
• Batch service (a server serving several customers
• Batch service (a server serving several customers
simultaneously), or customer requires several servers
simultaneously.
8.14
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
16. Queuing System: Example 2
• Candy production line
• Three machines separated by buffers
p y
• Buffers have capacity of 1000 candies
Assumption:Allways
sufficient supply of
raw material.
8.16
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
18. 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-time distribution
• B represents the service time distribution
• c represents the number of parallel servers
• N represents the system capacity
• K represents the size of the calling population
p o a g popu a o
• N, K are usually dropped, if they are infinity
• Common symbols for A and B
• M Markov, exponential distribution
, p
• 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-
l ti I t i l d i ti ti ll di t ib t d
population. Interarrival and service times are exponentially distributed
• 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
8.18
and service discipline FIFO
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
19. Queueing Notation
• General performance measures of queueing systems:
• Pn steady-state probability of having n customers in system
• P (t) probability of n customers in system at time t
• Pn(t) probability of n customers in system at time t
• λ arrival rate
• λe effective arrival rate
• μ service rate of one server
μ service rate of one server
• ρ server utilization
• An interarrival time between customers n-1 and n
• Sn service time of the n-th arriving customer
n g
• Wn total time spent in system by the n-th customer
• Wn
Q 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
Q
• W long-run average time spent in system per customer
• wQ long-run average time spent in queue per customer
8.19
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
20. Long-run Measures of Performance of
Queueing Systems
Queueing Systems
8.20
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
21. 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
Q
• ρ server utilization
• Other measures of interest are
• Long-run proportion of customers who are delayed longer than
t time units
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
8.21
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
22. Long-run Measures of Performance of Queueing
Systems
• Goal of this section
• Major measures of performance for a general G/G/c/N/K
j p g
queueing system
• How these measures can be estimated from simulation runs
• Two types of estimators
• Sample average
• Sample average
• Time-integrated sample average
8.22
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
23. Time-Average Number in System L
Number of
customers in the
system
y
Time
8.23
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
24. 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
d l h h d b
contained exactly i customers, the time-weighted-average number in
the system is defined by:
∑
∑
∞
∞
⎟
⎞
⎜
⎛
1
ˆ i
T
i
iT
L
• Consider the total area under the function is L(t), then,
∑
∑ =
=
⎟
⎠
⎜
⎝
=
=
0
0 i
i
i
i
T
i
iT
T
L
( ), ,
∫
∑ =
=
∞ T
i dt
t
L
T
iT
T
L
0
)
(
1
1
ˆ
• The long-run time-average number of customers in system, with
probability 1:
∫
=
i
T
T 0
0
probability 1:
)
(
1
ˆ
0
L
dt
t
L
T
L T
T
⎯
⎯ →
⎯
= ∞
→
∫
8.24
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
25. Time-Average Number in System L
Number of
customers in the
system
y
Time
8.25
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
26. Time-Average Number in System L
• The time-weighted-average number in queue is:
T
Q
∞
∫
∑
1
1
ˆ
• G/G/1/N/K example: consider the results from the queueing system (N
Q
T
T
Q
i
Q
i
Q L
dt
t
L
T
iT
T
L ⎯
⎯ →
⎯
=
= ∞
→
=
∫
∑ 0
0
)
(
1
1
ˆ
• G/G/1/N/K example: consider the results from the queueing system (N
≥ 4, K ≥ 3).
20
/
)]
1
(
3
)
4
(
2
)
12
(
1
)
3
(
0
[
ˆ +
+
+
L
customers
15
.
1
20
/
23
20
/
)]
1
(
3
)
4
(
2
)
12
(
1
)
3
(
0
[
=
=
+
+
+
=
L
8.26
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
27. Time-Average Number in System L
⎧ 0
if
0 L(t)
⎩
⎨
⎧
≥
−
=
=
1
if
,
1
)
(
0
if
,
0
)
(
L(t)
t
L
L(t)
t
LQ customers
3
.
0
20
)
1
(
2
)
4
(
1
)
15
(
0
ˆ =
+
+
=
Q
L
8.27
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
28. Average Time Spent in System Per Customer w
• The average time spent in system per customer, called the
average system time, is:
∑
=
=
N
i
i
W
N
w
1
1
ˆ
where W1, W2, …, WN are the individual times that each of the N
customers spend in the system during [0,T].
• For stable systems: ∞
→
→ N
w
w as
ˆ
• If the system under consideration is the queue alone:
∑ →
=
N
Q
w
W
w
1
ˆ ∑
=
∞
→
⎯
⎯ →
⎯
=
i
Q
N
Q
i
Q w
W
N
w
1
8.28
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
29. Average Time Spent in System Per Customer w
• G/G/1/N/K example (cont.):
• The average system time is (Wi = Di – Ai)
g y ( i i i)
units
time
6
.
4
5
)
16
20
(
)
7
14
(
)
5
10
(
)
3
8
(
2
5
...
ˆ 5
2
1
=
−
+
−
+
−
+
−
+
=
+
+
+
=
W
W
W
w
• The average queuing time is units
time
2
.
1
5
0
3
3
0
0
ˆ =
+
+
+
+
=
Q
w
A4 D2
A3 D3
A1 A2 A5
D1 D4 D5
8.29
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
30. The Conservation Equation or
Little’s Law
Little s Law
8.30
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
31. 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)
Black Box
Arrivals Departures
average number in system = arrival rate × average system time
8.31
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
32. The Conservation Equation:
Little’s Law
• Conservation equation (a.k.a. Little’s law)
ˆ
ˆ w
L ˆ
ˆ
ˆ λ
=
A i l
Average
System time
Average # in
system
∞
→
∞
→
= N
T
w
L and
as
λ
Arrival rate
• Holds for almost all queueing systems or subsystems (regardless of
∞
→
∞
→
= N
T
w
L and
as
λ
q g y y ( g
the number of servers, the queue discipline, or other special
circumstances).
• G/G/1/N/K example (cont.): On average, one arrival every 4 time
p ( ) g , y
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.
8.32
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
33. Server Utilization
• Definition: the proportion of time that a server is busy.
• Observed server utilization, , is defined over a specified time
l
ρ̂
interval [0,T ].
• Long-run server utilization is ρ.
• For systems with long-run stability: ∞
→
→ T
as
ˆ ρ
ρ
y g y ρ
ρ
8.33
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
34. 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
• infinite queue capacity and calling 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
dt
t
L
t
L
T
L
T
Q
s
0
0
)
(
)
(
1
ˆ −
=
−
= ∫
0
8.34
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
35. Server Utilization
• In general, for a single-server queue:
ˆ
λ
λ
ρ
ρ
ρ
=
⋅
=
=
⎯
⎯ →
⎯
= ∞
→
)
(
and
ˆ
ˆ
s
E
L
L s
T
s
λ
μ
λ
ρ =
⋅
= )
(
and s
E
• For a single-server stable queue:
• For an unstable queue (λ > μ) long run server utilization is 1
1
<
=
μ
λ
ρ
• For an unstable queue (λ > μ), long-run server utilization is 1.
8.35
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
36. 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:
λ
• Clearly 0 ≤ LS ≤ c
• The long run average server utilization is:
μ
λ
S
λE
LS =
= )
(
• The long-run average server utilization is:
λ
Ls
systems
stable
for
where
, μ
λ
μ
λ
ρ c
c
c
Ls
<
=
=
8.36
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
37. 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
• By varying λ and μ, server utilization can assume any value
between 0 and 1.
I l i bilit f i t i l d i ti
• In general, variability of interarrival and service times causes
lines to fluctuate in length.
8.37
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
38. Server Utilization and System Performance
• Example: A physician who
schedules patients every 10
minutes and spends Si minutes
with the i th patient:
• Consider the system is
simulated with service times:
S1= 9, S2=12, S3 = 9, S4 = 9, S5 = 9,...
with the i-th patient:
• The system becomes:
⎩
⎨
⎧
=
1
.
0
y
probabilit
with
minutes
12
9
.
0
y
probabilit
with
minutes
9
i
S
• Arrivals are deterministic:
A A λ 1 10
⎩
A1 = A2 = … = λ-1 = 10
• Services are stochastic
• E(S ) = 9 3 min
• E(Si) = 9.3 min
• V(S0) = 0.81 min2
• σ = 0.9 min
• The occurrence of a
• On average, the physician's
utilization is
ρ = λ/μ = 0.93 < 1
relatively long service time
(S2 = 12) causes a waiting line
to form temporarily.
8.38
ρ μ
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
39. 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 say at a rate of
• System incurs a cost for each customer in the queue, say at a rate of
$10 per hour per customer.
• The average cost per customer is: Wj
Q is the time
customer j spends
Q
N
j
Q
j
w
N
W
ˆ
10
$
10
$
1
⋅
=
⋅
∑
=
in queue
• If customers per hour arrive (on average), the average cost per
hour is:
j
λ̂
ˆ
$
ˆ
$ ⎞
⎛
⎞
⎛
hour
10
$
ˆ
ˆ
10
$
customer
ˆ
10
$
hour
customer
ˆ Q
Q
Q L
w
w ⋅
=
⋅
⋅
=
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛ ⋅
⎟
⎠
⎞
⎜
⎝
⎛
λ
λ
• 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.
Th t t l t i 5
$
8.39
• The total server cost is:
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
ρ
⋅
⋅c
5
$
40. Steady-state Behavior of Infinite-
Population Markovian Models
Population Markovian Models
8.40
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
41. 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
• A queueing system is in statistical equilibrium if the probability that
the system is in a given state is not time dependent:
n
n P
t
P
n
t
L
P =
=
= )
(
)
)
(
(
• 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.
hold, as a rough guide.
• Simulation can be used for more refined analysis, more faithful
representation for complex systems.
8.41
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
42. Steady-State Behavior of Markovian Models
• Properties of processes with statistical equilibrium
• The state of statistical equilibrium is reached from any starting
q y g
state.
• The process remains in statistical equilibrium once it has
reached it
reached it.
8.42
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
43. 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:
∑
∞
= n
nP
L
• Apply Little’s equation L=λ w to the whole system and to the
∑
=0
n
n
nP
L
• Apply Little s equation, L λ w, to the whole system and to the
queue alone:
Q
Q
Q w
L
w
w
L
w λ
=
−
=
= ,
1
,
• G/G/c/∞/∞ example: to have a statistical equilibrium, a
necessary and sufficient condition is:
Q
Q
Q
μ
λ
,
,
necessary and sufficient condition is:
1
<
=
λ
ρ
8.43
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
μ
ρ
c
44. 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:
λ
ρ =
)
1
(
1
2
2
2
0
μ
σ
ρ
ρ
μ
ρ
+
−
=
P
The particular
)
/
1
(
1
)
1
(
2
)
1
(
2
2
σ
μ
λ
ρ
μ
σ
ρ
ρ
+
−
+
+
=
L
The particular
distribution is not
known!
)
1
(
)
1
(
2
)
/
1
(
1
2
2
2
μ
σ
ρ
ρ
σ
μ
λ
μ
+
=
−
+
+
=
L
w
ρ server utilization
)
1
(
2
)
/
1
(
)
1
(
2
2
2
σ
μ
λ
ρ
+
=
−
=
Q
Q
w
L P0 probability of empty system
L long-run time-average number of customers in system
w long-run average time spent in system per customer
LQ long-run time-average number of customers in queue
8.44
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
)
1
(
2 ρ
−
Q
wQ long-run average time spent in queue per customer
45. 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 LQ can be rewritten as:
• Average length of queue, LQ, can be rewritten as:
2
2
2
σ
λ
ρ
)
1
(
2
)
1
(
2 ρ
σ
λ
ρ
ρ
−
+
−
=
Q
L
• If λ and μ are held constant, LQ depends on the variability, σ 2, of the
service times.
8.45
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
46. 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:
customers
711
.
2
)
5
/
4
1
(
2
]
400
24
[
)
30
/
1
( 2
2
=
+
=
Q
L
• The proportion of arrivals who find Able idle and thus experience no delay is
P0 = 1-ρ = 1/5 = 20%.
)
5
/
4
1
(
2 −
• Baker: 1/μ = 25 minutes and σ 2 = 22 = 4 minutes2:
customers
097
2
]
4
25
[
)
30
/
1
( 2
2
=
+
=
L
• The proportion of arrivals who find Baker idle and thus experience no delay is
P0 = 1-ρ = 1/6 = 16.7%.
customers
097
.
2
)
6
/
5
1
(
2
=
−
=
Q
L
• Although working faster on average, Able’s greater service variability results
in an average queue length about 30% greater than Baker’s.
8.46
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
47. 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-state parameters
• The steady state parameters
μ
λ
ρ =
0,20
0,25
0,30
0,35
M/M/1 Queue Pn
( )
1
1
ρ
λ
λ
ρ
ρ
μ
=
=
−
= n
n
L
P ρ
−
=1
0
P
0 00
0,05
0,10
0,15
0,20
)
1
(
1
1
1
ρ
μ
λ
μ
ρ
λ
μ
−
=
−
=
−
−
w
ρ server utilization
0,00
1 3 5 7 9 11 13 15 17 19 21
( ) 1
2
2
ρ
λ
ρ
ρ
λ
μ
μ
λ
−
=
−
=
Q
L
P0 probability of empty system
L long-run time-average number of customers in system
w long-run average time spent in system per customer
LQ long-run time-average number of customers in queue
8.47
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
( ) )
1
( ρ
μ
ρ
λ
μ
μ −
=
−
=
Q
w wQ long-run average time spent in queue per customer
48. M/M/1 Queues
• Single-chair unisex hair-styling shop
• Interarrival and service times are exponentially
• Interarrival and service times are exponentially
distributed
• λ = 2 customers/hour and µ = 3 customers/hour
=
=
3
2
μ
λ
ρ Customers
2
2
3
2
=
−
=
−
=
λ
μ
λ
L
⎟
⎞
⎜
⎛
=
−
=
1
0
2
2
1
3
1
1
P
P ρ
h
2
1
1
1
hour
1
2
2
=
=
=
λ
L
w
=
⎟
⎠
⎞
⎜
⎝
⎛
⋅
=
=
⎟
⎠
⎞
⎜
⎝
⎛
⋅
=
2
2
1
4
2
1
9
3
3
P
P
Customers
3
4
)
2
3
(
3
4
)
(
hour
3
3
1
2
=
=
=
=
−
=
−
=
λ
λ
μ
Q
Q
L
w
w
∑
=
≥ =
−
=
⎟
⎠
⎜
⎝
3
0
4
2
81
16
1
27
3
3
n
n
P
P Customers
2
3
2
3
4
3
)
2
3
(
3
)
(
=
+
=
+
=
−
−
μ
λ
λ
μ
μ
Q
Q
L
L
8.48
0
n
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
49. M/M/1 Queues
• Example: M/M/1 queue
with service rate μ =10 λ 5 6 7.2 8.64 10
customers per hour.
• Consider how L and w increase
as arrival rate, λ, increases
ρ 0.5 0.60 0.72 0.864 1
L 1.0 1.50 2.57 6.350 ∞
w 0.2 0.25 0.36 0.730 ∞
as arrival rate, λ, increases
from 5 to 8.64 by increments
of 20%
18
20
L
w
• If λ/μ ≥ 1, waiting lines tend to
continually grow in length
10
12
14
16
of
Customers
• Increase in average system
time (w) and average number
i t (L) i hi hl 2
4
6
8
Number
o
in system (L) is highly
nonlinear as a function of ρ. 0
2
0.5 0.6 0.7 0.8 0.9 1
rho
8.49
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
50. 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
reduced by decreasing server utilization (ρ) or by decreasing
the service time variability (σ2).
• A measure of the variability of a distribution:
ff f
• coefficient of variation (cv):
)
(X
V
[ ]2
2
)
(
)
(
)
(
X
E
X
V
cv =
• 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
8.50
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
51. Effect of Utilization and Service Variability
• Consider LQ for any
M/G/1 queue:
For any M/G/1
(cv)2 = σ2/(1/µ)2= σ2µ2
q
−
+
=
)
1
(
2
)
1
( 2
2
2
LQ
ρ
μ
σ
ρ
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛ +
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
−
=
2
)
(
1
1
)
1
(
2
2
2
cv
ρ
ρ
ρ
⎠
⎝
⎠
⎝
Corrects the M/M/1
formula to account for a
non-exponential service
time dist’n
LQ for M/M/1
queue
8.51
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
52. 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, the offered load (λ/μ) must satisfy
q , ( μ) y
λ/μ < c, where λ/(cµ) = ρ is the server utilization.
1
Calling population
λ
Waiting line
2
c
8.52
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
53. Multiserver Queue: M/M/c
• The steady-state parameters for M/M/c
μ
λ
ρ
c
=
( ) ρ
λ
μ
μ
μ
λ
μ
λ
P
c
c
L
P
c
c
c
n
P
c
c
c
n
n
=
≥
∞
⎪
⎭
⎪
⎬
⎫
⎪
⎩
⎪
⎨
⎧
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
−
⎟
⎠
⎞
⎜
⎝
⎛
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
+
⎥
⎦
⎤
⎢
⎣
⎡
=
−
−
=
∑
)
(
)
(
!
1
!
)
/
(
0
1
1
0
0
Probability that
all servers are ( )
( )
ρ
ρ
ρ
ρ
ρ
ρ
ρ
L
w
c
L
P
c
c
c
P
c
c
L
c
c
L
P
c
−
≥
∞
⋅
+
=
−
+
=
−
≥
∞
+
1
)
(
)
1
)(
!
(
)
(
)
1
(
!
)
(
2
0
1
busy
( )
ρ
ρ
ρ
λ
c
L
L
c
L
P
L
w
Q
Q
=
−
−
≥
∞
⋅
=
=
1
)
(
Q
8.53
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
54. Multiserver Queue: M/M/c
Probability of empty system
log scale on y axis
Probability of empty system
log scale on y axis
8.54
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
56. Multiserver Queue: Common Models
• Other common multiserver queueing models
⎞
⎛
⎞
⎛ )
(
1 2
2
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛ +
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
−
=
2
)
(
1
1
2
2
cv
LQ
ρ
ρ
LQ for M/M/1
queue
Corrects the M/M/1
formula
• M/G/c/∞: general service times and c parallel server. The
parameters can be approximated from those of the M/M/c/∞/∞
p pp
model.
• M/G/∞: general service times and infinite number of servers.
• M/M/c/N/∞: service times are exponentially distributed at rate μ and
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.
8.56
away.
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
57. 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
• service capacity far exceeds service demand
• when we want to know how many servers are required so that
customers are rarely delayed
,
1
,
0
,
!
)
(
=
=
−
n
n n
n
e
P μ
λ
μ
λ
K
1
0
=
=
−
w
e
P μ
λ
0
=
=
Q
w
w
μ
0
=
L
L
μ
λ
8.57
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
0
=
Q
L
58. Multiserver Queue: M/G/∞
• How many users can be logged in simultaneously in a computer
system
• Customers log on with rate λ 500 per hour
• 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
users is infinite
• Expected number of simultaneous users L
λ
1500
3
500 =
⋅
=
=
μ
λ
L
• To ensure providing adequate capacity 95% of the time, the number
of parallel users c has to be restricted
∑
∑
−
c n
c
e 1500
)
1500
(
• The capacity c =1564 simultaneous users satisfies this requirement
∑
∑ =
=
≥
=
=
≤
∞
n
n
n
n
e
P
c
L
P
0
0
95
.
0
!
)
1500
(
)
)
(
(
8.58
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
59. 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 full that arrival is turned away
• When an arrival occurs and the system is full, 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
P
N
c
n
N
c
n
c
n
c
n
ρ ⎥
⎦
⎤
⎢
⎣
⎡
+
+
=
−
= +
=
−
∑ ∑
!
!
1
1
1 1
0
μ
λ
a =
( )
c
N
a
P
L
P
c
c
a
P
c
N
c
N
c
Q
c
N
N
N
ρ
ρ
ρ
ρ
−
−
−
−
=
=
−
−
−
)
1
(
)
(
1
)
(
!
0
0
μ
λ
ρ
c
=
( )
L
w
P
c
Q
Q
N
e
Q
λ
λ
ρ
ρ
ρ
ρ
=
−
=
−
)
1
(
)
(
)
(
)
1
(
!
(1 ) b bilit th t
w
w
w
Q
e
Q
μ
λ
+
=
1
(1 - PN) probability that a
customer will find a
space and be able to
enter the system
8.59
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
w
L e
λ
=
60. Multiserver Queue with Limited Capacity
• Space only for 3 customers: one • Queue time
Single-chair unisex hair-styling shop (again!)
• Space only for 3 customers: one
in service and two waiting
• First compute P0
• Queue time
246
.
0
114
28
=
=
=
e
Q
Q
L
w
λ
1
• System time, time in shop
579
.
0
114
66
1
=
=
+
=
μ
Q
w
w
415
.
0
3
2
3
2
3
2
1
1
3
2
1
0 =
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
⎟
⎠
⎞
⎜
⎝
⎛
+
+
=
∑
=
−
n
n
P
• P(system is full)
• Expected number of customers
in shop
114
μ
Q
( ) 123
.
0
65
8
1
!
1
0
2
3
3
2
3 =
=
=
= P
P
PN
• Average of the queue
in shop
015
.
1
65
66
=
=
= w
L e
λ
65
1
!
1
431
.
0
=
Q
L
• Effective arrival rate
• Probability of busy shop
585
.
0
1 0 =
=
−
μ
λe
P
Q
754
1
114
8
1
2 =
=
⎟
⎞
⎜
⎛
−
=
λ
8.60
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
μ
754
.
1
65
65
1
2 =
=
⎟
⎠
⎜
⎝
−
=
e
λ
61. Steady-state Behavior of Finite-Population
Models
Models
8.61
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
62. 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.
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.
1
K Customers
Mean runtime
Waiting line with capacity K-c
2
1/λ
c
8.62
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
63. Steady-State Behavior of Finite-Population
Models
• Some of the steady-state probabilities of M/M/c/K/K :
μ
λ
μ
λ
c
c
n
K
K
n
K
P
n
K
c
n
n
c
n
c
n
n
⎧ ⎞
⎛
⎞
⎛
⎥
⎥
⎦
⎤
⎢
⎢
⎣
⎡
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
−
+
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
= ∑
∑
−
=
−
−
= !
)!
(
!
1
1
0
0
λ
μ
λ
K
c
c
n
K
c
n
P
n
K
P n
n
n
⎪
⎪
⎪
⎪
⎨
⎧
+
=
⎟
⎟
⎞
⎜
⎜
⎛
−
=
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
=
,...
1
,
,
!
1
,...,
1
,
0
,
0
μ
λ
ρ
λ
μ
c
L
w
nP
L
K
c
c
n
c
c
n
K
e
e
K
n
n
c
n
=
=
=
⎪
⎩
+
⎟
⎟
⎠
⎜
⎜
⎝
−
∑
=
−
,
/
,
,...
1
,
,
!
)!
(
0
service)
xiting
entering/e
(or
queue
to
customers
of
rate
arrival
effective
run
long
the
is
where e
λ
K
∑
=
−
=
K
n
n
e P
n
K
0
)
( λ
λ
8.63
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
64. 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:
065
.
0
20
5
2
!
2
)!
10
(
!
10
20
5
10
1
10
2
1
2
0 =
⎥
⎥
⎤
⎢
⎢
⎡
⎟
⎠
⎞
⎜
⎝
⎛
+
⎟
⎠
⎞
⎜
⎝
⎛
⎟
⎟
⎠
⎞
⎜
⎜
⎝
⎛
=
−
−
−
∑
∑
n
n
n
P
• Then, we can obtain the other Pn, and can compute the
expected number of machines in system:
20
2
!
2
)!
10
(
20 2
2
0
0
⎥
⎦
⎢
⎣ ⎠
⎝
−
⎠
⎝
⎟
⎠
⎜
⎝ =
=
∑
∑ n
n
n n
n
expected number of machines in system:
machines
17
.
3
10
0
=
= ∑
=
n
n
nP
L
• The average number of running machines:
0
=
n
machines
83
6
17
3
10 =
=
L
K
8.64
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
machines
83
.
6
17
.
3
10 =
−
=
− L
K
66. Networks of Queues
• No simple notation for networks of queues
• Two types of networks of queues
yp q
• Open queueing network
• External arrivals and departures
b f
• Number of customers in system varies over time
• Closed queueing network
• No external arrivals and departures
No external arrivals and departures
• Number of customers in system is constant
In
Out
In
Out
In In
8.66
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
67. Networks of Queues
• Many systems are modeled as networks of single queues
• Customers departing from one queue may be routed to
h
another
i
In
Out
j
λj=λipij
λi
• The following results assume a stable system with infinite
g y
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 i t j i λ λ th l
8.67
from queue i to queue j is λj =λi pij over the long run.
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
68. Networks of Queues
• The overall arrival rate into queue j:
∑
+ λ
λ ∑
+
=
i
ij
i
j
j p
a
all
λ
λ
Arrival rate
from outside
Sum of arrival rates
f th i
• If queue j has cj < ∞ parallel servers, each working at rate μj, then
the long-run utilization of each server is: (where ρ < 1 for stable
from outside
the network
from other queues in
network
the long-run utilization of each server is: (where ρj < 1 for stable
queue).
j
j
j
j
c μ
λ
ρ =
• 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
i ll di ib d i i i h / h i
j
j μ
exponentially distributed service times with mean 1/μj, then, in
steady state, queue j behaves likes an M/M/cj queue with arrival rate
∑
+
= ij
i
j
j p
a λ
λ
8.68
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
∑i
j
j
j
all
69. Network of Queues
• Discount store example:
• Suppose customers
arrive at the rate 80 per
Customer
Population
80
c = ∞
c = 1
0.4
Cust.
hour
arrive at the rate 80 per
hour and 40% choose
self-service.
Population
0.6
hour
• 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 per hour.
2 ( ) p
• c2 = 3 clerks and μ2 = 20 customers per hour.
• The long-run utilization of the clerks is:
ρ2 = 48/(3×20) = 0.8
ρ2 ( )
• 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:
8.69
ρ3 = 80/90 = 0.89
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models
70. Summary
• Introduced basic concepts of queueing models.
• Showed how simulation, and sometimes mathematical analysis, can be
d t ti t th f f t
used to estimate the performance measures of a system.
• 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 models can be solved mathematically, and can be useful in
p y,
providing a rough estimate of a performance measure.
8.70
Prof. Dr. Mesut Güneş ▪ Ch. 8 Queueing Models