Waiting Lines PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 51

Management of Waiting lines

(Queueing models)

Alok Raj
PODS Area
Office: Room No 14, 2nd Floor, Library Building, Tel. 3439
Email: [email protected]
Examples of Queue
Queue
❖ A queue is simply a line
✓ Many processes require that people or items wait for service or
processing
❖ Weare interested in modeling such processes to answer
questions about
✓ How much time is spent in line?
✓ What proportion of time is a server idle?
✓ What is the average number of people/items waiting?
✓ What is the probability distribution of the number of customers
or of the waiting time?
Queueing system
Server

FCFS
Arriving Jobs Departure

Customer in
service

Arrival stream: 1 every 5 minutes 1 every 10 minutes


Service time: Exactly 5 minutes Exactly 5 minutes

50%
What would happen if arrivals were 1 every 4 minutes?
A Cost/Capacity Tradeoff Model

Total
cost
Cost

Cost of
service

Cost of waiting

Process capacity
Queueing system
Server

FCFS
Arriving Jobs Departure

Customer in
service
Parameters/Characteristics of a queueing system:
➢ Arrival Characteristics
➢ Waiting Line Characteristics
➢ Service System Configurations
Arrival Characteristics
 Size of the calling population
❖ Finite or infinite

 Arrival Pattern of Customers Highway tollbooth


❖ Predictable
❖ Random
• Generally, follows a Poisson distribution

Arrivals can be measured as the arrival rate or the inter-arrival time


❖ Average Arrival Rate (λ): Defines rate jobs arrive to the server.
❖ Mean Inter-arrival Time (1/λ): Average time between successive job arrivals
Poisson Distribution for Random Arrivals
•  is commonly used to describe the arrival rate
• Hence, 1/ is the average time between arrivals, i.e.,
average inter-arrival time
• The Poisson distribution is
e− X
P( X ) = for X = 0, 1, 2, 3, 4,...
X!
where

P(X) = probability of X arrivals per unit of time


X = number of arrivals per unit of time
 = average arrival rate
e = 2.7182818
Example: Poisson Arrivals
• Customers arrive to McDonalds according to a Poisson process
with rate of 2 customers per minute. Find the probabilities for
no arrival, 1 arrival, and 2 arrivals in next 1 minute.

e −  X
P( X ) =
X!
e −2 20 0.1353(1)
P(0) = = = 0.1353 =14%
0! 1
e −2 21 e −2 2 0.1353(2)
P(1) = = = = 0.2706 = 27%
1! 1 1
e −2 22 e −2 4 0.1353(4)
P(2) = = = = 0.2706 =27%
2! 2(1) 2
Example: Poisson Arrivals
Also find the probabilities for 3 arrivals, 4 arrivals,
and 5 arrivals
e −  X
P( X ) =
X!
e−2 23 0.1353(8)
P(3) = = = 0.1804 = 18%
3! 6

e−2 24 0.1353(16)
P(4) = = = 0.0902 = 9%
4! 24

e−2 25 0.1353(32)
P(5) = = = 0.0306 =3%
5! 120
Poisson Distributions
• Two examples of the Poisson distribution for arrival rates

0.30 – 0.25 –
0.25 – 0.20 –
0.20 –
Probability

Probability
0.15 –
0.15 –
0.10 –
0.10 –
0.05 – 0.05 –

0.00 –| | | | | | | | | | 0.00 –| | | | | | | | | |
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9
X X
 = 2 Distribution  = 4 Distribution
Arrival Characteristics
❖ Balking: The customer may decide not to enter the
queue upon arrival, perhaps because it is too long.
❖ Reneging: The customer may decide to leave the
queue after waiting a certain time in it.
❖ Jockeying:If there are multiple queues in parallel the
customers may switch between them.

FCFS
Arriving Jobs Departure
Waiting Line Characteristics
 Waiting lines
❖ Limited
❖ Unlimited

 Queue discipline: the rule by which customers in


the line receive service
❖ First Come First Serve (FCFS)
❖ Last Come First Serve (LCFS)
❖ Service in Random Order (SIRO)
Service System Configurations
• Number of Service Stages
o Single or multiple
Service Facility Characteristics
 Service time distribution
❖ Predictable
• often machine controlled
❖ Random
• Randomly distributed according to a negative exponential probability
distribution

• Make sure that the observations fit the assumed


distributions when applying these models.

❖ Mean Service Time: Average time required to serve a job.


