Queueing
Queueing
Mail order sales How many telephone lines/operators should be employed to hedge
against lost sales due to customer impatience?
What is a "queuing system“?
• A "queuing system" consists of discrete objects, i.e., "items" that "arrive" at
some rate to the "system". Within the system the items may form one or
more queues and eventually receive "service" and exit.
Arrivals Departures
items in queue &
items in service
Served Customers
Queueing System
Queue
C S
Customers CCCCCCC C S Service
C S facility
C S
Served Customers
Queuing Model
Server 1
Queue Server 2
(Buffer) ●
●
●
Server s
System
Typical components of queueing model
Default
Watch out: in some situations “arrival rate ()” is given; in others, “average inter-arrival time ()” is
given.
Watch out: in some situations “service rate ()” is given; in others, “average service time ()” is
given.
Capacity, Demand, and Flow Rate
• If we have identical servers, each with service rate ,
•
then the capacity of our system (total service rate) equals .
– Capacity =
• Flow Rate is the actual number of customers served per unit of time.
– Flow Rate = min(Demand, Capacity) = min(, )
• All queuing models we will deal with assume: (i.e., sufficient capacity).
A Deterministic Queue
•Graph
of number of customers in system over time
No. of customers
2
1
1 2 3 4 5 6 7
0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Time
Find:
• Avg. Flow Rate; Inter-arrival Time =
• Avg. Service Rate; Average Service Time =
• W = Avg. Time in System; = Avg. Time Waiting in Queue
• L= Avg. # of Units in System; = Avg. # of Units Waiting in Queue
• = Utilisation
• Capacity =
A Deterministic Queue
•Graph
of number of customers in system over time
No. of customers
2
1
1 2 3 4 5 6 7
0
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
Time
Find:
• Avg. Flow Rate = 1/3; Inter-arrival Time = 3;
• Avg. Service Rate = 1/2; Average Service Time = 1/=2;
• W = Avg. Time in System = 2; = Avg. Time Waiting in Queue = 0;
• L= Avg. # of Units in System = 2/3 ; = Avg. # of Units Waiting in Queue = 0;
• = Utilisation = 2/3;
• Capacity = 1/2;
Little’s Law: For any system/process operating in steady state
Arrival Departure
System/process
𝐿= 𝜆 ×𝑊
Average Number of Units in the System Average Flow Rate Average Time in System
[units of flow] [units of flow / units of time] [units of time]
•
Examples
– On average, customers visit the bank every hour and spend 12 min 0.2 hours, on
average, in the bank. How many customers are there in the bank, on average?
•
• A Forqueuing system consists of a queue and a service.
system as a whole: …… (1)
Queue itself is a system; hence, = …… (2)
Customers will be either in queue (waiting) or in service: = + 1/ …… (3)
From (1) & (2),
) = = average number of busy servers = utilisation
• Remarkably, Little’s Law:
– Simple
– General: Surprisingly, no matter what:
• how many servers there are,
• whether each server has its own queue or a single queue feeds all servers,
• what service time distributions are,
• what distribution of inter-arrival times is,
• what the order of service of items is.
– Useful: If two of the terms are easy to estimate, then the Law quickly provides the
missing third value.
– Has numerous uses in Operations Management and Managerial Decision Making:
You have already encountered it:
Work-In-Process (WIP) = Throughput * Cycle Time
Queuing Model: One Server, Deterministic, Sufficient Capacity
•• In the simplest case, there is one server ()
– There is no waiting!
Queuing Model: One Server, Deterministic, Insufficient Capacity
• Example 2: Consider a system with server, customers per hour, customers per
• hour,
and no variability in arrival and service times:
– Capacity is insufficient ()
Customer 5
Customer 4
Customer 3
Customer 2 Arrival
Waiting
Customer 1 Service
0 10 20 30 40 50 60
4
2
0
0 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60
• Example 3: Consider a system with server, customers per hour, customers per
• hour,
and variable arrival time and/or service time
Customer 5
Customer 4
Customer 3
Customer 2 Arrival
Waiting
Customer 1 Service
0 10 20 30 40 50 60
– Number of customers in the system will go up and down:
4
2
0
0 4 8 12 16 20 24 28 32 36 40 44 48 52 56 60
• In most services, both arrivals and service times are random (variability exists).
• Due to variability, waiting will occur, even with sufficient capacity ().
Exponential and Poisson Distributions
P r o b a b i l i ty D e n s i ty
•
• For many types of services, both inter-arrival times and service times are exponentially distributed.
– Small times are
most-likely. Exponential Probability
Density Function
8.0
is defined completely by
one rate parameter: for arrival rate and for service rate
P r o b a b i l i ty
(mean = standard deviation = for inter-arrival times and for service times).
0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
Poisson Probability
Mass Function
Number of Customers Arriving per Unit of Time
• Possible distributions:
– M – exponential distribution (memoryless)
– G – general distribution (with a given mean and standard
deviation)
– D – deterministic (constant)
•
• Exponential
• arrival rate inter-arrival and service times, server
Average inter-arrival time
• service rate Average service time
• Utilization =
• Prob. of 0 customers in system
Fundamental Result (can be proven; depends on the M/M
assumption):
Avg. # of customers in system= ; rest follows:
Let =
𝑃0 =¿ ¿
• Utilization
• Utilization
• Prob. of waiting
• Formulas work only if
• These formulas can be used for M/D/1 by assuming .
Typical Managerial Questions
Service Quality
•
• What is the average customer waiting time?
– Calculate .
– Note: if minutes, some customers might be waiting more than 5 minutes.
It is more appropriate to ask what percentage of customers wait less than 5 minutes, but this is
more difficult to calculate.
Capacity
• What is the average number of customers in the system or in the queue?
– Calculate or .
– Note: if customers, it is possible that at some point the number of waiting customers
might exceed 5.
• What is the probability that the number of customers in the system exceeds
5?
• What is the probability that the number of customers in the queue of M/M/2
system exceeds 5?
– With 2 servers, 5 customers are waiting when 2 + 5 = 7 customers are in the system.
–
Dupit Corp. Problem
Recall, is given = 4
•New
equipment would have following
effect on service-time distribution:
– Decrease mean (from 1/4 day to 1/5 day.
1 0.7
4 600 4 4 0.127 workday (1.02 hours)
2 5
• l = 120 customers/hour
m = 80 customers/hour
• Total cost of each server is $20/hour, i.e., Cs = $20.
• While servers busy, their value is $48/hour, i.e., Cw = $48.
• Choose s so as to Minimize TC = $20s + $48L.
See MMs_Economic_Analysis.xlsx