2 Capacity and Resources A key lever for improving patient flow.How do we measure capacity?What is the capacity of a 20 seat restaurant?A 16 bed ward?Capacity is a RATEPatients/dayCustomers/hourWe can view a 16 bed ward as a queuing system with 16 serversWhat is the capacity of a bed?Does this analogy apply to the restaurant?A system is composed of resources with capacities.Often we use the expressions “resource” and “capacity” interchangeably (hopefully without confusion)
3 How Much Capacity is Needed? or How Many Resources are Needed? Surge capacityBase capacity
4 Capacity tradeoffs when demand is variable Too much capacity or too many resources = idlenessNot enough capacity – waitsShould we set capacity equal to demand?What does this mean?This is called a balanced systemIt works perfectly when there is no variation in the systemIt works terribly when there is variation! Why?Once behind, you never can catch up.Queuing theory quantifies these tradeoffs in terms of performance measures.
5 Queuing Models(Mathematical) queuing models help us set capacity (or determine the number of resources needed) to meet:Service level targetsAverage wait time targetsAverage queue length targetsQueuing models provide an alternative to simulationThey provide insights into how to plan, operate and manage a systemWhere are there queues in the health care system?
6 A single server queuing system BufferServerA queue forms in a bufferServers may be people or physical spaceThe buffer may have a finite or unlimited capacityThe most basic models assume “customers” are of one typeand have common arrival and service rates
7 A multiple server queuing system BufferServerServer
8 Several parallel singer server queues BufferServerBufferServerBufferServer
9 Parallel Queues vs. Multiple server Queues Provide examples of multiple server queues (MSQs)Provided examples of parallel queues (PQs)In what situations would each of these queuing systems be most appropriate? Why?
10 Networks of queuesMost health care systems are interconnected networks of queues and servers with multiple waiting points and heterogeneous customers.What examples have we seen in the course?Often we model these complex systems with simulation.But in some cases we can use formulae to get results
11 Queuing Theory background Developed to analyze telephone systems in the 1930’s by Erlang.How many lines are needed to ensure a caller tries to dial and obtains a “line”.Applied to analyze internet traffic, telecommunications systems, call centers, airport security lines, banks and restaurants, rail networks, etc.
12 Queues and Variability There are two components of a queuing system subject to variabilityThe inter-arrival times of “jobs”The service times or LOSWhy are these variable?We describe the variability byMeanStandard deviationProbability distributionUsually the normal distribution doesn’t fit wellOften an exponential distribution fits wellIf we know its rate or mean we know everything about it.
13 The exponential distribution P(T ≤ t) = 1 – e-λtThe quantity λ is the rate.The mean and standard deviation of the exponential distribution is 1/rate (1/λ).Example; Patients arrive at rate 4 per hour.The mean interarrival time is 15 minutes.What is the probability the time between two arrivals is less than 10 minutes (1/6 of an hour)P( T ≤ 1/6) = 1 – e-4∙(1/6) = 1- e-2/3 = = .513.The exponential distribution underlies queuing theory.A queue with exponential service times and exponential inter-arrival times and one (FCFS) server is called an M/M/1 queue.Exponential distributions don’t allow negative times and have a small probability of long service times.
14 Capacity management and queuing systems Capacity management involves determining the number of servers to use and the size of the waiting rooms.ExamplesHow many long term care beds are needed?How many porters are needed?How many nurses are needed?How many cubicles are needed in an ED?Some healthcare systems have no buffers; all the waiting is done outside of the system or upstream.ALC cases waiting for LTC beds
15 Analyzing a queuing system OutputsCapacity UtilizationWait Time in QueueQueue LengthBlocking ProbabilityService LevelsInputsArrival RateService RateNumber of ServersBuffer SizeQueueAnalyzerQUEUMMCK_EMBA.xls
16 Single server queues – some definitions Ri – average inflow rate (customers/time) ()1/Ri – average time between customer arrivalsTp – average processing time by one server1/Tp – average processing rate of a single server ()c – number of serversRp = c/Tp – system service rate (often c=1)K – buffer capacity (often K=)A single server queuing system is stable whenever Rp > RiA single server queuing system is balanced whenever Rp = Ri
17 Examples A Finite Capacity Loss System Model for an (old-fashion) phone systemc serversK=0When all servers are busy, system is blocked and customers are lostPerformance measure – fraction of lost jobs – this is legislated!Walk-in Clinic with 6 seats and 1 doctorc = 1K = 6
18 Characteristics and Performance Measures System characteristicsTraffic Intensity (or utilization) = = arrival rate/service rateSafety Capacity = Rs = Service rate – arrival ratePerformance MeasuresAverage waiting time (in queue) – TiAverage time spent at the server - TpAverage flow time (in process) – T = Ti + TpAverage queue length – IiAverage number of customers being served - IpAverage number of customers in the system – I =Ii + Ip
19 Performance measure formulas (M/M/1 queue – no limit on queue size) System Utilization = P(Server is occupied) = If traffic intensity increases, the likelihood the server is occupied increasesThis occurs if the arrival rate increases or the service rate decreasesP(System is empty) = 1- P(k in system) = k(1- )Average Time in System = 1/ Safety capacityAverage Time in Queue = Average time in system – average service timeIf safety capacity decreases; time in queue increases!Average Number of jobs in the system (including being served) = /(1- )Average Queue Length = 2/(1- )If we know safety capacity, service time and traffic intensity, we can compute all system propertiesLittle’s Law holds toonumber in queue = arrival rate x waiting time in queue
20 An Example - M/M/1 QueueCustomers arrive at rate 4 per hour, mean service time is 10 minutes.Service rate is 6 per hourSystem utilization = Probability the server is occupied = = 2/3.Safety capacity = service rate – arrival rate = 2P(System is empty) = 1- = 1/3.P(k in the system) = k(1- ) = (1/3)(2/3)kAverage Time in system= 1/safety capacity = ½ hourAverage Time in queue = Average time in system – average service time = ½ - 1/6 = 1/3 hourAverage Queue Length = 2/(1- ) = 4/3Suppose arrival rate increases to 5.9 customers per hour.Then =5.9/6 = .9833So P(System is empty) = .0167; Average time in system = 10 hours and Average number of customers in the system = 58.9!
21 About QUEUMMCK.xlsAn M/M/c queue is the same as an M/M/1 queue except that there may be more than one server.In this model, there is a single buffer and c servers in the resource pool.Customers are processed on a FIFO basis.When there are more than c customers in the system, the buffer is occupied and waiting for service occurs.An M/M/c/K queue is an M/M/c queue with a finite buffer of size K.There are at most K + c customers in the system.When the buffer is filled, the system is blocked and customers are lost.QUEUMMCK.xls, which is now called performance.xls, computes performance measures including blocking probabilities for the M/M/c/K queue.
22 Problem 1Patients arrive at rate 5/hr. They require on average 1 hour of treatment.How many service providers do we need to ensure that the average wait time is 30 minutes?Assume a large waiting room.Running QUEUEMMCK.xls we find that with6 service providers - average wait is 1 hour and average number waiting is 2.947 service providers - average wait is ½ hour and average number waiting is .80Note that with 7 service providers all 7 are occupied less than 1% of the time.Thus we tradeoff throughput with capacity utilization
23 Problem 2 – A LTC Facility Bed requests arrive at the rate of 3 per monthPatients remain in beds for about 15 months.How many beds are required so that the average wait for beds is 1 month.Trial and error with queummck shows that 59 beds are required.Also we can see that there is only a 3% chance of waiting and average occupancy is 45 beds.We can also do sensitivity analysis with arrival rates and length of stays
24 Problem 3 A walk in clinic has 3 doctors; Average time spent with a patient is 15 minutesPatients arrive at rate of 12 per hourHow many chairs should we have in the waiting room so only 5% of patients are turned away?Queummck suggests 17.
25 Implications of queuing formulas As the safety capacity vanishes, or equivalently, the traffic intensity increases to 1:waiting time increases without bound!queue lengths become arbitrarily long!In the presence of variability in inter-arrival times and service times, a balanced system will be highly unstable.These formulas enable the manager to derive performance measures on the basis of a few basic descriptors of the queuing systemThe arrival rateThe service rateThe number of serversWhen the system has a finite buffer, the percentage of jobs that are blocked can also be computed
26 Don’t Match Capacity with Demand If service rate is close to arrival rate then there will be long wait times.Recall average queue length = 2/(1- )If traffic intensity near 1, queue length will be very small.No variability – All procedures take exactly the same time, patients are scheduled to appear at the completion of the proceeding procedure and arrive at that time.Safety capacity – Service Rate – Arrival Rate
27 Idle Capacity And Wait Time Targets Theoretical –based on queueing formula.
28 SummaryWhen the manager knows the arrival rate and service rate, he/she can compute:The average number of jobs in the queue.The average time spent in the queue.The probability an arriving patient has to wait.The system utilization.This can be done without simulation!This information can be used to set capacity or explore the sensitivity of recommendations to assumptions or changes.Thus queuing theory provides a powerful tool to manage capacity.