❖ Average Service Rate (µ): The average rate at which jobs are
served.
Queueing models nomenclature

(M / M / s) : (FCFS / K / P)
Arrival Time Dist.
Service Time Dist.
No. of servers.
Service Order
Waiting Space
Calling Population

(M/M/1) : (FCFS/∞/∞)
(M/M/m) : (LCFS/∞/P)
(M/G/1) : (FCFS/K/∞)
Assumptions of M/M/1 Queuing model
• Single queue single server system
• Infinite customer population
• No balking or reneging
• Arrivals are independent of each other but rate is constant
over time
• Arrival rate follows a Poisson distribution (random)
• Arrivals are served on a FIFO basis
• Service times are variable and independent but the average
is known
• Service times follow a negative exponential distribution
(random)
• Average service rate is greater than the average arrival rate
• The system operates under a steady state condition.
Basic Queuing Model
❖ Arrival process ~ Random(Poisson)

❖ Service time ~ Random(Exponential)

❖ Server ~ Single

❖ Service Order ~ FCFS

❖ Waiting space ~ Unlimited

❖ Calling population ~ Infinite

❖ Nomenclature: M/M/1:FCFS//
Arrival and Service Pattern
❖ The standard assumption in many queuing models is that the
arrival process is Poisson.
✓ Average Arrival Rate (λ): Defines rate jobs arrive to the
server.
❖ The most commonly used queuing models are based on the
assumption of exponentially distributed service times and
interarrival times(µ/hour).
✓ Average Service Rate (µ): The average rate at which jobs
are served.
𝜆
❖ Assumption: <1
𝜇
❖ Let us take a example 𝜆=5/hour and µ=6/hour
Performance Metrics for single server system
❖ Number of jobs in the system: Those in queue plus one being
served.
 Average number of units in the system (Ls)

❖ Number of jobs in queue: No. of jobs waiting


 Average number of units in the queue (Lq)

❖ Time in System: = tdept-tarrival


 Expected waiting time per customer in the system (Ws)

❖ Waiting time: Time in queue


 Expected or average waiting time per customer in the queue (Wq)
Single-Channel Single-Stage Model, Poisson Arrivals, Exponential Service
Times (M/M/1)

Waiting Line Service rate μ

Arrivals Server
at rate λ Customer Exits
the System

Lq
Customer getting
served
L
Single-Channel Single-Stage Model (M/M/1)
 λ=mean number of arrivals per time period (for example,
per hour)
𝜇= mean number of people or items served per time period
 The average number of customers or units in the system,
L𝑠 , that is, the number in line plus the number being
λ
served: L𝑠 =
𝜇−λ
 The average time a customer spends in the system, W𝑠 ,
that is, the time spent in line plus the time spent being
1
served: W𝑠 =
𝜇−λ
Single-Channel Single-Stage Model (M/M/1)
 The average number of customers or units in the system, L𝑞 , that is, the number in
λ2
line plus the number being served: L𝑞 = 𝜇 𝜇−𝜆
 The average number of customers or units in the system, L𝑞 , that is, the number in
λ
line plus the number being served: W𝑞 = 𝜇 𝜇−𝜆
 The utilization factor for the system, (the Greek lowercase letter rho), that is, the
λ
probability that the service facility is being used: ρ = 𝜇
 The utilization factor for the system, (the Greek lowercase letter rho), that is, the
λ
probability that the service facility is being used: 𝑃0 = 1 − 𝜇

 The probability𝑘+1
that the number of customers in the system is greater than k, Pn>k;
λ
= 𝑃𝑛>𝑘 = 𝜇
Problem
 In a small barber shop, only one customer can get hair cut
while another customer can wait in a chair. Any other
arriving customer has to wait outside as there is only one
chair available. The customers arrive randomly at 6 per
hour. The service is exponential and takes 6 minutes on
the average. Find the probability that an arriving customer
will have to wait outside.
Problem
 ITC Hotels is a chain of hotels operating in India. The
company uses a toll-free telephone number to take reservations
for any of its hotels. The average time to handle each call is 3
minutes, and an average of 12 calls are received per hour. The
probability distribution that describes the arrivals is unknown.
Over a period of time it is determined that the average caller
spends 6 minutes either on hold or receiving service. Find the
average time in the queue, the average time in the system, the
average number in the queue, and the average number in the
system
Problem
 In a tool crib, workers come to take tools at 4/hour on the average. Waiting for them
