You are on page 1of 57

Waiting Line Systems

Queuing Models

Examples of Waiting Lines


At Petrol Pumps, Restaurants, Malls, banks, post offices Planes awaiting clearance from control towers, trucks waiting to load or unload cargo, cabs at airports, buses entering terminals Employees waiting to swipe/punch cards for entry/exit

25 Years Ago

Jammu Tawi Exp

Frontier Mail

Paschim Express

FerozPur Janta Exp

Dehradun Exp

Indian Railways

Specific Service Counters Idle Server at some counter, Longer Queue at some counter

Any Train Booking at All Booking Counters Shorter Queue and Less Idle Servers

Premier

Third Party

Account Holder In Person

Power Advantage

Bulk Cash > 50K

Segregation of Service and Service Priority HongKong Bank (HSBC) Nationalized Banks Security is a Warm Feeling Service is a .. Feeling

Receipts and Payments At different counters. Idle time is more Longer queues

Customer

Counter (server)

Chitle Bandhu,
Sadashiv Peth, Pune

Cashier

Enter

Every customer gets a numbered token. Customer spends. Less time at each counter. Purchases are updated at counter. Waiting Time at cashier reduced

Exit

Major Elements of Waiting Line Systems

Processing Order

Arrivals

Waiting Line

Service

Exit

Calling Population

Goals of a Waiting Line System


Queuing Analysis for the design of System capacity Waiting line models are predictive models of expected behavior of a system in which waiting line forms Balance cost of providing customer service vs cost of customers waiting for service Design or redesign to satisfy desired specifications (Bank Manager wants maximum no of waiting customers = 7 in a bank, hence estimate the no of tellers required)

Calling Population
Infinite or unlimited Probability of arrival is not significantly influenced by the fact that some customers are waiting Open to general public (theatres, banks, post offices, restaurants, etc..) Finite or limited Systems have limited access for service Limited no of machines, limited no of trucks

Customer Arrivals
Discrete people arriving, trucks arriving, telephone calls Arrivals in single units or batches (bus load of passengers arriving at fast food joints, Theatre or cinema hall patrons) Distribution of arrivals follow the Poisson Distribution (ex : 4 cars per hour) The average time in between arrivals follows the negative exponential distribution. Ex Time between arrivals is 15 mins

Single Channel/Server, Single Line, Single Phase

Exit

Single Channel/Server, Single Line, Multiple Phase

Exit
Exit Payment of College Fees

Multiple Channel/Server, Single Line, Single Phase

Customer Service at Banks

Exit Exit

Exit
Multiple Channel/Server, Multiple Line, Single Phase Exit

Exit

Exit

Hospitals Out Patient Department

Multiple Channel/Server, Single Line, Multiple Phase

Exit
Exit Exit Multiple Channel/Server, Multiple Line, Multiple Phase

Exit

Exit

Exit

Poisson Distribution Assumptions


Probability of occurrence of an event (arrival) in a given interval does not affect the probability of occurrence of an event in another non overlapping interval (afternoon & night show) The expected no of occurrences of an event (arrival) in an interval is proportional to the size of the interval (15 mins and 30 mins). Probability of occurrence of an event (arrival) in one interval is equal to the probability of occurrence of the event in another equal-size interval/

Probability in a Poisson Distribution


P(X) = e-u uX / X! u = expected mean number of occurrences within a given interval e = Eulers constant = 2.71828 X = number of occurrences of an event in a given time interval P(X) = Probability of occurrence of event X Excel Formula = POISSON(X,u,True) for Cummulative Excel Formula = POISSON(X,u,False) for Non Cummulative

Poisson Distribution Problem


Machines arrive at a repair shop at the rate of 3 per 20 minute period. (u = 3) What is the probability that there will be 6 machines arriving in a 20 minute period? P(X = 6) What is the probability that there will be 12 machines arriving in 1 hour? (u = 9 per hour), P(X = 12) What is the probability that there will be less than 3 machines arriving in a 20 minute period? (u = 3), P(X< 3) = P(X = 0) + P(X = 1) + P(X = 2)

Types of Customers
Arriving customers may refuse to enter the system as there is a long waiting line Customers may arrive, wait for some time, and leave without being served Customers may switch lines in order to reduce the waiting time

