Queuing Models Part 1: Basics Lecture 9
Components of a Queuing Theory Arrivals: Costumers arrive at a system according to some arrival pattern. Waiting in a Queue: Arriving customers may have to wait in one or more queues for service. Service: Customers receive service and leave the system. http://www.baskent.edu.tr/~kilter
Customers waits in queue The Queuing System Customer completes service and leaves Customers arrives Server Customers waits in queue Customer Service http://www.baskent.edu.tr/~kilter
The Arrival Process 1. Deterministic arrival process 2. Random process Poisson distribution http://www.baskent.edu.tr/~kilter
Conditions for a Poisson Arrival Process Orderliness – In any time instant, at most one customer will arrive at the service facility. Stationary – For a given time frame, the probability that a customer will arrive within a certain time interval is the same for all time intervals of equal length. Independence – Customers arrive independently of one another; that is, an arrival during a given time interval does not affect the probability of an arrival during other time intervals. http://www.baskent.edu.tr/~kilter
Poisson Arrival Distribution Probability of k arrivals within time t l = the mean arrival rate per time unit t = the length of the time interval e = 2.7182818 (the base of the natural logarithm) k! = k (k-1) (k-2) (k-3) . . . (3) (2) (1) http://www.baskent.edu.tr/~kilter
Example - Hank’s Hardware Customers arrive according to Poisson Distribution Tuesday 8:00-9:00 = 6 (average ) 8:00-8:30 = ? http://www.baskent.edu.tr/~kilter
Example - Hank’s Hardware l = 6 per hour t = 30 minutes = 0.5 hour l t = 6(0.5) = 3 http://www.baskent.edu.tr/~kilter
Example - Hank’s Hardware P(X=0) = 30 e-3 / 0! = e-3 = 0.049787 P(X=1) = 31 e-3 / 1! = 3e-3 = 0.149361 P(X=2) = 32 e-3 / 2! = 9e-3/2 = 0.224042 P(X=3) = 33 e-3 / 3! = 27e-3/6 = 0.224042 P(X=4) = 34 e-3 / 4! = 81e-3 /24= 0.168031 1 - 0.049787 - 0.149361 = 0.800852 (~80.1 %) http://www.baskent.edu.tr/~kilter
The Waiting Line Server Customer Line configuration (one long line or several smaller ones) A B C D Server Customer http://www.baskent.edu.tr/~kilter
The Waiting Line Jockeying (line switching among customers) Server A Server B Server A Server B http://www.baskent.edu.tr/~kilter
The Waiting Line Balking (not joining the queue if it is too long) http://www.baskent.edu.tr/~kilter
The Waiting Line First come, first served (FCFS) Priority (the service order of customers) First come, first served (FCFS) Last come, first served (LCFS) Random come, random served http://www.baskent.edu.tr/~kilter
The Waiting Line Tandem queues (if second service is required) http://www.baskent.edu.tr/~kilter
The Waiting Line Homogenity (all customers require the same service) http://www.baskent.edu.tr/~kilter
The Service Process 1.Deterministic service process 2.Random service process Exponential Probability Distribution http://www.baskent.edu.tr/~kilter
Exponential Service Time Distribution m = mean service rate (the average number of customers who can be served per time period) 1 / m = average service time Probability service will be completed within time t http://www.baskent.edu.tr/~kilter
Example - Hank’s Hardware Service time = 4 minutes Exponential distribution probability of service time < 3 minutes? http://www.baskent.edu.tr/~kilter
Example - Hank’s Hardware Average service time= 1/m = 4 minutes Average service rate = m = 1/4 per minute Probability that a service will take less than 3 minutes = 3/60 = 0.05 hour: P(X<0.05) = 1 - e-15 x 0.05 = 1 - e-0.75 = 1- 0.47237 = 0.52763 http://www.baskent.edu.tr/~kilter
Memoryless property of the Exponential Distribution No additional information regarding the probability distribution is gained from observing the service time already expended. http://www.baskent.edu.tr/~kilter
Summary of Formulas http://www.baskent.edu.tr/~kilter
Transient and Steady State Periods Transient period: Initial system behaviour is nor representative of long-run performance. Steady state period: The long-run probabilities of there being 0, 1, 2, 3, or in general n customers in the system remain constant over time. # of customers time http://www.baskent.edu.tr/~kilter
Requirement to Achieve Steady State System Requirement One server l < m k servers, different service rates l < m1+ m2+.. +mk k servers, same service rate l < k m http://www.baskent.edu.tr/~kilter
Steady State Performance Measures P0: Probability that there are no customers in the system Pn: Probability that there are n customers in the system L: Average number of customers in the system Lq: Average number of customers in the queue W: Average time a customer spends in the system Wq: Average time a customer spends in the queue Pw: Probability that an arriving customer must wait for service r : Utilization rate of each server (the percentage of time that each server is busy) http://www.baskent.edu.tr/~kilter
Little’s Formulas L = l W Lq = l Wq L = Lq + l / m http://www.baskent.edu.tr/~kilter
Queuing System Notation Arrival Process / Service Process / Number of Services M Markovian D Deterministic G General M / D / 5 M / D / 5 / 10 / 20 http://www.baskent.edu.tr/~kilter
M / M / 1 Queuing Systems Characteristics Poisson arrival process. Exponential service time distribution. A single server. Potentially infinite queue. An infinite population. http://www.baskent.edu.tr/~kilter
The probability that a customer waits in the system more than “t” is Performance Measures P0 = 1- (l / m) Pn = [1 - (l / m)] (l / m)n L = l / (m - l) Lq = l 2 / [m(m - l)] W = 1 / (m - l) Wq = l / [m(m - l)] Pw = l / m r = l / m The probability that a customer waits in the system more than “t” is P(X>t)= e-(m - l)t http://www.baskent.edu.tr/~kilter
Example - Mary’s Shoes Customers arrive at Mary’s Shoes every 12 minutes on the average, according to a Poisson process. Service time is exponentially distributed with an average of 8 minutes per customer. Management is interested in determining the performance measures for this service system. http://www.baskent.edu.tr/~kilter
Example - Solution Pw = l / m = 0.6667 r = l / m = 0.6667 Input l = 1/ 12 customers per minute = 60/ 12 = 5 per hr. m = 1/ 8 customers per minute = 60/ 8 = 7.5 per hr. Performance Calculations P0 = 1- (l / m) = 1 - (5 / 7.5) = 0.3333 Pn = [1 - (l / m)] (l/ m) = (0.3333)(0.6667)n L = l / (m - l) = 2 Lq = l2/ [m(m - l)] = 1.3333 W = 1 / (m - l) = 0.4 hours = 24 minutes Wq = l / [m(m - l)] = 0.26667 hours = 16 minutes Pw = l / m = 0.6667 r = l / m = 0.6667 http://www.baskent.edu.tr/~kilter
http://www.baskent.edu.tr/~kilter
http://www.baskent.edu.tr/~kilter
http://www.baskent.edu.tr/~kilter
http://www.baskent.edu.tr/~kilter
http://www.baskent.edu.tr/~kilter
http://www.baskent.edu.tr/~kilter
Queuing Models Part 2: Models
M / M / k Queuing Systems Characteristics Customers arrive according to a Poisson process at a mean rate l. Service time follow an exponential distribution. There are k servers, each of which works at a rate of m customers. Infinite population, and possibly infinite line. http://www.baskent.edu.tr/~kilter
Performance Measures http://www.baskent.edu.tr/~kilter
The performance measurements L, Lq, Wq,, can be obtained from Little’s formulas. http://www.baskent.edu.tr/~kilter
Example - Little Town Post Office Little Town post office is opened on Saturdays between 9:00 a.m. and 1:00 p.m. Data On the average 100 customers per hour visit the office during that period. Three clerks are on duty. Each service takes 1.5 minutes on the average. Poisson and Exponential distribution describe the arrival and the service processes respectively. The Postmaster needs to know the relevant service measures in order to: Evaluate current service level. Study the effects of reducing the staff by one clerk. http://www.baskent.edu.tr/~kilter
Solution This is an M / M / 3 queuing system. Input l = 100 customers per hour. m = 40 customers per hour (60 / 1.5) Does steady state exist (l < km )? l = 100 < km = 3(40) = 120 http://www.baskent.edu.tr/~kilter
http://www.baskent.edu.tr/~kilter
http://www.baskent.edu.tr/~kilter
http://www.baskent.edu.tr/~kilter
M / G / 1 Queuing Systems Characteristics Customers arrive according to a Poisson process with a mean rate l. Service time has a general distribution with mean rate m. One server. Infinite population, and possibly infinite line. http://www.baskent.edu.tr/~kilter
Pollaczek – Khintchine Formula for L Note: It is not necessary to know the particular service time distribution. Only the mean and standard deviation of the distribution are needed. http://www.baskent.edu.tr/~kilter
Example - Ted’s TV Repair Shop Ted’s repairs television sets and VCRs. Data It takes an average of 2.25 hours to repair a set. Standard deviation of the repair time is 45 minutes. Customers arrive at the shop once every 2.5 hours on the average, according to a Poisson process. Ted works 9 hours a day, and has no help. He considers purchasing a new piece of equipment. New average repair time is expected to be 2 hours. New standard deviation is expected to be 40 minutes. http://www.baskent.edu.tr/~kilter
Ted wants to know the effects of using the new equipment on: 1. The average number of sets waiting for repair; 2. The average time a customer has to wait to get his repaired set. http://www.baskent.edu.tr/~kilter
Solution This is an M / G / 1 system. Input The current system (without the new equipment) l = 1/ 2.5 = 0.4 customers per hour. m = 1/ 2.25 = 0.4444 customers per hour. s = 45/ 60 = 0.75 hours. The new system (with the new equipment) m = 1/2 = 0.5 customers per hour. s = 40/ 60 = 0.6667 hours. http://www.baskent.edu.tr/~kilter
M / M / k / F Queuing Systems Many times queuing systems have designs that limit their size. When the potential queue is large, an infinite queue model gives accurate results, even though the queue might be limited. When the potential queue is small, the limited line must be accounted for in the model. Characteristics Poisson arrival process at mean rate l. k servers, each having an exponential service time with mean rate m. Maximum number of customers that can be present in the system at any one time is “F”. Customers are blocked (and never return) if the system is full. http://www.baskent.edu.tr/~kilter
The Effective Arrival Rate A customer is blocked if the system is full. The probability that the system is full is PF. The effective arrival rate = the rate of arrivals that make it through into the system (le). le = l (1 - PF) http://www.baskent.edu.tr/~kilter
Example - Ryan Roofing Company Ryan gets most of its business from customers who call and order service. Data One appointment secretary takes phone calls from 3 telephone lines. Each phone call takes three minutes on the average. Ten customers per hour call the company on the average. http://www.baskent.edu.tr/~kilter
Arrival process is Poisson, and service process is Exponential. When a telephone line is available but the secretary is busy serving a customer, a new calling customer is willing to wait until the secretary becomes available. When all the lines are busy, a new calling customer gets a busy signal and calls a competitor. Arrival process is Poisson, and service process is Exponential. Management would like to design the following system: The fewest lines necessary. At most 2% of all callers get a busy signal. Management is interested in the following information: The percentage of time the secretary is busy. The average number of customers kept on hold. The average time a customer is kept on hold. The actual percentage of callers who encounter a busy signal. http://www.baskent.edu.tr/~kilter
Solution This is an M / M / 1 / 3 system Input l = 10 per hour. m = 20 per hour (1/ 3 per minute) WINQSB gives: P0 = 0.533, P1 = 0.267, P2 = 0.133, P3 = 0.067 6.7% of the customers get a busy signal. This is above the goal of 2%. http://www.baskent.edu.tr/~kilter
m = 20 per hour (1/ 3 per minute) WINQSB gives: This is an M / M / 1 / 4 system Input l = 10 per hour. m = 20 per hour (1/ 3 per minute) WINQSB gives: P0 = 0.516, P1 = 0.258, P2 = 0.129, P3 = 0.065, P4 = 0.032 3.2 % of the customers get a busy signal. Still above the goal of 2%. http://www.baskent.edu.tr/~kilter
m = 20 per hour (1/ 3 per minute) WINQSB gives: This is an M / M / 1 / 5 system Input l = 10 per hour. m = 20 per hour (1/ 3 per minute) WINQSB gives: P0 = 0.508, P1 = 0.254, P2 = 0.127, P3 = 0.063, P4 = 0.032, P5 = 0.016 1.6 % of the customers get a busy signal. The goal of 2% has been achieved. http://www.baskent.edu.tr/~kilter
With 5 telephone lines, 4 customers can wait in line http://www.baskent.edu.tr/~kilter
http://www.baskent.edu.tr/~kilter
http://www.baskent.edu.tr/~kilter
M / M / 1 / / m Queuing Systems In this system the number of potential customers is finite and relatively small. As a result, the number of customers already in the system effects the rate of arrivals of the remaining customers. Characteristics A single server. Exponential service and interarrival time, Poisson arrival process. A population size of m customers (m is finite). http://www.baskent.edu.tr/~kilter
Example - Pacesetter Homes Pacesetter Homes runs four different development projects. Data A stoppage occurs once every 20 working days on the average in each site. It takes 2 days on the average to solve a problem. Each problem is handled by the V.P. for construction. How long on the average a site does not operate? With 2 days to solve a problem (current situation) With 1.875 days to solve a problem (new situation) http://www.baskent.edu.tr/~kilter
Solution This is an M / M / 1 // 4 system. The four sites are the four customers. The V.P. for construction can be considered a server. Input l = 0.05 (1/ 20) m = 0.5 (1/ 2 using the current car). m = 0.533 (1/1.875 using a new car). http://www.baskent.edu.tr/~kilter
Results Obtained From WinQSB Performance Current New Measures Car Car Oveall system effective utilization-factor r 0.353 0.334 Average number of customers in the system L 0.467 0.435 Average number of customers in the queue Lq 0.113 0.100 Average number of days a customer is in the system W 2.641 2.437 Average number of days a customer is in the queue Wq 0.641 0.562 The probability that all servers are idle Po 0.647 0.666 The probability that an arriving customer will wait Pw 0.353 0.334 http://www.baskent.edu.tr/~kilter
Queuing Models Part 3: Economic Analysis of Queuing Systems
Economic Analysis of Queuing Systems The performance measures previously developed are used next to determine a minimal cost queuing system. The procedure requires estimated costs such as: Hourly cost per server . Customer goodwill cost while waiting in line. Customer goodwill cost while being served. http://www.baskent.edu.tr/~kilter
Example - Wilson Foods Talking Turkey Hot Line Wilson Foods has an 800 number to answer customers’ questions. Data On the average 225 calls per hour are received. An average phone call takes 1.5 minutes. A customer will stay on the line waiting at most 3 minutes. A customer service representative is paid $16 per hour. Wilson pays the telephone company $0.18 per minute when the customer is on hold or when being served. Customer goodwill cost is $0.20 per minute while on hold. Customer goodwill cost while in service is $0.05. How many customer service representatives should be used to minimize the hourly cost of operation?
Solution – The Total Cost Model Total average hourly cost of employing “k” customer service representatives Total average hourly telephone charge Average hourly goodwill cost for customers in service TC(k) = Cwk + CtL + gwLq + gs(L - Lq) Total hourly wages Average hourly goodwill cost for customers on hold TC(k) = Cwk + (Ct + gs) L + (gw – gs) Lq
Input Cw= $16 Ct = $10.80 per hour [0.18(60)] gw= $12 per hour [0.20(60)] gs = $0.05 per hour [0.05(60)] The Total Average Hourly Cost is TC(k) = 16k + (10.8+3)L + (12 - 3)Lq = 16k + 13.8L + 9Lq
Assuming a Poisson arrival process and an Exponential service time, we have an M / M / k system. l = 225 calls per hour m = 40 per hour (60 / 1.5) The minimal possible value for K is 6 to ensure that steady state exists (l < km). WINQSB was used to generate results for L, Lq, and Wq.
Summary of Results of the Runs for k = 6, 7, 8, 9, 10 Lq Wq TC(k) 6 18.1249 12.5 0.05556 458.62 7 7.6437 2.0187 0.00897 235.62 8 6.2777 0.6527 0.0029 220.50 9 5.8661 0.2411 0.00107 227.12 10 5.7166 0.916 0.00041 239.70 Conclusion: Employ 8 customer service representatives.
Tandem Queuing Systems In a tandem queuing system a customer must visit several different servers before service is completed. For cases in which customers arrive according to a Poisson process and service time in each station is Exponential, Total Average Time in the System = Sum of all Average Times in the Individual Stations
Example - Big Boys Sound, Inc. Big Boys sells audio merchandise. The sale process is as follows: A customer places an order with a sales person. The customer goes to the cashier station to pay for the order. After paying, the customer is sent to the pickup desk to obtain the good.
Data for a regular Saturday Personnel. 8 sales persons are on the job. 3 cashiers. 2 workers in the merchandise pickup area. Average service times. Average time a sales person wait on a customer is 10 minutes. Average time required for the payment process is 3 minutes. Average time in the pickup area is 2 minutes. Distributions. Exponential service time in all the service stations. Poisson arrival with a rate of 40 customers an hour. Only 75% of the arriving customers make a purchase. What is the average amount of time, a customer who makes a purchase spends in the store?
Solution M / M / 8 M / M / 3 M / M / 2 l3 = 30 l2 = 30 W3 = 2.67 This is a Three Station Tandem Queuing System M / M / 8 M / M / 3 M / M / 2 l3 = 30 l2 = 30 W3 = 2.67 W2 = 3.47 l1 = 40 W1 = 14 Total = 20.14 minutes