Queueing Theory Slides
Queueing Theory Slides
Queueing Theory Slides
Prof. Krokhmal
Queueing theory:
relies on queueing models to represent queueing systems.
studies these various models to derive formulas and insights for the corresponding queueing
systems.
helps to determine how to operate queueing systems in an efficient way.
The demand for service is the primary stimulus on the waiting-line system
There exists a population of individuals, units, etc., requiring service from time to time
The calling population can be thought as a group of items, some of which depart and join
the waiting line
computer customers: depending on time of day, etc., customers will call 1-800 support desk
machines/equipment: wear-out, usage rates will determine the mechanism for putting the
machines in waiting line for repair
The calling population, although limited, can be considered infinite under certain
conditions
For arrival population to be considered infinite, the departure rate must be relatively small
comparing to the size of the population
In some cases, the proportion of the population requiring service may be fairly large
comparing to population itself
Then the population is seriously depleted by the departure of its members for service
Hence, the departure rate will not remain stable
The term queue refers to the customers that departed the population and are waiting for
service, but have note yet been serviced
The departure mechanism governs the rate at which individuals leave the population and
join the queue
A model of queueing system must describe the statistical pattern according to which
customers join the queue
The common assumptions are that the number of customers joining the queue is
described by Poisson distribution, or constant over time, etc.
This departure mechanism is responsible for the formation of the waiting line and the
need to provide service
Balking: sometimes, the customers needing service may refuse joining the queue (the
queue may be too long, etc)
Service is the process of providing the activities required by the units in the waiting line
collecting a toll
filling an order
providing a necessary repair, etc.
The act of providing the service causes the waiting line to decrease by one unit
The rate at which units in line are serviced is assumed to be a parameter directly under
control of the decision maker
The service facility may consists of a single channel (server), or several servers in parallel
If it consists of only single channel, all arrivals must eventually pass through this channel
If several channels are provided, items may move from the waiting line into the first
channel that becomes empty
Modeling of a queueing system requires that the service time must be specified: either
random with a particular distribution (e.g., exponential, gamma (Erlang)), or constant
Increasing the service capacity (# number of servers) will lead to a reduction of both the
length of the line and waiting time for each service
Thus, it is of interest to determine the minimum total cost (waiting cost and service cost)
for a waiting-line service system
Queueing theory enables one to determine the average number of customers in line,
average waiting time, etc and use these values for optimizing the design of service
enterprize
Number of servers
Term Meaning
Term Meaning
1
P
LD nPn the expected number of customers in the system (both in the queue
nD0
waiting for service and being serviced)
1
P
Lq D .n s/Pn the expected queue length (excludes customers being served);
nDs
note: s is the number of servers
L D W
Lq D Wq
Furthermore, if the mean service time is constant .D 1=/ for all n, then the
expected waiting time W in the system is equal to the expected waiting time
Wq in the queue plus the mean service time 1 :
1
W D Wq C
Proof:
Assume each arriving customer pays the system operator $1 per unit of time he/she
spends in the system
What is the long-run rate at which the system operator earns money?
In the context of queueing theory, birth corresponds to arrival of a customer, and death
corresponds to the departure of a served customer.
The state N.t / of the system at any time t is equal to the total number of customers that
are either waiting for service or are being served.
n 1 n 2 1 0
Pn D Cn P0 ; where Cn D ; n 1;
n n 1 2 1
and
1
! 1
X
P0 D 1 C Cn :
nD1
D
s
The planners for Massive Mall have a reliable number of parking spaces needed for mall
employees, but the number of customers desiring parking spaces at any time is unknown.
It is estimated that 1,000 customers per hour are arriving to the mall, and each customer
spends on average 3 hours in the mall
Solution: Queueing theory can be used to determine the required parking space
For the moment, it can be assumed that the parking space is infinite, and the mall planners
are only concerned with estimating how much of this space will be in use for the most time.
The waiting time in the queue Wq does not have exactly an exponential distribution
because
PfWq D 0g D P0 D 1 > 0
But the conditional distribution of Wq given that Wq > 0 is exponential with parameter
.1 /, just like the distribution of W :
PfWq > t j Wq > 0g D e .1 /t
Suppose that all car owners fill up their tanks when they are exactly half full. At the present time,
an average of 7.5 customers per hour arrive at a single-pump gas station. It takes an average of
4 minutes to service a car.
(b) Suppose that a gas shortage occurs and panic buying takes place. To model the panic
buying, suppose that all car owners now purchase the gas when their tanks are
three-quarters full. Since it takes less time filling up, assume that the average service
time has reduced to 3 1 3 minutes. How does it affect Lq and W ?
A car washing facility operates with one bay. Cars arrive on average every 15 minutes, and it
takes on average 10 minutes to wash one car. The manager is interested to determine the size
of parking lot such an arriving car would find a parking space at least 90% of the time
1
D ; P0 D
s s sP1 r
1 1 1
s 1
C r
rD0
and for n 1
.=/n
8
P0 ; if 0 n s
n
<
Pn D
n
: .=/ P0 ;
if n s
s s s
n
The expressions for expected queue length and waiting time become
P0 .=/s 1
Lq D ; W D Wq C ;
s .1 /2
Lq 1
Wq D ; L D Wq C D Lq C
In many real-life situations, the queueing system cannot accommodate no more than K
customers.
Usually, it means that there is a limited room where the customers in the queue can wait
for service (e.g., waiting seats in a hair dressing salon), and when K customers are
present in the system, all other incoming customers will be balking, or turning away and
look for service someplace else.
Observe that the traffic intensity factor D does not need to be less than 1, because
s
arrivals in the system are controlled by the system limit K .
1
8
n ; 1
1 KC1
<
Pn D for n D 0; 1; : : : ; K
1
: ; D1
K C1
.K C 1/KC1 K
n K
LD
X
1 1 KC1 LD D
K C1 2
nD0
Lq D L .1 P0 /
K 1
Lq D C 1
2 K C1
Since some fraction of the arriving customers will be balking, we can define the effective
arrival rate eff as
eff D .1 PK /
and the rate at which customers balk as lost :
lost D PK
Since the arrival rate n depends on the number n of customers in the system, Littles
formulas do not apply!
However, the following modifications of Littles formulas hold for systems with finite queue,
where the arrival rate is replaced with the effective arrival rate eff :
L
W D
eff
Lq
Wq D
eff
and
.=/n
8
P0 ; n D 1; 2; : : : ; s
n
<
Pn D .=/n
P0 ; n D s; s C 1; : : : ; K
s s n s
0; n>K
:
The expressions for expected waiting time and queue length, etc:
P0 .=/s
K s
s/K s
Lq D 1 .K .1 /
s .1 /2
sX1 sX1
!
LD nPn C Lq C s 1 Pn
nD0 nD0
L
W D
.1PK /
Lq
Wq D
.1 PK /
and
n
N
8
P0 ; n D 1; 2; : : : ; s
.N n/ n
< n
Pn D N
n s
P0 ; n D s; s C 1; : : : ; N
.N n/ s s
:
0; n>N
So far, all queueing models were based on birth-and-death processes, and both their
interarrival times and service times had exponential distributions.
Although the assumption of exponential interarrival and service times serves well in many
cases, in some situations it is not applicable (e.g., when arrivals are scheduled or
regulated, or service requirements of the customers are similar, or there is a limit on
service duration: your order will be completed in 3 minutes, or its free!, etc.)
P0 D 1 ;
2 2
C 2
Lq D ;
2.1 /
L D Lq C ;
Lq
Wq D ;
1
W D Wq C
When service time distribution is exponential, 2 D 1=2 , then the above formulas
coincide with the already developed ones for the M=M=1 case.
M/D/1 model assumes that the service time distribution is deterministic (i.e., it is
constant). In this case, one has
2
Lq D
2.1 /
and the quantities L; Wq , and W are obtained as before.
M/Ek /s model assumes that service times have Erlang distribution with parameter k :
.k/k k 1 kt
fEk .t/ D t e ; t 0
.k 1/
Here, is strictly positive: > 0 and k is an integer: k D 1; 2; : : :
1 1
Mean of Erlang distribution with parameter k is , and its variance is 2 D
k2
Note that by varying k we can adjust the variability of service times between that of the
exponential distribution (k D 1, 2 D 1=2 ) and the constant service times ( 2 D 0,
k ! 1).
Meaning of Erlang distribution:
Distribution of service time will be of Elang type with parameters and k if the service
process consists of k operations whose durations are independent exponentially
1
distributed with mean .
k
1
Substituting 2 D into the Pollaczek-Khintchine formulas, for the single-server
k2
M/Ek /1 model we have
1Ck 2
Lq D ;
2k . /
1Ck
Wq D ;
2k . /
1
W D Wq C ;
L D W
For M/Ek /s model, analytic formulas are not available. Numerical values of parameters L,
Lq , etc., have been tabulated for various values of D s , s , and k
Alternative A is to provide a duplicate maintenance shop, so that two planes can be repaired
simultaneously. The cost, amortized over 5 years, is $400,000 per year for each of the airlines
airplanes.
Alternative B is to replace the present maintenance equipment by the most efficient (and
expensive) equipment available, thereby reducing the expected repair time to 18 hours. The
cost, amortized over 5 years, is $550,000 per year for each airplane. Which alternative should
the airline choose?