Download as pptx, pdf, or txt
Download as pptx, pdf, or txt
You are on page 1of 57

Slides Prepared by

John Loucks
St. Edward’s University

Slides Modified by
Danny Cho
Brock University

© 2020 Cengage Learning. All Rights Reserved. Slide 1


Chapter 15
Waiting Line Models
 Structure of a Waiting Line System
 Queuing Systems
 Queuing System Input Characteristics
 Queuing System Operating Characteristics
 Analytical Formulas
 Single-Channel Waiting Line Model with Poisson
Arrivals and Exponential Service Times
 Multiple-Channel Waiting Line Model with Poisson
Arrivals and Exponential Service Times
 Economic Analysis of Waiting Lines

© 2020 Cengage Learning. All Rights Reserved. Slide 2


Structure of a Waiting Line System

 Queuing theory is the study of waiting lines.

 Four characteristics of a queuing system are:


• the manner in which customers arrive
• the time required for service
• the priority determining the order of service
• the number and configuration of servers in the
system.

© 2020 Cengage Learning. All Rights Reserved. Slide 3


Structure of a Waiting Line System

 Distribution of Arrivals
• Generally, the arrival of customers into the system
is a random event.
• Frequently the arrival pattern is modeled as a
Poisson process.

 Distribution of Service Times


• Service time is also usually a random variable.
• A distribution commonly used to describe service
time is the exponential distribution.

© 2020 Cengage Learning. All Rights Reserved. Slide 4


Structure of a Waiting Line System

 Queue Discipline
• Most common queue discipline is first come, first
served (FCFS or FIFO).

• An elevator is an example of last come, first served


(LCFS or LIFO) queue discipline.

• Other disciplines assign priorities to the waiting


units and then serve the unit with the highest
priority first.

© 2020 Cengage Learning. All Rights Reserved. Slide 5


Structure of a Waiting Line System

 Single Service Channel System


Customer Waiting line Customer
arrives S1 leaves

 Multiple Service Channels System

S1

Customer Waiting line Customer


arrives S2
leaves

S3

© 2020 Cengage Learning. All Rights Reserved. Slide 6


Structure of a Waiting Line System

 Single Service Multiple Phase Channels

Customer Waiting line WL Customer


arrives ST1 ST2 leaves

 Multiple Service Multiple Phase Channels

ST1
ST2
Customer Waiting line WL Customer
arrives ST1 leaves
ST2
ST1

© 2020 Cengage Learning. All Rights Reserved. Slide 7


Queuing Systems

 A three part code of the form A/B/k is used to


describe various queuing systems.

• A  the arrival distribution


• B  the service (departure) distribution
• k  the number of channels for the system.

© 2020 Cengage Learning. All Rights Reserved. Slide 8


Queuing Systems

 Symbols used for the arrival and service processes are:

 M - Markov distributions (Poisson/exponential)


 D - Deterministic (constant)
 G - General distribution (with a known mean and
variance).

 For example, M/M/k refers to a system in which


arrivals occur according to a Poisson distribution,
service times follow an exponential distribution and
there are k servers working at identical service rates.

© 2020 Cengage Learning. All Rights Reserved. Slide 9


Queuing System Input Characteristics

 = the average arrival rate


1/ = the average time between arrivals

µ = the average service rate for each server


1/µ = the average service time

 = the standard deviation of the service time

© 2020 Cengage Learning. All Rights Reserved. Slide 10


Queuing System Operating Characteristics

P0 = probability the service facility is idle


Pn = probability of n units in the system
Pw = probability an arriving unit must wait for
service
Lq = average number of units in the queue
awaiting service
L = average number of units in the system
Wq = average time a unit spends in the queue
awaiting service
W = average time a unit spends in the system

© 2020 Cengage Learning. All Rights Reserved. Slide 11


Analytical Formulas

 For nearly all queuing systems, there is a relationship


between the average time a unit spends in the system
or queue and the average number of units in the
system or queue.

 These relationships, known as Little's flow equations


are:
L = W and Lq = Wq

© 2020 Cengage Learning. All Rights Reserved. Slide 12


Analytical Formulas

 When the queue discipline is FCFS, analytical formulas


have been derived for several different queuing models
including the following:
• M/M/1
• M/M/k
• M/G/1
• M/D/1
• M/M/1 with a finite calling population
• M/G/k with blocked customers cleared – skip this
 Analytical formulas are not available for all possible
queuing systems. In this event, insights may be gained
through a simulation of the system.

© 2020 Cengage Learning. All Rights Reserved. Slide 13


Queuing Costs