costs Rs. 10/- per hour. The service time per worker is in the tool crib is 12 minutes.
What will be total waiting cost of the workers per day if it is 8 hours a day? Assume
M/M/1 queuing system.
Problem: Arnold’s Muffler Shop
 Arnold’s Muffler Shop in New Orleans. Arnold’s mechanic, Reid Blank, is able to install new
mufflers at an average rate of 3 per hour, or about 1 every 20 minutes. Customers needing this
service arrive at the shop on the average of 2 per hour. Arnold estimates that the cost of
customer waiting time, in terms of customer dissatisfaction and lost goodwill, is $50 per hour
of time spent waiting in line. The only other cost that Larry Arnold can identify in this queuing
situation is the pay rate of Reid Blank, the mechanic. Blank is paid $15 per hour.
 Arnold finds out through the muffler business grapevine that the Rusty Muffler, a cross-town
competitor, employs a mechanic named Jimmy Smith who can efficiently install new mufflers
at the rate of 4 per hour. Larry Arnold contacts Smith and inquires as to his interest in
switching employers. Smith says that he would consider leaving the Rusty Muffler but only if
he were paid a $20 per hour salary. Arnold, being a crafty businessman, decides that it may be
worthwhile to fire Blank and replace him with the speedier but more expensive Smith.

 Should Arnold hire Jimmy Smith as mechanic? Evaluate based on Total daily cost (Assume 8
working hours per day).
Problem: Arnold’s Muffler Shop
 Probability of more than k cars in the system
k Pn>k = (2/3)k+1

0 0.667 Note that this is equal to 1 – P0 = 1 – 0.33 = 0.667

1 0.444

2 0.296
3 0.198 Implies that there is a 19.8% chance that more than
3 cars are in the system

4 0.132

5 0.088

6 0.058
7 0.039
Example: Arnold’s Muffler Shop-Economic Analysis

• Total expected cost = service costs + waiting


costs
• Trade-off between these two costs
• Many service facilities, Low waiting
costs but high service cost
• Minimum number of service facilities,
service cost down but high waiting costs
• Objective: minimize total expected cost

• Decision: set the service level


• Number of servers
• Speed of server
Example: Arnold’s Muffler Shop-Economic Analysis

Total service cost = (Number of channels) x (Cost per channel)


= mCs

Total waiting cost = (Total time spent waiting by all arrivals) x


(Cost of waiting)
= (Number of arrivals) x (Average wait per
arrival)
= (λ W)Cw or (λ Wq )Cw

Total cost (TC) = Total service cost + Total waiting cost


= [mCs + λWCw ] or [mCs + λWq Cw ]
Example: Arnold’s Muffler Shop

• Arnold is thinking about hiring a different mechanic who can


install mufflers at a faster rate.
• The new operating characteristics would be:
 = 2 cars arriving per hour
𝜇 = 4 cars serviced per hour
Arnold’s Muffler Shop Revisited
 Arnold’s Muffler Shop. Earlier, Larry Arnold examined two options. He
could retain his current mechanic, Reid Blank, at a total expected cost of
$653 per day; or he could fire Blank and hire a slightly more expensive but
faster worker named Jimmy Smith. With Smith on board, service system
costs could be reduced to $360 per day.

 A third option is now explored. Arnold finds that at minimal after-tax cost
he can open a second garage bay in which mufflers can be installed. Instead
of firing his first mechanic, Blank, he would hire a second worker. The new
mechanic would be expected to install mufflers at the same rate as Blank—
about per hour.
 Customers, who would still arrive at the rate of 𝜆 = 2 per hour, would wait
in a single line until one of the two mechanics is free.
Multichannel Queuing Model with Poisson Arrivals and
Exponential Service Times (M/M/C)
❖ Multichannel queuing system, in which two or more servers or
channels are available to handle arriving customers.

❖ Arrivals follow a Poisson probability distribution and that


service times are distributed exponentially. Service is first
come, first served, and all servers are assumed to perform at
the same rate. Other assumptions listed earlier for the single-
channel model apply as well.
Equations for the Multichannel Queuing Model
m = number of channels open, 𝜆= average arrival rate, and 𝜇= average service rate at
each channel
 The probability that there are zero customers or units in the system:

 The average number of customers or units in the system:

 The average time a unit spends in the waiting line or being serviced (namely, in the
system):

𝜆
 The average number of customers or units in line waiting for service: 𝐿𝑞 = 𝐿 − 𝜇
 The average time a customer or unit spends in the queue waiting for service: 𝑊𝑞 =