Balking

Reneging

Jockeying

Processing Order (Priority)


First come, First served Assign priority and process waiting customers as per priority order High and Low Priority Customers

Service
Number of servers Number of steps or phases Distribution of processing or service time Single or multiple Single phase or multiple phase Negative exponential distribution Most customers require short service time, while a few require more service time

Probability in a Exponential Distribution


Probability density function f(t) = e- t for t, >= 0 and f(t) = 0 elsewhere = mean no of occurrences of a particular event per time unit Mean u = Std Dev S = 1/ P(t<=a) = 1- e- a = EXPONDIST(a, ,True) P(t>=b) = e- b = 1- EXPONDIST(b, ,True) P(a<=t<=b) = e- a - e- b

Exponential Distribution Problem


At a grocery store, time between arrivals is an exponential distribution. On an average, 2 customers arrive every four minutes. arr = 2/4 = 0.5 per min Service time is also exponentially distributed with a mean service rate of 40 customers per hour. ser = 40/60 = 0.67 per min

Exponential Distribution Problem


Probability that no more than 4 mins elapse between successive arrivals of customers Probability that more than 6 mins elapse between successive arrivals of customers Probability that between 4 and 6 mins elapse between successive arrivals of customers Expected time (u) between successive arrivals and standard deviation (s) of time between arrivals of customers Expected time of service Std deviation of service time Probability that service time is 1 min or less Probability that service time is 2 min or more Probability that service time is between 1 min and 2 min