CS = cost of service per server per time period


Cw = cost of waiting per customer per time period
k = number of servers (or channels)

Total Cost per time period:

TC = k CS + Wq Cw = k CS + Lq Cw (for queue)


or
TC = k CS + W Cw = k CS + L Cw (for system)

Note: Lq = Wq & L = W (Little’s flow equation)

© 2020 Cengage Learning. All Rights Reserved. Slide 14


M/M/1 Queuing System

 Single channel
 Poisson arrival-rate distribution
 Exponential service-time distribution
 Unlimited maximum queue length
 Infinite calling population
 Examples:
• Single-window theatre ticket sales booth
• Single-scanner airport security station

© 2020 Cengage Learning. All Rights Reserved. Slide 15


Example: SJJT, Inc. (A)

 M/M/1 Queuing System


Joe Ferris is a stock trader on
the floor of the New York Stock
Exchange for the firm of Smith,
Jones, Johnson, and Thomas, Inc.
Stock transactions arrive at a mean
rate of 20 per hour. Each order received by Joe
requires an average of two minutes to process.

This is an M/M/1 queue with  = 20 per hour and


 = 30 per hour.

© 2020 Cengage Learning. All Rights Reserved. Slide 16


Example: SJJT, Inc. (A)

 Average Time in the System


Question
What is the average time an order must wait from
the time Joe receives the order until it is finished being
processed (i.e. its turnaround time)?
Answer
The average time an order waits in the system is:

W = 1/(µ -  ) = 1/(30 - 20)


= 1/10 hour or 6 minutes

© 2020 Cengage Learning. All Rights Reserved. Slide 17


Example: SJJT, Inc. (A)

 Average Length of Queue


Question
What is the average number of orders Joe has
waiting to be processed?
Answer
Average number of orders waiting in the queue
is:
Lq = 2/[µ(µ - )]
= (20)2/[(30)(30-20)]
= 400/300
= 4/3

© 2020 Cengage Learning. All Rights Reserved. Slide 18


Example: SJJT, Inc. (A)

 Utilization Factor
Question
What percentage of the time is Joe processing
orders (or that he is busy)?
Answer
The percentage of time Joe is processing orders is
equivalent to the utilization factor, /. Thus, the
percentage of time he is processing orders is:

/ = 20/30 = 2/3 or 66.67%

© 2020 Cengage Learning. All Rights Reserved. Slide 19


M/M/k Queuing System

 Multiple channels (with one central waiting line)


 Poisson arrival-rate distribution
 Exponential service-time distribution
 Unlimited maximum queue length
 Infinite calling population
 Examples:
• Four-teller transaction counter in bank
• Two-clerk returns counter in retail store

© 2020 Cengage Learning. All Rights Reserved. Slide 20


Example: SJJT, Inc. (B)

 M/M/2 Queuing System


Smith, Jones, Johnson, and Thomas, Inc. has begun
a major advertising campaign which it believes will
increase its business 50%. To handle the increased
volume, the company has hired an additional floor
trader, Fred Hanson, who works at the same speed as
Joe Ferris.
Note that the new arrival rate of orders,  , is 50%
higher than that of problem (A).

Thus,  = 1.5(20) = 30 per hour.

© 2020 Cengage Learning. All Rights Reserved. Slide 21


Example: SJJT, Inc. (B)

 Sufficient Service Rate


Question
Why will Joe Ferris alone not be able to handle the
increase in orders?
Answer
Since Joe Ferris processes orders at a mean rate of µ
= 30 per hour, then  = µ = 30 and the utilization factor
is 1.
This implies the queue of orders will grow infinitely
large. Hence, Joe alone cannot handle this increase in
demand.

© 2020 Cengage Learning. All Rights Reserved. Slide 22


Example: SJJT, Inc. (B)

 Probability of n Units in System


Question
What is the probability that neither Joe nor Fred will
be working on an order at any point in time?

© 2020 Cengage Learning. All Rights Reserved. Slide 23


Example: SJJT, Inc. (B)

 Probability of n Units in System (continued)


Answer
Given that  = 30, µ = 30, k = 2 and ( /µ) = 1, the
probability that neither Joe nor Fred will be working is:
1
P0 
k  1 (  /  )n ( /  )k k
  ( )
