Chapter 9 Queuing Models 1 9.1 Introduction • Queuing is the study of waiting lines, or queues. • The objective of queuing analysis is to design systems that enable organizations to perform optimally according to some criterion. • Possible Criteria – Maximum Profits. – Desired Service Level. 2 9.1 Introduction • Analyzing queuing systems requires a clear understanding of the appropriate service measurement. • Possible service measurements – Average time a customer spends in line. – Average length of the waiting line. – The probability that an arriving customer must wait for service. 3 9.2 Elements of the Queuing Process • A queuing system consists of three basic components: – Arrivals: Customers arrive 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. 4 The Arrival Process • There are two possible types of arrival processes – Deterministic arrival process. – Random arrival process. • The random process is more common in businesses. 5 The Arrival Process • Under three conditions the arrivals can be modeled as a Poisson process – Orderliness : one customer, at most, will arrive during any time interval. – Stationarity : for a given time frame, the probability of arrivals within a certain time interval is the same for all time intervals of equal length. – Independence : the arrival of one customer has no influence on the arrival of another. 6 The Poisson Arrival Process ke- lt (lt) P(X = k) = k! Where l = mean arrival rate per time unit. t = the length of the interval. e = 2.7182818 (the base of the natural logarithm). k! = k (k -1) (k -2) (k -3) … (3) (2) (1). 7 HANK’s HARDWARE – Arrival Process • Customers arrive at Hank’s Hardware according to a Poisson distribution. • Between 8:00 and 9:00 A.M. an average of 6 customers arrive at the store. • What is the probability that k customers will arrive between 8:00 and 8:30 in the morning (k = 0, 1, 2,…)? 8 HANK’s HARDWARE – An illustration of the Poisson distribution. • Input to the Poisson distribution l = 6 customers per hour. t = 0.5 hour. lt = (6)(0.5) = 3. 0 1 2 3 4 5 6 7 8 10k23 (lt) e P(X = 01k23 )= k2! 1! 0! 3!! lt = 0.224042 0.149361 0.049787 0.224042 9 HANK’s HARDWARE – Using Excel for the Poisson probabilities • Solution – We can use the POISSON function in Excel to determine Poisson probabilities. – Point probability: P(X = k) = ? • Use Poisson(k, lt, FALSE) • Example: P(X = 0; lt = 3) = POISSON(0, 1.5, FALSE) – Cumulative probability: P(Xk) = ? • Example: P(X3; lt = 3) = Poisson(3, 1.5, TRUE) 10 HANK’s HARDWARE – Excel Poisson 11 The Waiting Line Characteristics • Factors that influence the modeling of queues – Line configuration – Priority – Jockeying – Tandem Queues – Balking – Homogeneity 12 Line Configuration • A single service queue. • Multiple service queue with single waiting line. • Multiple service queue with multiple waiting lines. • Tandem queue (multistage service system). 13 Jockeying and Balking • Jockeying occurs when customers switch lines once they perceived that another line is moving faster. • Balking occurs if customers avoid joining the line when they perceive the line to be too long. 14 Priority Rules • These rules select the next customer for service. • There are several commonly used rules: – – – – First come first served (FCFS). Last come first served (LCFS). Estimated service time. Random selection of customers for service. 15 Tandem Queues • These are multi-server systems. • A customer needs to visit several service stations (usually in a distinct order) to complete the service process. • Examples – Patients in an emergency room. – Passengers prepare for the next flight. 16 Homogeneity • A homogeneous customer population is one in which customers require essentially the same type of service. • A non-homogeneous customer population is one in which customers can be categorized according to: – Different arrival patterns – Different service treatments. 17 The Service Process • In most business situations, service time varies widely among customers. • When service time varies, it is treated as a random variable. • The exponential probability distribution is used sometimes to model customer service time. 18 The Exponential Service Time Distribution f(t) = me-mt m = the average number of customers who can be served per time period. Therefore, 1/m = the mean service time. The probability that the service time X is less than some “t.” P(X t) = 1 - e-mt 19 Schematic illustration of the exponential distribution The probability that service is completed within t time units P(X t) = 1 - e-mt X=t 20 HANK’s HARDWARE – Service time • Hank’s estimates the average service time to be 1/m = 4 minutes per customer. • Service time follows an exponential distribution. • What is the probability that it will take less than 3 minutes to serve the next customer? 21 Using Excel for the Exponential Probabilities • We can use the EXPDIST function in Excel to determine exponential probabilities. • Probability density: f(t) = ? – Use EXPONDIST(t, m, FALSE) • Cumulative probability: P(Xk) = ? – Use EXPONDIST(t, m, TRUE) 22 HANK’s HARDWARE – Using Excel for the Exponential Probabilities • The mean number of customers served per minute is ¼ = ¼(60) = 15 customers per hour. • P(X < .05 hours) = 1 – e-(15)(.05) = ? 3 minutes = .05 hours • From Excel we have: – EXPONDIST(.05,15,TRUE) = .5276 23 HANK’s HARDWARE – Using Excel for the Exponential Probabilities =EXPONDIST(B4,B3,TRUE) f(t) Exponential Distribution for Mu = 15 16.000 14.000 12.000 10.000 8.000 6.000 4.000 2.000 0.000 0.000 0.075 0.150 0.225 0.300 0.375 t =EXPONDIST(A10,$B$3,FALSE) Drag to B11:B26 24 The Exponential Distribution Characteristics • The memoryless property. – No additional information about the time left for the completion of a service, is gained by recording the time elapsed since the service started. – For Hank’s, the probability of completing a service within the next 3 minutes is (0.52763) independent of how long the customer has been served already. • The Exponential and the Poisson distributions are related to one another. – If customer arrivals follow a Poisson distribution with mean rate l, their interarrival times are exponentially distributed with mean time 25 1/l. 9.3 Performance Measures of Queuing System • Performance can be measured by focusing on: – Customers in queue. – Customers in the system. • Performance is measured for a system in steady state. 26 9.3 Performance Measures of Queuing System • The transient period occurs at the initial time of operation. • Initial transient behavior is not indicative of long run performance. n Roughly, this is a transient period… Time 27 9.3 Performance Measures of Queuing System • The steady state period follows the transient period. • Meaningful long run performance measures can be calculated for the system when in steady state. n Roughly, this is a transient period… This is a steady state period……….. Time 28 9.3 Performance Measures of Queuing System In order to achieve steady state, the effective arrival rate must be less than the sum of the effective service rates . k servers l< m For one server l< m1 +m2+…+mk For k servers with service rates mi l< km Each with service rate of m 29 Example : • Suppose – customers arrrive at the rate of l=20 per hour – there are 3 servers, each serving an average of 4 customers per hour • You will – serve an average of 12 customers per hour – add 8 customers each hour to your waiting line 30 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 for each server (the percentage of time that each server is busy). 31 Little’s Formulas • Little’s Formulas represent important relationships between L, Lq, W, and Wq. • These formulas apply to systems that meet the following conditions: – Single queue systems, – Customers arrive at a finite arrival rate l, and – The system operates under a steady state condition. L=lW Lq = l Wq For the case of an infinite population L = Lq + l/m 32 Classification of Queues • Queuing system can be classified by: – – – – – Arrival process. Service process. Number of servers. System size (infinite/finite waiting line). Population size. Example: M / M / 6 / 10 / 20 • Notation – M (Markovian) = Poisson arrivals or exponential service time. – D (Deterministic) = Constant arrival rate or service time. – G (General) = General probability for arrivals or service time. 33 9.4 M/M/1 Queuing System Assumptions – Poisson arrival process. – Exponential service time distribution. – A single server. – Potentially infinite queue. – An infinite population. 34 M / M /1 Queue - Performance Measures P0 = 1 – (l/m) Pn = [1 – (l/m)](l/m)n L = l /(m – l) Lq = l2 /[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 35 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. 36 MARY’s SHOES - Solution – Input l = 1/12 customers per minute = 60/12 = 5 per hour. m = 1/ 8 customers per minute = 60/ 8 = 7.5 per hour. – Performance Calculations m –l = 7.5 – 5 = 2.5 per hr. P0 = 1 - (l/m) = 1 - (5/7.5) = 0.3333 P(X<10min) = 1 – e-2.5(10/60) n n Pn = [1 - (l/m)](l/m) = (0.3333)(0.6667) = .565 L = l/(m - l) = 2 Pw = l/m = 0.6667 2 Lq = l /[m(m - l)] = 1.3333 r = l/m = 0.6667 W = 1/(m - l) = 0.4 hours = 24 minutes Wq = l/[m(m - l)] = 0.26667 hours = 16 minutes 37 • Why is L - Lq = 0.6667 and not 1 ? – 1/3 of the time : no customers are present and thus you serve 0 customer – 2/3 of the time : one or more customers are present and you serve 1 customer – the weighted average number of customers being served is : 0.3333 x (0) + 0.6667 x (1) = 0.6667 38 Relationship between System and Queue Performance measures Average time in system = Average time in queue+ Average service time W = Wq +1/ m 24 = 16 + 8 minutes 39 Relationship between System and Queue Performance measures Average number of customers in system = Average number of customers in queue + Average number of customers being served L = Lq +l/ m 2 = 1.3333 + (5/7.5) 40 • Customer waiting time in the system follows an exponential distribution with an average rate of ( m -l) = 7.5 - 5 = 2.5 per hour • The probability that a customer will wait less than 10 or 20 minutes is : P<10 min = 1 - e- 2.5 X (10/60) = 0.341 P<20 min = 1 - e- 2.5 X (20/60) = 0.565 41 • If µ would be 9 per hour, customer waiting time in the system would follow an exponential distribution with an new average rate of ( m -l) = 9 - 5 = 4 per hour • The probability that a customer will wait less than 10 or 20 minutes is : P<10 min = 1 - e- 4 X P<20 min = 1 - e- 4 X (10/60) = 0.487 (20/60) = 0.736 42 m WINQSB Input Screen l 43 Performance Measurements Performance Measurements Performance Measurements Performance Measurements Performance Measurements 44 45 12.5 M/M/k Queuing Systems • Characteristics – Customers arrive according to a Poisson process at a mean rate l. – Service times follow an exponential distribution. – There are k servers, each of who works at a rate of m customers (with km> l). – Infinite population, and possibly infinite line. 46 M / M /k Queue - Performance Measures P0 = Pn = Pn = 1 1l 1 l km + m m n= 0 n ! k! km l n k 1 l m n! n l m k !k n k k P0 for n k. P0 for n > k. n 47 M / M /k Queue - Performance Measures k l m m 1 W= P + 2 0 m (k 1) !(km l) 1 l km Pw = P0 m k! km l k l r= km The performance measurements L, Lq, Wq,, can be obtained from Little’s formulas. 48 LITTLE TOWN POST OFFICE • Little Town post office is open 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 distributions describe the arrival and the service processes respectively. 49 LITTLE TOWN POST OFFICE • The Postmaster needs to know the relevant service measures in order to: – Evaluate the current service level. – Study the effects of reducing the staff by one clerk. 50 LITTLE TOWN POST OFFICE - 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. 51 LITTLE TOWN POST OFFICE – solution continued • First P0 is found by P0 = 1 n 3 1 100 1 100 3( 40) + 3! 40 3( 40) 100 n= 0 n! 40 1 = = .045 6.25 1 + 2.5 + + 15.625 2 2 • P0 is used now to determine all the other performance measures. 52 LITTLE TOWN POST OFFICE – Spreadsheet Solution M/M/k Queuing Model INPUTS Lambda = Mu = OUTPUTS # Servers 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Value 100 40 INPUTS Server Cost = Goodwill Cost When Waiting = Goodwill Cost While Being Served = Value L Lq W Wq Pw Rho Cost 6.011236 3.033095 2.630371 2.533889 2.50858 2.502053 2.50046 2.500096 2.500019 2.500003 2.500001 2.5 2.5 3.511236 0.533095 0.130371 0.033889 0.00858 0.002053 0.00046 9.59E-05 1.87E-05 3.4E-06 5.79E-07 9.28E-08 1.4E-08 0.060112 0.030331 0.026304 0.025339 0.025086 0.025021 0.025005 0.025001 0.025 0.025 0.025 0.025 0.025 0.035112 0.005331 0.001304 0.000339 8.58E-05 2.05E-05 4.6E-06 9.59E-07 1.87E-07 3.4E-08 5.79E-09 9.28E-10 1.4E-10 0.702247 0.319857 0.130371 0.047445 0.015443 0.004517 0.001195 0.000288 6.34E-05 1.29E-05 2.43E-06 4.27E-07 7.02E-08 0.833333 0.625 0.5 0.416667 0.357143 0.3125 0.277778 0.25 0.227273 0.208333 0.192308 0.178571 0.166667 0 0 0 0 0 0 0 0 0 0 0 0 0 Probabiility of n Customers in the System where n = 0 1 0.044944 0.073695 0.0801 0.08162 0.08198 0.082063 0.082081 0.082084 0.082085 0.082085 0.082085 0.082085 0.082085 0.11236 0.184237 0.20025 0.204051 0.204951 0.205157 0.205201 0.20521 0.205212 0.205212 0.205212 0.205212 0.205212 2 0.140449 0.230297 0.250313 0.255063 0.256189 0.256446 0.256502 0.256513 0.256515 0.256516 0.256516 0.256516 53 0.256516 9.6 M/G/1 Queuing System • Assumptions – 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. 54 • Pollaczek - Khintchine Formula for L l (l) + m 2 L= 2 1 l m 2 l + m With = standard deviation of the service time Note: It is not necessary to know the particular service time distribution. Only the mean and standard deviation of the distribution are needed. 55 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. 56 TED’S TV REPAIR SHOP 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. 57 TED’S TV REPAIR SHOP - Solution • This is an M/G/1 system (service time is not exponential (note that 1/m). • Input – The current system (without the new equipment) l = 1/ 2.5 = 0.4 customers per hour. m = 1/ 2.25 = 0.4444 costumers per hour. = 45/ 60 = 0.75 hours. – The new system (with the new equipment) m = 1/2 = 0.5 customers per hour. = 40/ 60 = 0.6667 hours. 58 9.7 M / M / k / F Queuing System • Many times queuing systems have designs that limit their line 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. 59 Characteristics of M/M/k/F Queuing System • 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. 60 M/M/k/F Queuing System – Effective Arrival Rate • • • A customer is blocked if the system is full. The probability that the system is full is PF (100PF% of the arriving customers do not enter the system). The effective arrival rate = the rate of arrivals that make it through into the system (le). le = l(1 - PF) 61 RYAN ROOFING COMPANY • Ryan gets most of its business from customers who call and order service. – 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. 62 RYAN ROOFING COMPANY • Data – Arrival process is Poisson, and service process is Exponential. – Each phone call takes 3 minutes on the average. – 10 customers per hour call the company on the average. – One appointment secretary takes phone calls from 3 telephone lines. 63 RYAN ROOFING COMPANY • 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. 64 RYAN ROOFING COMPANY - Solution M/M/1/4 system • This isM/M/1/5 an M/M/1/system 3 system • Input l = 10 per hour. See spreadsheet next = 20 per (1/3 per P0 = m0.516, P1 =hour 0.258, P2 =minute). 0.129, P3 = 0.065, P4 = 0.032 • Excel spreadsheet gives: P0 = 0.508, PP1 ==0.254, PP2 == 0.133, 0.127,PP3= =0.06 0.063, P4 = 0.032 0.533, 1 3.2% of 0the customers get the3 busy signal P5 = 0.016 Still above the goal of 2% 6.7% of the customers get a busy signal. 1.6% of the customers get the busy signal The goal of 2% has been achieved. This is above the goal of 2%. 65 RYAN ROOFING COMPANY Spreadsheet Solution 66 12.8 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 affects the rate of arrivals of the remaining customers. • Characteristics – A single server. – Exponential service time, Poisson arrival process. – A population size of a (finite) m customers. 67 PACESETTER HOMES • Pacesetter Homes runs four different development projects. • Data – At each site running a project is interrupted once every 20 working days on the average. – The V.P. for construction handles each stoppage. • How long on the average a site is non-operational? – If it takes 2 days on the average to restart a project’s progress (the V.P. is using the current car). – If it takes 1.875 days on the average to restart a project’s progress (the V.P. is using a new car) 68 PACESETTER HOMES – Solution • This is an M/M/1//4 system, where: – The four sites are the four customers. – The V.P. for construction is the server. • Input l = 0.05 m = 0.5 (1/2 days, using the current car) (1/20) m = 0.533 (1/1.875 days, using a new car). 69 PACESETTER HOMES – Solution continued Summary of results Performance Measures Average number of customers in the system Average number of customers in the queue Average number of days a customer is in the system Average number of days a customer is in the queue The probability that an arriving customer will wait Oveall system effective utilization-factor The probability that all servers are idle L Lq W Wq Pw r Po Current New Car Car 0.467 0.113 2.641 0.641 0.353 0.353 0.647 0.435 0.100 2.437 0.562 0.334 0.334 0.666 70 PACESETTER HOMES – Spreadsheet Solution M/M/1//m Queuing Model INPUTS Lambda = Mu = m= Value 0.05 0.53333 4 OUTPUTS # Servers L Lq W Wq Pw Rho 1 0.43451 0.10025 2.43734 0.56233 0.33427 0.33427 Probabiility of n Customers in the System where n = 0 1 2 3 4 0.66573 0.24965 0.07021 0.01317 0.00123 71 9.9 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. 72 WILSON FOODS TALKING TURKEY HOT LINE • Wilson Foods has an 800 number to answer customers’ questions. • If all the customer representatives are busy when a new customer calls, he/she is asked to stay on the line. • A customer stays on the line if the waiting time is not longer than 3 minutes. 73 WILSON FOODS TALKING TURKEY HOT LINE • Data – – – – – On the average 225 calls per hour are received. An average phone call takes 1.5 minutes. How many customer A customer will stay on the line waiting at most 3 minutes. service representatives A customer service representative is paid $16 per hour. be used Wilson paysshould the telephone company $0.18 per minute when the minimize customer is to on hold or whenthe being served. – Customer goodwill is $20 minute while on hold. hourlycost cost of per operation? – Customer goodwill cost while in service is $0.05. 74 WILSON FOODS – Solution • The total hourly cost model Total hourly wages Average hourly goodwill cost for customers on hold TC(K) = Cwk + CtL + gwLq + gs(L - Lq) Total average hourly Telephone charge Average hourly goodwill cost for customers in service TC(K) = Cwk + (Ct + gs)Lq + (Ct + gs)(L – Lq) 75 WILSON FOODS – Solution continued • Input Cw= $16 Ct = $10.80 per hour [0.18(60)] gw= $12 per hour [0.20(60)] gs = $3 per hour [0.05(60)] – The Total Average Hourly Cost = TC(K) = 16K + (10.8+3)L + (12 - 3)Lq = 16K + 13.8L + 9Lq 76 WILSON FOODS – Solution continued • 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). – Excel MMk worksheet was used to generate results for L, Lq, and Wq. 77 WILSON FOODS – Solution continued • Summary of results of the runs for k=6,7,8,9,10 K 6 7 8 9 10 L 18.1255 7.6437 6.2777 5.8661 5.7166 Lq 12.5 2.0187 0.6527 0.2411 0.916 Wq 0.05556 0.00897 0.0029 0.00107 0.00041 TC(K) 458.64 235.65 220.51 227.12 239.70 Conclusion: employ 8 customer service representatives. 78 WILSON FOODS – Spreadsheet Solution M/M/k Queuing Model INPUTS Lambda = Mu = OUTPUTS # Servers 1 2 3 4 5 6 7 8 9 10 11 12 13 Value 225 40 INPUTS Server Cost = Goodwill Cost When Waiting = Goodwill Cost While Being Served = Value 16 22.8 13.8 L Lq W Wq Pw Rho Cost 18.1255 7.643727 6.277703 5.866105 5.716569 5.659381 5.637531 5.629393 12.5005 2.018727 0.652703 0.241105 0.091569 0.034381 0.012531 0.004393 0.080558 0.033972 0.027901 0.026072 0.025407 0.025153 0.025056 0.02502 0.055558 0.008972 0.002901 0.001072 0.000407 0.000153 5.57E-05 1.95E-05 0.833367 0.493467 0.275586 0.144663 0.07122 0.032853 0.014202 0.00576 0.9375 0.803571 0.703125 0.625 0.5625 0.511364 0.46875 0.432692 458.6364 235.652 220.5066 227.1222 239.7128 254.4089 269.9107 285.7252 Probabiility of n Customers in the System where n = 0 1 0.001184 0.002742 0.003291 0.003492 0.003565 0.003592 0.003602 0.003605 0.006659 0.015423 0.018514 0.019641 0.020056 0.020206 0.02026 0.020278 2 0.01873 0.043376 0.05207 0.055241 0.056407 0.056831 0.056981 0.057032 79 HARGROVE HOSPITAL MATERNITY WARD • Hargrove Hospital is experiencing cutbacks, and is trying to reorganize operations to reduce operating costs. • There is a trade off between – the costs of operating more birthing stations and – the costs of rescheduling surgeries in the surgery room when women give birth there, if all the birthing stations are occupied. • The hospital wants to determine the optimal number of birthing stations that will minimize operating costs. 80 HARGROVE HOSPITAL MATERNITY WARD • Data – – – – Cutting one birthing station saves $25,000 per year. Building a birthing station costs $30,000. Maternity in the surgery room costs $400 per hour. Six women on the average need a birthing station a day. The arrival process is Poisson. – Every birthing process occupies a birthing station for two hours on the average. 81 HARGROVE HOSPITAL • Solution • Analysis of the current situation – Currently there are two birthing stations – The current problem can be modeled as a M/G/2/2 queuing system. – Using the MGkk Excel worksheet with l = 6 and m = 12/day we have: • • • • • r = .23077 W = .0833 days Pw = .076923 L = .46154 P0 = .6154 7.7% of the arriving women are sent to the surgery room to give birth. 82 HARGROVE HOSPITAL • Solution – continued • The birthing stations problem can be modeled as a M/G/k/k queuing model. • Input – l = 6 women per day; m = 12 women per day (24/2); – k = the number of birthing stations used • The total cost for the hospital is TC(k) = Cost of using the surgery room for maternity + Additional cost of operating k stations 83 HARGROVE HOSPITAL • Solution – continued • Average daily cost of using the surgery room for maternity: Pk(l)(average time in the surgery room)(hourly cost) • Average additional daily cost of operating k stations 25,000/365 = $68.49 per day. • Average daily total cost TC(k) = Pk(l)(24/m)(Hourly cost) + 68.49k = Pk(6)(24/12)(400) + 68.49k = 4800Pk + 68.49k 84 HARGROVE HOSPITAL - Solution • From repeated runs of the MGkk worksheet to determine Pk we got the following results: Current Optimal k Pk $4800Pk Additional Cost of stations 1 2 3 4 .333333 .076923 .012658 .001580 $1,600 369.23 60.76 7.58 $ – 68.49 0 82.19 163.38 Total net average Daily cost $1,531.51 364.23 142.95 171.96 85 HARGROVE HOSPITAL – Spreadsheet Solution M/G/k/k Queuing Model INPUTS Lambda = Mu = k= OUTPUTS # Servers L 2 0.461538 Value 6 12 2 Lq 0 W 0.083333 Wq 0 Pw Rho 0.076923 0.230769 Probabiility of n Customers in the System where n = 0 1 2 0.615385 0.307692 0.076923 3 86 9.10 Tandem Queuing Systems • In a Tandem Queuing System a customer must visit several different servers before service is completed. Meats Beverage • Examples – All-You-Can-Eat restaurant 87 9.10 Tandem Queuing Systems • In a Tandem Queuing System a customer must visit several different servers before service is completed. Meats Beverage • Examples – All-You-Can-Eat restaurant 88 9.10 Tandem Queuing Systems • In a Tandem Queuing System a customer must visit several different servers before service is completed. Meats Beverage • Examples – All-You-Can-Eat restaurant – A drive-in restaurant, where first you place your order, then pay and receive it in the next window. – A multiple stage assembly line. 89 9.10 Tandem Queuing Systems • 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 at the individual stations 90 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. 91 BIG BOYS SOUND, INC. • 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 waits 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 at all the service stations. • Poisson arrival with a rate of 40 customers an hour. 92 BIG BOYS SOUND, INC. 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? 93 BIG BOYS SOUND, INC. – Solution • This is a Three Station Tandem Queuing System (.75)(40)=30 Sales Clerks M/M/8 Pickup desk M/M/2 Cashiers M/M/3 W3 = 2.67 minutes W1 = 14 minutes W2 = 3.47 minutes Total = 20.14 minutes. 94 Appendix : Assembly Line Balancing • An Assembly Line can be thought of as a tandem queue, because a product visits several workstations in a given sequence. • In a balanced assembly line the time spent in each of the different workstations is about the same. • The objective is to maximize production throughput by allocating tasks to workstations 95 McMURRAY MACHINE COMPANY • McMurray manufactures lawn mowers and snow blowers. • The assembly operation of a certain mower consists of four workstations. • The longest time spent at a workstation is 4 minutes. Thus, the maximum number of mowers that can be produced is 15 per hour. • Management would like to increase productivity by better 96 balancing the assembly line. • Data Station 1 2 3 4 Average Operations Time (min) Stamp mower body and handle; attach control bar to handle 2 Mount engine unit to body; attach backstop; blade; wheel; …. 4 Attach mower handle, control bar, cables, grass bag colar 3 Connect control bar; insert spark plug; quality inspection; packaging 3 • The entire operation takes 12 minutes • Workstation 2 is a bottleneck. 97 SOLUTION • Various options to balance the assembly line – Try to schedule operations to take a total of three minutes in each station . – Assign workers to workstations as needed to balance the station outputs. – Assign multiple workstations to perform the operations. 98 Work Station 1 Work Station 2 Work Station 3 Work Station 4 Work flow Workers Product 99 – Use Integer and Dynamic Programming optimization techniques, to minimize the total amount of idle time at all workstations. – Use an heuristic techniques such as “The Ranked Position Weight Technique,” to find the smallest number of workstations needed to meet a prespecified cycle time. • (Although a heuristic solution does not guarantee optimality, this heuristic was found optimal in large number of applications.) 100 – The Ranked Position Weight technique 1. For each task, find the total job time for all tasks for which that task is a predecessor. 2. Rank the jobs in descending order of these total times. 3. Consider workstation 1 the current workstation. 4. Assign the lowest ranked task to the current station provided the following conditions are met – The task is not already assigned. – The time at the current workstation (with the new task added) will not exceed the desired cycle time. 5. If the second condition in step 4 is not met, designate a new station as a current station, and assign the task there. 6. Repeat step 4 until all tasks have been assigned to workstations. 101 McMURRAY - continued • Demand for the mower increased, and as a result the needed cycle time drops to 3 minutes in the assembly line. • McMurray would like to balance the line using the smallest number of workstations. 102 • Data Tasks Required to Manufacture a Lawn Mower Tasks A--Stamp out mower body B--Stamp out mower handle C--Bolt engine to mower body D--Attach back stop to mower body E--Attach left wheels and handle latch F--Attach right wheels and handle latch G--Attach grass bag collar H--Attach blade I--Attach throttle cable to engine J--Attach control bar cable to engine K--Insert spark club L--Attach control bar to handle M--Attach handle to mower N--Attach throttle cable to handle 0--Attach control bar cable to control bar P--Test mower Q--Pack mower Must Follow Job None None A A C C E C F, G I H B L M None D, J, K, O P Job Time 40 50 55 30 65 65 30 25 35 50 20 30 20 50 45 50103 60 SOLUTION Tasks Time A--Stamp… 40 B--Stamp… 50 C--Bolt … 55 D--Attach … 30 E--Attach… 65 F--Attach… 65 G--Attach… 30 H--Attach… 25 I--Attach… 35 J--Attach… 50 K--Insert… 20 L--Attach… 30 M--Attach… 20 N--Attach… 50 0--Attach… 45 P--Test… 50 Q--Pack… 60 Remaining tasks C,D,E,F,G,H,I,J,K,P,Q L,M,N,O,P,Q E,F,G,H,I,J,KP,Q P,Q G,I,J,P,Q I,J,P,Q I,J,P,Q K,P,Q J,P,Q P,Q P,Q M,N,P,O,Q N,O,P,Q O,P,Q P,Q Q None Total Time 525 305 455 140 290 260 225 155 195 160 130 255 225 205 155 110 60 Rank 1 3 2 14 4 5 6.5 12.5 10 11 15 6.5 8 9 12.5 16 17 104 • Step 1 and 2 Tasks sorted by ranks Tasks Time A--Stamp… 40 B--Stamp… 50 C--Bolt … 55 D--Attach … 30 E--Attach… 65 F--Attach… 65 G--Attach… 30 H--Attach… 25 I--Attach… 35 J--Attach… 50 K--Insert… 20 L--Attach… 30 M--Attach… 20 N--Attach… 50 0--Attach… 45 P--Test… 50 Q--Pack… 60 Remaining tasks C,D,E,F,G,H,I,J,K,P,Q L,M,N,O,P,Q E,F,G,H,I,J,KP,Q P,Q G,I,J,P,Q I,J,P,Q I,J,P,Q K,P,Q J,P,Q P,Q P,Q M,N,P,O,Q N,O,P,Q O,P,Q P,Q Q None Total Time 525 305 455 140 290 260 225 155 195 160 130 255 225 205 155 110 60 Rank 1 3 2 14 4 5 6.5 12.5 10 11 15 6.5 8 9 12.5 16 17 105 • Step 3 and 4 Workstation 1 1 1 1 2 Rank 1 2 3 4 4 And so on…. Task Time Total time A 40 40 95 ActualC cycle time 55 = 170. B be reduced 50 to 160, 145 This can E 65 210 by moving “K” from E 65 station 4 65 to station 5. Idle Time 140 85 35 Negative 115 Workstation Assignment for Lawn Mower Production Workstation 1 2 3 4 5 Tasks A,B,C E,F,G I,L,M,N D,H,J,K P,Q Total Time 145 160 135 170 110 Idle Time 35 20 45 10 70 106