P(t<=4) = 1- e- (0.5)(4) = 0.86466 P(t>=6) = e- (0.5)(6) = 0.049787 P(4<=t<=6) = e- (0.5(4) - e- (0.5(6) = 0.1353-0.0497 = 0.0855 U = 1/ = 1/0.5 = 2 mins S = u = 2 mins U = 1/ = 1/0.67 = 1.5 mins S = u = 1.5 mins P(t<=1) = 1- e- (0.67)(1) = 0.486 P(t>=2) = e- (0.67)(2) = 0.2636 P(1<=t<=2) = e- (0.67(1) - e- (0.67(2) =0.5134 0.2636 = 0.2498

Average Number Waiting and Average Waiting and Service Time -------------System -----------

In the Waiting Being Line Served Average Number

In the System

Lq

/u

L = Lq + /u

Average Time

Wq = Lq/u 1/u

W = Wq + 1/u

Where = mean arrival rate and u = mean service rate

Measures of System Performance

Lq
L

The average number waiting for service The average number in the system (waiting for service or being served)

P0
p Wq

The probability of zero units in the system


The system utilization (percentage of time servers are busy serving customers) The average time customers wait for service

Wf
M

The average time customers spend in the system (waiting for service and service time)
The expected maximum number waiting for service for a given level of confidence

Waiting Line Problem


A car wash franchise estimates for a new proposed facility: car arrival rate = 20 cars per hour and car service rate u = 25 cars per hour. Service time is variable as cars are hand washed. Car arrivals follow Poisson distribution, while Car service time follows exponential distribution. Cars are processed one at a time. (Single line, single server (s = 1)) Determine the following: Average no of cars being washed ( = /u = 20/25 = 0.80 car) Average no of cars in the system (cars being washed or waiting to be washed, where average number waiting in line Lq = 3.2) (L = Lq + /u= 3.2 + 0.80 = 4.0 cars) Average time in the line (avg time cars wait to get washed) ( = Lq/u = 3.2/20 = 0.16 hour = 0.16*60 = 9.6 mins) Average time cars spend in the system (waiting in line and being washed) (= Wq + 1/u = 9.6 + 1/25 = 0.20 hour = 0.20*60 = 12 mins) System utilization ( = /(su) = 20/(1*25) = 0.80 or 80%) where (s = no of servers = 1)

Basic Single Channel (M/M/1) Model


M/M/1 = Markovian (Poisson) arrivals, Markovial (negative exponential) service, and 1 (single) server One server or channel A Poisson arrival rate A negative exponential service time First-come, First-served processing order An infinite calling population No limit on queue length

Average Waiting Time


Wq = (/u)Wa + (1 - /u)0 (/u) + (1 - /u) = (/u)Wa

Wq = Weighted Average of waiting time of Actual Waiting and Non waiting Wa = Average Waiting Time Proportion of Customers Waiting = (/u) Proportion of Customers who do not wait = (1 - /u)

Basic Single Server System M/M/1


Performance Measure
System utilization Average number in line Average number in line

Notation
p Lq L

Formulae
/u 2/u(u- ) Lq + /u Lq / = /(u(-u) = (/u)Wa Wq + 1/u (1 - /u) P0(/u)n 1-(/u)k+1 Wq / (/u) = 1/(u- )

Average time in Line Average time in System Probability of Zero units in System Probability of n units in System Probability that waiting line wont exceed k units Average waiting time for an arrival not served immediately

Wq W P0 Pn Pn<=k Wa

M/M/1 Problem
At a ticket counter, mean arrival rate of customers = 3 per minute. Mean service rate is 4 customers per minute. Calculate all the performance measures. Consider n = 2 customers in the system and k = maximum length of the queue = 5

Basic Single Server System M/M/1


Performance Measure
System utilization Average number in line Average number in line

Notation p Lq L

Formulae /u = = 0.75 or 75% 2/u(u- ) = 2.25 customers Lq + /u = 2.25 + = 3 customers

Average time in Line

Wq
W P0 Pn Pn<=k Wa

Lq / = 2.25/3 = 0.75 minute


Wq + 1/u = 0.75 + = 1.0 minute (1 - /u) = (1 0.75) = 0.25 P0(/u)n = 0.25(0.75)2 = 0.1406 1-(/u)k+1 = (1- (0,75)5+1) = 0.822 Wq / (/u) = 1/(u- ) = 1/(4-3) = 1.0 min

Average time in System

Probability of Zero units in System Probability of n units in System

Probability that waiting line wont exceed k units Average waiting time for an arrival not served immediately

Basic Multiple Channel (M/M/S) Model


M/M/S = Markovian (Poisson) arrivals, Markovial (negative exponential) service, and S (multiple) server (S > 1) More than One server or channel A Poisson arrival rate A negative exponential service time First-come, First-served processing order An infinite calling population No upper limit on queue length The same mean service rate for all servers

Multiple Server, Priority Servicing Model


Basic Multiple Server Model but there is priority servicing. Within each class (or priority), waiting units are processed in the order they arrive. Unit with low priority will have a long waiting line

No Priority
New arrivals

Priority 1
Priority 2 Priority 3 Multiple Server, Priority Servicing Model

Psychology of Waiting
Perception of waiting of the customer Magazines provided at doctors or dentist waiting rooms Music, in-flight movies Fill up forms Mirrors near lifts Impulse purchases at supermarkets Additional spending

Desirable waiting time exploited

Value of Waiting Line Models


Assumptions are criticized as : Often service times are not negative exponential System is not in steady-state, but tends to be dynamic Service is difficult to define because service requirements can vary considerably from customer to customer

OTHER WAITING LINE MODELS

First Come First Served processing in M/M/S Model


Customers wait in a single line (post offices). Others systems record order of arrival (busy restaurants) or have customers take a number on arrival (bakeries, customer service in banks) Supermarket checkouts do not fall in multiple servers (though they have multiple servers) as customers do not form a single line) Condition su > must be satisfied

Basic Multiple Server System M/M/S


Performance Measure
System utilization

Notation
p

Formulae
/su

Average number in line


Average number in line Average time in Line Average time in System Probability of Zero units in System

Lq
L Wq W P0

u(/u)sP0/((s-1)!(su- )2)
Lq + /u Lq / = /(u(-u) = (/u)Wa Wq + 1/u 1/((/u)n/n!) + (/u)s/(s!(1-(/su)) from n = 0 to s-1 P0(/u)n/(n!) for n<= s P0(/u)n/(s!sn-s) for n> s (/u)s P0/ (s!(1- /su))

Probability of n units in System

Pn

Probability that an arrival will have to wait for service Average waiting time for an arrival not served immediately

Pw

Wa

1/(su- )

/u

Lq

P0

0.25
0.50

1
2 1

0.083
0.004 0.5

0.750
0.778 0.5

2
3 0.75 1

0.033
0.003 2.25

0.6
0.606 0.25

2
3 1.0 2

0.123
0.015 0.333

0.455
0.471 0.333

3
4

0.045
0.007

0.364
0.367

And so on Refer Excel Worksheet

Infinite Source values for Lq and Po given /u and s

Determining Maximum Length of Waiting Lines


Amount of space required to accommodate waiting customers Number of customers waiting will not exceed a specified percentage of time Determine the line length (n) that probably will not exceed 95% or 99% of the time pn = K where p = /su K = (1 probability)/Lq (1- p) n = LogK/Logp

Problem
Determine the maximum number of customers waiting in line for probabilities of both 95% and 99%. s = 1, = 4 per hour, u = 5 per hour p = /su = 4/(1)(5) = 0.80 For /u = 0.80, s = 1, Lq = 3.2 For 95%, K = (1-0.95)/3.2(1-0.80) = 0.078 n = log 0.078/log0.80 = 11.43 or 12 For 99%, K = (1-0.99)/3.2(1-0.80) = 0.0156 n = log 0.0156/log0.80 = 18.64 or 19

During noon hour at a bank, the arroval rate is 8 customers per minute, and the service rate is 2 customers per minute. Thus /u = 8/2 = 4. How many servers would be required so that the line does not exceed 4 waiting Customers? 6 servers at 95%, 7 servers at 99%

Servers Lq (s) 5 2.216


6 7 8 0.570 0.180 0.059

p = /su

n95
10 4 1 0

n99
17 8 4

0.80 0.67 0.57 0.50

Cost Considerations
Minimize Total Cost = Customer Waiting Cost + Capacity (Service) Cost Iterative procedure : Increase Capacity (or channels) by one. And compute the total cost. Total cost will initially decrease with increase in number of channels and then increase.

Trucks arrive at a warehouse at a rate of 15 per hour during business hours Crew can unload at a rate of 5 per hour. Crew wage rates have increased and Crew size is to be determined. Crew cost is Rs 100/hour, while driver cost is Rs 120 per hour. Thus /u = 15/5 = 3. Values of Lq are as per calculations for given s and /u

Crew Size (s)

Service Cost Rs 100 x s

Avg No in System L = Lq + /u
1.528 + 3 = 4.528 0.354 + 3 = 3.354 0.099 + 3 = 3.099 0.028 + 3 = 3.028

Waiting Cost = L x Rs 120/-

Total Cost = Service Cost + Waiting Cost


Rs 943.26

Rs 400

4.528 x 120 = Rs 543.26 3.354 x 120 = Rs 402.58 3.099 x 120 = Rs 371.88 3.028 x 120 = Rs 363.36

Rs 500

Rs 902.58 (minimum) Rs 971.88

Rs 600

Rs 700

Rs 1063.36

Other Queuing Models


Poisson Arrival Rate with any service Distribution Poisson Arrival Rate and Constant Service Time Finite Queue Length Finite Calling Population Multiple Server, Priority Servicing Model

M/G/1 (single Server)


M/D/1 (single server, Deterministic service time

Basic Single Channel (M/G/1) Model


M/M/1 = Markovian (Poisson) arrivals, General service distribution, and 1 (single) server One server or channel A Poisson arrival rate Service time follows any distribution Estimate of variance is necessary First-come, First-served processing order An infinite calling population No limit on queue length

M/G/1 Poisson Arrival rate with any Service Distribution

Performance Measure System Utilization Average number waiting in line Average number in System Average time waiting in line Average time in the system
p Lq L

Formula
/su (where s = 1) ((/u)2 + 2v )/2(1-/u) where v = variance Lq + /u Lq / Wq + 1/u

Wq W

Problem Any Service Distribution


Customer arrival rate is Poisson = 0.25/min Service time has mean = 2 min (u = = 0.5) and standard deviation = 0.9 min (variance = 0.81). Compute performance measures

M/G/1 Poisson Arrival rate with any Service Distribution

Performance Measure System Utilization Average number waiting in line Average number in System Average time waiting in line Average time in the system
p Lq

Formula
/su (where s = 1) = 0.25/0.50 = 0.50 ((/u)2 + 2v )/2(1-/u) where v = variance = (0.25/0.50)2 + 0,252(0.81)/2(1-(0.25/0.5)) = 0.301 customers Lq + /u = 0.301 + 0.5 = 0.801 customers Lq / = 0.301/0.25 = 1.203 min Wq + 1/u = 1.203 + 1/0.5 = 3.203 min

Wq W

Basic Single Channel (M/D/1) Model


M/M/1 = Markovian (Poisson) arrivals, Constant Service time, and 1 (single) server One server or channel A Poisson arrival rate Service time is constant Variance = zero First-come, First-served processing order An infinite calling population No limit on queue length

M/D/1 Poisson Arrival rate with Constant Service Time

Performance Measure

Formula
p
Lq L

System Utilization
Average number waiting in line Average number in System Average time waiting in line Average time in the system

/su (where s = 1)
(/u)2/2(1-/u) = ()2/2u(u-) Lq + /u Lq / Wq + 1/u

Wq W

Problem Constant Service Time


Customer arrival rate is Poisson = 12/hour Service time has mean = 2 min (u = = 0.5) and standard deviation = 0.9 min (variance = 0.81). Compute performance measures

M/G/1 Poisson Arrival rate with Constant Service Time

Performance Measure

Formula
p
Lq L

System Utilization
Average number waiting in line Average number in System Average time waiting in line Average time in the system

/su (where s = 1) = 12/20 = 0.60


2/2u(u-) = 122/2(20)(20-12) = 0.45 customer Lq + /u = 0.45 + 0.6 = 1.05 customers Lq / = 0.45/12 = 0.0375 hour = 2.25 min Wq + 1/u = 2.25 + 60(1/20) = 5.25 min

Wq W

Basic Single Channel with Finite Queue Length Model


M/M/1 = Markovian (Poisson) arrivals, Markovian Exponential Distribution Service time, and 1 (single) server One server or channel A Poisson arrival rate Exponential Distribution Service rate Limit on Maximum length of Queue First-come, First-served processing order An infinite calling population New customers not allowed when queue is maximum (parking lots)

Basic Single Server System M/M/1


Performance Measure
System utilization Average number in line

Notation p Lq
L

Formulae /u L (1-P0)
(/u)/(1- /u) (m+1)(/u)m+1/(1- (/u)m+1)

Average number in system

Average time in System

W
Wq P0 Pn

Lq /((1-Pm)) + 1/u
W - 1/u (1 - /u)/(1-(/u)m+1)where m = max length of queue P0(/u)n

Average time in Line

Probability of Zero units in System Probability of n units in System

Problem Finite Length


Arrival rate = 9 per hour Service rate = 15 per hour Max length of Queue = 5 customers Calculate performance measures

Basic Single Server System M/M/1 with Finite Queue Length


Performance Measure
System utilization Average number in line

Notation
p Lq L

Formulae
/u = 9/15 = 0.60 L (1-P0) = 1.206 (1-0.420) = 0.63 (/u)/(1- /u) (m+1)(/u)m+1/(1- (/u)m+1) = 0.6/(1-0.6) (5+1)(0.6)5+1)/(1-0.65+1) = 1.206 Lq /((1-Pm)) + 1/u = 0.63/(9(1 0.033)) + 1/15 = 0.139 hr W - 1/u = 0.139 1/15 = 0. 072 hour (1 - /u)/(1-(/u)m+1) = (1-0.6)/(1-0.65+1) = 0.420

Average number in system

Average time in System

Average time in Line

Wq P0

Probability of Zero units in System

Probability of n units in System

Pn
m

P0(/u)n = 0.420(0.6)5 = 0.033


Given = 5

Maximum length of Queue

Basic Single Channel with Finite Calling Population Model


M/M/1 = Markovian (Poisson) arrivals, Markovian Exponential Distribution Service time, and 1 (single) server One server or channel A Poisson arrival rate Exponential Distribution Service rate First-come, First-served processing order A Finite calling population Machine Operator responsible for loading and unloading five machines

You might also like