n 0 n! k! k  
= 1/[(1 + (1/1!)(30/30)1] + [(1/2!)(1)2][2(30)/(2(30)-30)]

= 1/(1 + 1 + 1) = 1/3 = .333

© 2020 Cengage Learning. All Rights Reserved. Slide 24


Example: SJJT, Inc. (B)

 Average Time in System


Question
What is the average turnaround time for an order
with both Joe and Fred working?

© 2020 Cengage Learning. All Rights Reserved. Slide 25


Example: SJJT, Inc. (B)

 Average Time in System (continued)


Answer
The average turnaround time is the average
waiting time in the system, W.
 (  )k (30)(30)(30 30)2 1
Lq  ( P0 )  (1/3) 
( k  1)!( k    ) 2
(1!)(2(30)  30) 2
3
L = Lq + ( /µ) = 1/3 + (30/30) = 4/3
W = L/(4/3)/30 = 4/90 hr. = 2.67 min.

© 2020 Cengage Learning. All Rights Reserved. Slide 26


Example: SJJT, Inc. (B)

 Average Length of Queue


Question
What is the average number of orders waiting to
be filled with both Joe and Fred working?
Answer
The average number of orders waiting to be filled
is Lq. This was calculated earlier as 1/3.

© 2020 Cengage Learning. All Rights Reserved. Slide 27


Example: SJJT, Inc. (C)

 Economic Analysis of Queuing Systems


The advertising campaign of Smith, Jones, Johnson
and Thomas, Inc. (see problems (A) and (B)) was so
successful that business actually doubled. The mean
rate of stock orders arriving at the exchange is now 40
per hour and the company must decide how many
floor traders to employ. Each floor trader hired can
process an order in an average time of 2 minutes.

© 2020 Cengage Learning. All Rights Reserved. Slide 28


Example: SJJT, Inc. (C)

 Economic Analysis of Queuing Systems


Based on a number of factors the brokerage firm
has determined the average waiting cost per minute
for an order to be $.50. Floor traders hired will earn
$20 per hour in wages and benefits. Using this
information compare the total hourly cost of hiring 2
traders with that of hiring 3 traders.

© 2020 Cengage Learning. All Rights Reserved. Slide 29


Example: SJJT, Inc. (C)

 Economic Analysis of Waiting Lines


Total Hourly Cost
= (Total salary cost per hour)
+ (Total hourly cost for orders in the system)
= ($20 per trader per hour) x (Number of traders)
+ ($30 waiting cost per hour) x (Average number
of orders in the
system)
= 20k + 30L.
Thus, L must be determined for k = 2 traders and
for k = 3 traders with  = 40/hr. and  = 30/hr. (since
the average service time is 2 minutes (1/30 hr.).

© 2020 Cengage Learning. All Rights Reserved. Slide 30


Example: SJJT, Inc. (C)

 Cost of Two Servers


1
P0 
k  1 ( /  )n (  /  ) k k
  ( )
n 0 n! k! k  
P0 = 1 / [1+(1/1!)(40/30)]+[(1/2!)(40/30)2(60/(60-40))]

= 1 / [1 + (4/3) + (8/3)]
= 1/5

© 2020 Cengage Learning. All Rights Reserved. Slide 31


Example: SJJT, Inc. (C)

 Cost of Two Servers (continued)

Thus,
 (  )k (40)(30)(40 30)2 16
Lq  ( P0 )  (1/5) 
( k  1)!( k    ) 2
(1!)(2(30)  40) 2
15
L = Lq + ( /µ) = 16/15 + 4/3 = 2.40

Total Cost = (20)(2) + 30(2.40) = $112.00 per hour

© 2020 Cengage Learning. All Rights Reserved. Slide 32


Example: SJJT, Inc. (C)

 Cost of Three Servers


1
P0 
k  1 ( /  )n (  /  ) k k
  ( )
n 0 n! k! k  
P0 = 1/[[1+(1/1!)(40/30)+(1/2!)(40/30)2]+
[(1/3!)(40/30)3(90/(90-40))] ]
= 1 / [1 + 4/3 + 8/9 + 32/45]
= 15/59

© 2020 Cengage Learning. All Rights Reserved. Slide 33


Example: SJJT, Inc. (C)

 Cost of Three Servers (continued)

 (  )k (30)(40)(40 30)3
Lq  ( P0 )  (15/59)  .1446
( k  1)!( k    ) 2
(2!)(3(30)  40) 2

Thus, L = .1446 + 40/30 = 1.4780


Total Cost = (20)(3) + 30(1.4780) = $104.35 per hour

© 2020 Cengage Learning. All Rights Reserved. Slide 34


Example: SJJT, Inc. (C)

 System Cost Comparison


Wage Waiting Total
Cost/Hr Cost/Hr Cost/Hr
2 Traders $40.00 $82.00 $112.00
3 Traders 60.00 44.35 104.35
Thus, the cost of having 3 traders is less than that of
2 traders.

© 2020 Cengage Learning. All Rights Reserved. Slide 35


M/D/1 Queuing System

 Single channel
 Poisson arrival-rate distribution
 Constant service time
 Unlimited maximum queue length
 Infinite calling population
 Examples:
• Single-booth automatic car wash
• Coffee vending machine

© 2020 Cengage Learning. All Rights Reserved. Slide 36


Example: Ride ‘Em Cowboy!

 M/D/1 Queuing System


The mechanical pony ride
machine at the entrance to a
very popular J-Mart store provides
2 minutes of riding for $.50. Children
wanting to ride the pony arrive
(accompanied of course) according to a
Poisson distribution with a mean rate of 15 per hour.

© 2020 Cengage Learning. All Rights Reserved. Slide 37


Example: Ride ‘Em Cowboy!

 What fraction of the time is the pony idle?


l = 15 per hour
m = 60/2 = 30 per hour
Utilization = l/m = 15/30 = .5
Idle fraction = 1 – Utilization = 1 - .5 = .5

© 2020 Cengage Learning. All Rights Reserved. Slide 38


Example: Ride ‘Em Cowboy!

 What is the average number of children waiting


to ride the pony?
2 (15) 2
Lq = =  .25 children
2 ( - ) 2(30)(30 - 15)

 What is the average time a child waits for a ride?


 15
Wq = =  .01667 hours
2 ( - ) 2(30)(30 - 15)
(or 1 minute)

© 2020 Cengage Learning. All Rights Reserved. Slide 39


M/G/1 Queuing System
Poisson Arrivals and Arbitrary Service Times

The Cutler University Student Union has one self


service copying machine. On the average, 12
customers per hour arrive to make
copies. (The arrival process follows a
Poisson distribution.) The time to copy
documents follows approximately
a normal distribution with a mean
of 2.5 minutes and a standard
deviation of 30 seconds.

© 2020 Cengage Learning. All Rights Reserved. Slide 40


M/G/1 Queuing System
Poisson Arrivals and Arbitrary Service Times
The Union manager has received several
complaints from students regarding the long lines at
the copier. Based of this information,
determine:
1) the average number of customers
waiting or using the copier.
2) the probability an arriving
customer must wait in line.
3) the proportion of time the copier is idle.
4) the average time a customer must wait in line
before using the copier.