𝐿𝑞
𝜆
𝜆
 The average time a customer or unit spends in the queue waiting for service: ρ = 𝑐𝜇
Effect of Service Level on Arnold’s Operating Characteristics

One Two One fast


Operating characteristic
mechanic mechanics mechanic
Probability that the system is empty
0.33 0.5 0.5
(P0)
Average number of cars in the system
2 cars 0.75 car 1 car
(L)
Average time spent in the system (W) 60 minutes 22.5 minutes 30 minutes
Average number of cars in the queue
1.33 cars 0.083 car 0.50 car
(Lq)
Average time spent in the queue (Wq) 40 minutes 2.5 minutes 15 minutes
Example
 Past records indicate that each of the five high-speed “page” printers at the U.S.
Department of Commerce, in Washington, D.C., needs repair after about 20 hours of
use. Breakdowns have been determined to be Poisson distributed. The one
technician on duty can service a printer in an average of 2 hours, following an
exponential distribution. If printer downtime costs $120 per hour and the technician
is paid $25 per hour, compute the total cost per hour.

Finite Population Model


Finite Population Model (M/M/C with Finite Source)
 When there is a limited population of potential customers for a service
facility, we need to consider a different queuing model.
 This model would be used, for example, if you were considering equipment
repairs in a factory that has five machines, if you were in charge of
maintenance for a fleet of 10 commuter airplanes, or if you ran a hospital
ward that has 20 beds. The limited population model permits any number of
repair people (servers) to be considered.
 We describe a finite calling population model that has the following
assumptions:
❖ There is only one server.
❖ The population of units seeking service is finite.
❖ Arrivals follow a Poisson distribution, and service times are
exponentially distributed.
❖ Customers are served on a first-come, first-served basis.
Equations for the Finite Population Model
𝜆= mean arrival rate, 𝜇= mean service rate, N = size of the population
 Probability that the system is empty:

 Average length of the queue:

 Average number of customers (units) in the system:

𝐿𝑞
 Average waiting time in the queue: 𝑊𝑞 =
𝑁−𝐿 𝜆

1
 Average time in the system: 𝑊 = 𝑊𝑞 +
𝜇

 Probability of n units in the system:


Example
 Past records indicate that each of the five high-speed “page” printers at the U.S.
Department of Commerce, in Washington, D.C., needs repair after about 20 hours of
use. Breakdowns have been determined to be Poisson distributed. The one
technician on duty can service a printer in an average of 2 hours, following an
exponential distribution. If printer downtime costs $120 per hour and the technician
is paid $25 per hour, compute the total cost per hour.
Enhancing the Queuing Environment
• Derive benefits from waiting
• Place impulse items near checkout
• A Shopify study found that 50% of all groceries purchased
are impulse buys.
• Advertise other goods/services
• Reduce perceived waiting time
• Magazines in waiting rooms
• Radio/television
• In-flight movies
• Filling out forms
More Complex Queuing Models Use of Simulation
❖ In the real world, there are often variations from basic
queuing models
❖ Computer simulation can be used to solve these more
complex problems

❖ Simulation allows the analysis of controllable factors


❖ Simulation should be used when standard queuing models
provide only a poor approximation of the actual service system
The Dupit Corp. Problem
 The Dupit Corporation is a longtime leader in the office photocopier
marketplace.
 Dupit’s service division is responsible for providing support to the
customers by promptly repairing the machines when needed. This is done
by the company’s service technical representatives, or tech reps.
 Current policy: Each tech rep’s territory is assigned enough machines so
that the tech rep will be active repairing machines (or traveling to the site)
75% of the time.
❖ 3 repair calls per day.
❖ Machines average 50 workdays between repairs, so assign 150 machines
per rep.
 Proposed New Service Standard: The average waiting time before a tech
rep begins the trip to the customer site should not exceed two hours.
Alternative Approaches to the Problem
 Approach Suggested by John Phixitt: Modify the current
policy by decreasing the percentage of time that tech reps are
expected to be repairing machines.
 Approach Suggested by the Vice President for Engineering:
Provide new equipment to tech reps that would reduce the time
required for repairs.
 Approach Suggested by the Chief Financial Officer:
Replace the current one-person tech rep territories by larger
territories served by multiple tech reps.
 Approach Suggested by the Vice President for Marketing:
Give owners of the new printer-copier priority for receiving
repairs over the company’s other customers.
The Queueing System for Each Tech Rep
 The customers: The machines needing repair.
 Customer arrivals: The calls to the tech rep requesting
