Queuing Theory
Queuing Theory
1
Slide
Structure of a Waiting Line System
2
Slide
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.
3
Slide
Structure of a Waiting Line System
Queue Discipline
•Most common queue discipline is first come, first
served (FCFS).
•An elevator is an example of last come, first served
(LCFS) queue discipline.
•Other disciplines assign priorities to the waiting
units and then serve the unit with the highest
priority first.
4
Slide
Structure of a Waiting Line System
System
Multiple Service Channels
S11
S33
5
Slide
Examples of Internal Service Systems
That Are Queueing Systems
Type of System Customers Server(s)
Secretarial services Employees Secretary
Copying services Employees Copy machine
Computer programming Employees Programmer
services
Mainframe computer Employees Computer
First-aid center Employees Nurse
Faxing services Employees Fax machine
Materials-handling Loads Materials-handling
system unit
Maintenance system Machines Repair crew
Inspection station Items Inspector
Production system Jobs Machine
Semiautomatic machines Machines Operator
Tool crib Machine Clerk 6
Slide
Examples of Transportation Service Systems
That Are Queueing Systems
8
Slide
Queuing System Input Characteristics
9
Slide
Queuing System Operating Characteristics
10
Slide
Analytical Formulas
11
Slide
Analytical Formulas
12
Slide
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
13
Slide
Notation for Single-Server Queueing Models
14
Slide
Assumptions
1.Interarrival times have an exponential distribution with a mean of 1/.
2.Service times have an exponential distribution with a mean of 1/.
3.The queueing system has one server.
• The expected number of customers in the system is
L = 1 – = –
• The expected waiting time in the system is
W = (1 / )L = 1 / ( – )
• The expected waiting time in the queue is
Wq = W – 1/ = / [( – )]
• The expected number of customers in the queue is
Lq = Wq = 2 / [( – )] = 2 / (1 – )
15
Slide
The probability of having exactly n customers in the system is
Pn = (1 – )n
Thus,
P0 = 1 –
P1 = (1 – )
P2 = (1 – )2
:
:
The probability that the waiting time in the system exceeds t is
P(W > t) = e–(1–)t for t ≥ 0
The probability that the waiting time in the queue exceeds t is
P(Wq > t) = e–(1–)t for t ≥ 0
16
Slide
Problem:
17
Slide
Problem:
18
Slide
Example: SJJT, Inc. (A)
19
Slide
Example: SJJT, Inc. (A)
Answer
P (x = 0) = (50e -5)/0! = e -5 = .0067
20
Slide
Example: SJJT, Inc. (A)
Answer
P (x = 3) = (53e -5)/3! = 125(.0067)/6 = .1396
21
Slide
Example: SJJT, Inc. (A)
Answer
P (x > 6) = 1 - P (x = 0) - P (x = 1) - P (x = 2)
- P (x = 3) - P (x = 4) - P (x = 5)
- P (x = 6)
= 1 - .762 = .238
22
Slide
Example: SJJT, Inc. (A)
Answer
Since Joe Ferris can process an order in an average
time of 2 minutes (= 2/60 hr.), then the mean service
rate, µ, is µ = 1/(mean service time), or 60/2.
= 30/hr.
23
Slide
Example: SJJT, Inc. (A)
Answer
Since the units are expressed in hours,
P (T < 1 minute) = P (T < 1/60 hour).
Using the exponential distribution, P (T < t ) = 1 - e-µt.
Hence, P (T < 1/60) = 1 - e-30(1/60)
= 1 - .6065 = .3935 = 39.35%
24
Slide
Example: SJJT, Inc. (A)
Answer
Since the exponential distribution is a continuous
distribution, the probability a service time exactly
equals any specific value is 0 .
25
Slide
Example: SJJT, Inc. (A)
Answer
The percentage of orders requiring more than 3
minutes to process is:
P (T > 3/60) = e-30(3/60) = e -1.5 = .2231 = 22.31%
26
Slide
Example: SJJT, Inc. (A)
Answer
This is an M/M/1 queue with = 20 per hour and
= 30 per hour. The average time an order waits in the
system is: W = 1/(µ - )
= 1/(30 - 20)
= 1/10 hour or 6 minutes
27
Slide
Example: SJJT, Inc. (A)
Answer
Average number of orders waiting in the queue is:
Lq = 2/[µ(µ - )]
= (20)2/[(30)(30-20)]
= 400/300
= 4/3
28
Slide
Example: SJJT, Inc. (A)
Utilization Factor
Question
What percentage of the time is Joe processing
orders?
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%
29
Slide
Example: SJJT, Inc. (A)
Solution
A B C D E F G H
1 Poisson Arrival Rate 20
2 Exponential Service Rate 30
3 Operating Characteristics
4 Probability of no orders in system Po 0.333
5 Average number of orders waiting Lg 1.333
6 Average number of orders in system L 2.000
7 Average time an order waits Wq 0.067
8 Average time an order is in system W 0.100
9 Probability an order must wait Pw 0.667
30
Slide
M/M/k Queuing System
31
Slide
n
1
Pn
P0 , for (n k)
n!
n
1
P0 , for (n k)
k! k n k
1
P0
n k 1 1
n
1
k
k
n 0 n!
k ! k
k
1 k
Pw P(n k ) P0 ,
k!
k
k
L P0 ,
k 1 ! k 2
k
L 1 Lq
W , Lq L , Wq W
32
Slide
General Operating Characteristics
L
L λW (or W )
λ
Lq
L q λWq (or Wq )
λ
1
W Wq
33
Slide
Problem:
A Tax consulting firm has four service stations (counters) in its
office to receive people who have problems and complaints about
their income, wealth and sales taxes. Arrivals average 80 persons
in an 8 hour service day. Each tax advisor spends irregular amount
of time servicing the arrivals which have been found to have an
exponential distribution. The average service time is 20 minutes.
Calculate the average no. of customers in the system,
average no. of customers waiting to be serviced,
average time a customer spend in the system,
average waiting time for a customer in queue.
Calculate how many hours each week does a tax advisor spend
performing his job?
What is the probability that a customer has to wait before he gets
service?
What is the expected no. of idle tax advisors at any specified time?
34
Slide
Example: SJJT, Inc. (B)
35
Slide
Example: SJJT, Inc. (B)
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.
36
Slide
Example: SJJT, Inc. (B)
37
Slide
Example: SJJT, Inc. (B)
38
Slide
Example: SJJT, Inc. (B)
39
Slide
Example: SJJT, Inc. (B)
40
Slide
Example: SJJT, Inc. (B)
Answer
The average number of orders waiting to be filled is
Lq. This was calculated earlier as 1/3 .
41
Slide
Example: SJJT, Inc. (B)
Formula Spreadsheet
A B C D E F G H
1 Number of Channels k 2
2 Mean Arrival Rate (Poisson) 30
3 Mean Service Rate (Exponential ) 30
4 Operating Characteristics
5 Probability of no orders in system Po =Po(H1,H2,H3)
6 Average number of orders waiting Lg ##
7 Average number of orders in system L =H6+H2/H3
8 Average time (hrs) an order waits Wq =H6/H2
9 Average time (hrs) an order is in system W =H8+1/H3
10 Probability an order must wait Pw =H2/H3
42
Slide
Example: SJJT, Inc. (B)
Spreadsheet Solution
A B C D E F G H
1 Number of Channels k 2
2 Mean Arrival Rate (Poisson) 30
3 Mean Service Rate (Exponential ) 30
4 Operating Characteristics
5 Probability of no orders in system Po 0.333
6 Average number of orders waiting Lg 0.333
7 Average number of orders in system L 1.333
8 Average time (hrs) an order waits Wq 0.011
9 Average time (hrs) an order is in system W 0.044
10 Probability an order must wait Pw 1.000
43
Slide
Example: SJJT, Inc. (C)
44
Slide
Example: SJJT, Inc. (C)
45
Slide
Example: SJJT, Inc. (C)
46
Slide
Example: SJJT, Inc. (C)
P0 = 1 / [1+(1/1!)(40/30)]+[(1/2!)(40/30)2(60/(60-40))]
= 1 / [1 + (4/3) + (8/3)]
= 1/5
47
Slide
Example: SJJT, Inc. (C)
Thus,
48
Slide
Example: SJJT, Inc. (C)
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
49
Slide
Example: SJJT, Inc. (C)
(30)(40)(40/30)3
Hence, Lq = (15/59) = 128/885 = .1446
(2!)(3(30)-40)2
Thus, L = 128/885 + 40/30 = 1308/885 (= 1.4780)
50
Slide
Example: SJJT, Inc. (C)
51
Slide