© 2020 Cengage Learning. All Rights Reserved. Slide 41


M/G/1 Queuing System
Poisson Arrivals and Arbitrary Service Times
This situation can be modeled as an M/G/1
system with:

l = 12 per hour = 12/60 = .2/minute


1/µ = 2.5 minutes
µ = 1/(2.5) = .4 per minute
s = 30 seconds = .5 minutes

© 2020 Cengage Learning. All Rights Reserved. Slide 42


M/G/1 Queuing System
Poisson Arrivals and Arbitrary Service Times
 Average number of customers waiting or using
the copier
    (  )
2 2 2
L  Lq  where Lq 
 2(1    )
Substituting the appropriate values gives:

(.2) 2 (.5)2  (.2 .4) 2


Lq   .26
2(1  .2 .4)
Thus L = .26 + (.2/.4) = .76 customers

© 2020 Cengage Learning. All Rights Reserved. Slide 43


M/G/1 Queuing System
Poisson Arrivals and Arbitrary Service Times
 Probability an arriving customer must wait in line
PW     .2 .4  .5
 Proportion of time the copier is idle

P0  1     1  .2 .4  .5
 Average time a customer must wait in line before
using the copier

Wq  Lq   .26 .2  1.3 minutes

© 2020 Cengage Learning. All Rights Reserved. Slide 44


M/G/k Queuing System
Poisson Arrivals, Arbitrary Service Times,
and No Waiting Line
Several firms are over-the-counter (OTC) market
makers of MegaTech stock. A broker wishing to
trade this stock for a client will call on
these firms to execute the order. If the
market maker's phone line is busy, a
broker will immediately try calling
another market maker to transact the
order.

© 2020 Cengage Learning. All Rights Reserved. Slide 45


M/G/k Queuing System
Poisson Arrivals, Arbitrary Service Times,
and No Waiting Line
Richardson and Company is one such OTC
market maker. It estimates that on the average, a
broker will try to call to execute a stock
transaction every two minutes. The time
required to complete the transaction
averages 75 seconds. The firm has four
traders staffing its phones. Assume calls
arrive according to a Poisson distribution.

© 2020 Cengage Learning. All Rights Reserved. Slide 46