repairs.
 The queue: The machines waiting for repair to begin at
their sites.
 The server: The tech rep.
 Service time: The total time the tech rep is tied up with a
machine, either traveling to the machine site or repairing
the machine. (Thus, a machine is viewed as leaving the
queue and entering service when the tech rep begins the
trip to the machine site.)
M/M/1 Queueing Model for the Dupit’s Current Policy

Data Results Range Name


= 3 (mean arrival rate) L= 3 L
m= 4 (mean service rate) Lq = 2.25 Lambda
s= 1 (# servers) Lq
W= 1 Mu
Pr(W > t) = 0.368 Wq = 0.75 n
when t = 1 P0
r= 0.75 Pn
Prob(Wq > t) = 0.276 Rho
when t = 1 n Pn s
0 0.25 Time1
1 0.1875 Time2
2 0.1406 W
3 0.1055 Wq
4 0.0791
5 0.0593
6 0.0445
7 0.0334
8 0.0250
9 0.0188
10 0.0141
11 0.0106
12 0.0079
13 0.0059
14 0.0045
John Phixitt’s Approach (Reduce Machines/Rep)
 The proposed new service standard is that the average
waiting time before service begins be two hours (i.e., Wq ≤
1/ day).
4
 John Phixitt’s suggested approach is to lower the tech
rep’s utilization factor sufficiently to meet the new service
requirement.

Lower r =  / m, until Wq ≤ 1/4 day,


where
 = (Number of machines assigned to tech rep) / 50.
M/M/1 Model for John Phixitt’s Suggested Approach
(Reduce Machines/Rep)
B C D E G H
3 Data Results
4 = 2 (mean arrival rate) L= 1
5 m= 4 (mean service rate) Lq = 0.5
6 s= 1 (# servers)
7 W= 0.5
8 Pr(W > t) = 0.135 Wq = 0.25
9 when t = 1
10 r= 0.5
11 Prob(Wq > t) = 0.068
12 when t = 1 n Pn
13 0 0.5
14 1 0.25
15 2 0.1250
16 3 0.0625
17 4 0.0313
18 5 0.0156
19 6 0.0078
20 7 0.0039
21 8 0.0020
22 9 0.0010
23 10 0.0005
The M/G/1 Model
 Assumptions
1. Interarrival times have an exponential distribution with a mean of 1/.
2. Service times can have any probability distribution. You only need the
mean (1/m) and standard deviation (s).
3. The queueing system has one server.

• The probability of zero customers in the system is


P0 = 1 – r
• The expected number of customers in the queue is
Lq = [2s2 + r2] / [2(1 – r)]
• The expected number of customers in the system is
L = Lq + r
• The expected waiting time in the queue is
Wq = Lq / 
• The expected waiting time in the system is
W = Wq + 1/m
VP for Engineering Approach (New Equipment)
 The proposed new service standard is that the average waiting time
before service begins be two hours (i.e., Wq ≤ 1/4 day).
 The Vice President for Engineering has suggested providing tech reps
with new state-of-the-art equipment that would reduce the time required
for the longer repairs.
 After gathering more information, they estimate the new equipment
would have the following effect on the service-time distribution:
 Decrease the mean from 1/4 day to 1/5 day.
 Decrease the standard deviation from 1/4 day to 1/10 day.
M/G/1 Model for the VP of Engineering Approach
(New Equipment)

B C D E F G
3 Data Results
4 = 3 (mean arrival rate) L= 1.163
5 m = 0.2 (expected service time) Lq = 0.563
6 s= 0.1 (standard deviation)
7 s= 1 (# servers) W= 0.388
8 Wq = 0.188
9
10 r= 0.6
11
12 P0 = 0.4

A one time cost of approximately $XYZ million. Let us assume $500 million
The Four Approaches Under Considerations
Proposer Proposal Additional Cost
John Phixitt Maintain one-person territories, but $300 million per year
reduce number of machines assigned
to each from 150 to 100
VP for Engineering Keep current one-person territories, One-time cost of $500
but provide new state-of-the-art million
equipment to the tech-reps

Chief Financial Officer Change to three-person territories None, except


disadvantages of larger
territories
VP for Marketing Change to two-person territories None, except
with priority given to the printer- disadvantages of larger
copiers for repairs territories

Decision: Adopt fourth proposal (except for sparsely populated areas where
second proposal should be adopted).

You might also like