Chapter6queuing Models
Chapter6queuing Models
Queueing Models
Banks, Carson, Nelson & Nicol
Discrete-Event System Simulation
Purpose
Simulation is often used in the analysis of queueing models.
A simple but typical queueing model:
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.
Outline
Discuss some well-known models (not development
of queueing theories):
General characteristics of queues,
Meanings and relationships of important performance
measures,
Estimation of mean measures of performance.
Effect of varying input parameters,
Mathematical solution of some basic queueing models.
Calling Population
[Characteristics of Queueing System]
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.
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.
System Capacity
[Characteristics of Queueing System]
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.
Unlimited capacity, e.g., concert ticket sales with no limit on the
number of people allowed to wait to purchase tickets.
Arrival Process
[Characteristics of Queueing System]
For infinite-population models:
In terms of interarrival times of successive customers.
Random arrivals: interarrival times usually characterized by a
probability distribution.
Most important model: Poisson arrival process (with rate ), where
A
n
represents the interarrival time between customer n-1 and
customer n, and is exponentially distributed (with mean 1/).
Scheduled arrivals: interarrival times can be constant or constant
plus or minus a small random amount to represent early or late
arrivals.
e.g., 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.
Arrival Process
[Characteristics of Queueing System]
For finite-population models:
Customer is pending when the customer is outside the queueing
system, e.g., machine-repair problem: a machine is pending
when it is operating, it becomes not pending the instant it
demands service form the repairman.
Runtime of a customer is the length of time from departure from
the queueing system until that customers next arrival to the
queue, e.g., machine-repair problem, machines are customers
and a runtime is time to failure.
Let A
1
(i)
, A
2
(i)
, be the successive runtimes of customer i, and
S
1
(i)
, S
2
(i)
be the corresponding successive system times:
Queueing Notation
[Characteristics of Queueing System]
A notation system for parallel server queues: A/B/c/N/K
A represents the interarrival-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.
Queueing Notation
[Characteristics of Queueing System]
Primary performance measures of queueing systems:
P
n
: steady-state probability of having n customers in system,
P
n
(t): probability of n customers in system at time t,
: arrival rate,
e
: effective arrival rate,
: service rate of one server,
: server utilization,
A
n
: interarrival time between customers n-1 and n,
S
n
: service time of the nth arriving customer,
W
n
: total time spent in system by the nth arriving customer,
W
n
Q
: total time spent in the waiting line by customer n,
L(t): the number of customers in system at time t,
L
Q
(t): the number of customers in queue at time t,
L: long-run time-average number of customers in system,
L
Q
: long-run time-average number of customers in queue,
w: long-run average time spent in system per customer,
w
Q
: long-run average time spent in queue per customer.
=
|
.
|
\
|
= =
0 0
1
i
i
i
i
T
T
i iT
T
L
= =
=
T
i
i
dt t L
T
iT
T
L
0
0
) (
1 1
=
T L dt t L
T
L
T
as ) (
1
=
=
1 if , 1 ) (
0 if , 0
) (
L(t) t L
L(t)
t L
Q
customers 3 . 0
20
) 1 ( 2 ) 4 ( 1 ) 15 ( 0
=
+ +
=
Q
L
= =
=
T L dt t L
T
iT
T
L
Q
T
Q
i
Q
i Q
as ) (
1 1
0
0
cusomters 15 . 1 20 / 23
20 / )] 1 ( 3 ) 4 ( 2 ) 12 ( 1 ) 3 ( 0 [
= =
+ + + = L
=
=
N
i
i
W
N
w
1
1
1
1
as
N
Q
Q i Q
i
w W w N
N
=
=
units time 6 . 4
5
) 16 20 ( ... ) 3 8 ( 2
5
...
5 2 1
=
+ + +
=
+ + +
=
W W W
w
=
= N T w L and as
Arrival rate
Average
System time
Average # in
system
Server Utilization
[Characteristics of Queueing System]
Definition: the proportion of time that a server is busy.
Observed server utilization, , is defined over a specified time
interval [0,T].
Long-run server utilization is .
For systems with long-run stability: T as
Server Utilization
[Characteristics of Queueing System]
For G/G/1// queues:
Any single-server queueing system with average arrival
rate customers per time unit, where average service time
E(S) = 1/ time units, 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
= =
Server Utilization
[Characteristics of Queueing System]
In general, for a single-server queue:
For a single-server stable queue:
For an unstable queue ( > ), long-run server utilization is 1.
= =
= =
) ( and
as
s E
T L L
s s
1 < =
Server Utilization
[Characteristics of Queueing System]
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.
For systems in statistical equilibrium, the average number of
busy servers, L
s
, is: L
s
, = E(s) = /.
The long-run average server utilization is:
systems stable for where ,
c
c c
L
s
< = =
=
1 . 0 y probabilit with minutes 12
9 . 0 y probabilit with minutes 9
i
S
=
W
j
Q
is the time
customer j spends
in queue
hour /
* 10 $
* 10 $
customer
* 10 $
hour
customer
Q Q
Q
L w
w
= =
|
|
.
|
\
|
|
.
|
\
|
=
=
0 n
n
nP L
Q Q
Q
w L
w w
L
w
=
= =
1
,
+
=
+
+ =
+
=
+
+ =
= =
Q
Q
w w
L L
P
=
Q
L
+
=
Q
L
customers 097 . 2
) 6 / 5 1 ( 2
] 4 25 [ ) 30 / 1 (
2 2
=
+
=
Q
L
=
= =
Q
Q
n
n
w w
L L
P
\
|
+
|
|
.
|
\
|
+
=
2
) ( 1
1
) 1 ( 2
) 1 (
2 2
2 2 2
cv
L
Q
L
Q
for M/M/1
queue
Corrects the M/M/1
formula to account
for a non-exponential
service time distn
L
w
c L P
c
c c
P c
c L
c
c
c n
P
c
c
c
c
n
n
=
+ =
+ =
(
(
|
|
.
|
\
|
|
.
|
\
|
|
|
.
|
\
|
+
(
(
=
=
+
1
) (
) 1 )( ! (
) (
!
1
!
) / (
/
2
0
1
1
1
0
0
c L w nP L
K c c n
c c n K
K
c n P
n
K
P
c c n K
K
n
K
P
e e
K
n
n
n
c n
n
n
K
c n
n
c n
c
n
n
/ , / ,
,... 1 , ,
! )! (
!
1 ,..., 1 , 0 ,
! )! (
!
0
0
1
1
0
0
= = =
+ =
|
|
.
|
\
|
=
|
|
.
|
\
|
|
|
.
|
\
|
=
|
|
.
|
\
|
+
|
|
.
|
\
|
|
|
.
|
\
|
=
=
=
K
n
n e
e
P n K
0
) (
service) xiting entering/e (or queue to customers of rate arrival effective run long the is where
B17Slide 38
B17 typo
Brian; 2005/01/09
|
.
|
\
|
+ |
.
|
\
|
|
|
.
|
\
|
=
=
=
n
n
n
n
n
n
n
P
machines 17 . 3
10
0
= =
= n
n
nP L
machines 83 . 6 17 . 3 10 = = L K
Networks of Queues
Many systems are naturally modeled as networks of single
queues: customers departing from one queue may be routed
to another.
The following results assume a stable system 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 p
ij
1 of
them are routed to queue j upon departure, then the arrival rate
form queue i to queue j is
i
p
ij
(over the long run).
Networks of Queues
The overall arrival rate into queue j:
If queue j has c
j
< parallel servers, each working at rate
j
, then
the long-run utilization of each server is
j
=
j
/(c
j
) (where
j
< 1
for stable queue).
If arrivals from outside the network form a Poisson process with
rate a
j
for each queue j, and if there are c
j
identical servers
delivering exponentially distributed service times with mean 1/
j
,
then, in steady state, queue j behaves likes an M/M/c
j
queue with
arrival rate
+ =
i
ij i j j
p a
all
Arrival rate
from outside
the network
Sum of arrival rates
from other queues
in network
+ =
i
ij i j j
p a
all
Network of Queues
Discount store example:
Suppose customers arrive at the rate 80 per hour and 40%
choose self-service. 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.
c
2
= 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
Summary
Introduced basic concepts of queueing models.
Show how simulation, and some times mathematical analysis, can
be used to estimate the performance measures of a system.
Commonly used performance measures: L, L
Q
, w, w
Q
, , and
e
.
When simulating any system that evolves over time, analyst must
decide whether to study transient behavior 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
providing a rough estimate of a performance measure.