M/G/k Queuing System
Poisson Arrivals, Arbitrary Service Times,
and No Waiting Line
What percentage of its potential business will be
lost by Richardson?
What percentage of its potential
business would be lost if only three
traders staffed its phones?

© 2020 Cengage Learning. All Rights Reserved. Slide 47


M/G/k Queuing System
Poisson Arrivals, Arbitrary Service Times,
and No Waiting Line
This problem can be modeled as an M/G/k
system with block customers cleared with:

1/l = 2 minutes = 2/60 hour


l = 60/2 = 30 per hour
1/µ = 75 seconds = 75/60 minutes = 75/3600 hours
µ = 3600/75 = 48 per hour

© 2020 Cengage Learning. All Rights Reserved. Slide 48


M/G/k Queuing System
Poisson Arrivals, Arbitrary Service Times,
and No Waiting Line
 Percentage of potential business that be lost when
using 4 traders (k = 4)
The system will be blocked when there are four
customers in the system. Hence, the answer is P4.
1
P0  k
where k = 4
 (
i 0
  ) i
/ i!

1
P0   .536
1  (30/ 48)  (30/ 48) / 2! (30/ 48) / 3! (30/ 48) / 4!
2 3 4

continued

© 2020 Cengage Learning. All Rights Reserved. Slide 49


M/G/k Queuing System
Poisson Arrivals, Arbitrary Service Times,
and No Waiting Line
 Percentage of potential business that be lost when
using 4 traders (k = 4)
(  ) 4 (30/48)4
Now, P4  P0 = (.536)  .003
4! 24
Thus, with four traders 0.3% of the potential
customers are lost.

© 2020 Cengage Learning. All Rights Reserved. Slide 50


M/G/k Queuing System
Poisson Arrivals, Arbitrary Service Times,
and No Waiting Line
 Percentage of potential business that be lost when
using 3 traders (k = 3)
The system will be blocked when there are three
customers in the system. Hence, the answer is P3.
1
P0   .537
1  (30/ 48)  (30/ 48) / 2! (30/ 48) / 3!
2 3

(  ) 3
(30/48) 3
P3  P0 = (.537)  .022
3! 6
Thus, with three traders 2.2% of the potential
customers are lost.
© 2020 Cengage Learning. All Rights Reserved. Slide 51
M/M/1 Queuing System
with Finite Calling Populations
Biff Smith is in charge of maintenance for four of
the rides at the Rollerama Amusement Park. On the
average, each ride operates four
hours before needing repair.
When repair is needed, the
average repair time is 10 minutes.
Assuming the time between
machine repairs as well as the
service times follow exponential
distributions, determine:
1) the proportion of time Biff is idle, and
2) the average time a ride is "down" for repairs.

© 2020 Cengage Learning. All Rights Reserved. Slide 52


M/M/1 Queuing System
with Finite Calling Populations
This problem can be modeled as an
M/M/1 queue with a finite calling population
of size N = 4 (rides).

l = 1/(4 hours) = .25 per hour


µ = 60/(10 minutes) = 6 per hour
l/m = .25/6 = 1/24

© 2020 Cengage Learning. All Rights Reserved. Slide 53


M/M/1 Queuing System
with Finite Calling Populations
 Proportion of time Biff is idle
1
P0  N
N!  n
n 0 ( N  n)!
( )

1
P0   .841
4! 4! 4! 4! 4!
(1/ 24)  (1/ 24)  (1/ 24)  (1/ 24)  (1/ 24) 4
0 1 2 3

4! 3! 2! 1! 0!
Hence, Biff is idle approximately 84% of the time.

© 2020 Cengage Learning. All Rights Reserved. Slide 54


M/M/1 Queuing System
with Finite Calling Populations
 Average time a ride is "down" for repairs
1
W  Wq 

where
Lq 
Wq  Lq  N  (1- P0 ) L  Lq  (1  P0 )
( N  L ) 

© 2020 Cengage Learning. All Rights Reserved. Slide 55


M/M/1 Queuing System
with Finite Calling Populations
 Average time a ride is "down" for repairs

Substituting the appropriate values gives:


Lq = 4 - ((.25+6)/.25)(1-.840825) = .020625

L = .020625 + (1-.840825) = .1798


Wq = .020625/((4-.1798).25) = .021596

W = .021596 + 1/6 = .18826 hours or 11.3 minutes

© 2020 Cengage Learning. All Rights Reserved. Slide 56


End of Chapter 15

© 2020 Cengage Learning. All Rights Reserved. Slide 57

You might also like