12
document.xls, Instructions, page 1 John O. McClain [email protected] Johnson Graduate School of Management Sage Hall, Cornell University Ithaca NY 14853 This spreadsheet is intended for teaching purposes. manner and change it as you see fit. This model com distributed free of charge. Contents: Descriptions Exponential Service and Interarrival Times The Models customers will not join the queue when that limit permanently lost, but the arrival rate of future c and Arrival Rate < (Number of Servers)(Service This model also allows up to 4 priority classes (n Each of these models is described in more detail bel Steady State, Defined. These models give "Steady State" results. This has For example, you cannot model variations in the ar The outputs are long run averages. For example, if the model gives 9% probability tha you start with no one waiting and watch the system Using the Models ts always go in the yellow cells, like this: Steady State Queuing Models 26 Oct 2007 he worksheets don't seem to work properly, Click Her Models included in this workbook Definition of Steady State Using the Models Models with limited waiting capacity (balking) Models with infinite waiting capacity (no balking) The Finite Queue model assumes that there is a lim Assumptions: Identical Servers, Poisson arrivals, (More) The Infinite Queue model assumes that there is no customers are extremely patient and will wait inde Assumptions: Identical Servers, Poisson arrivals, (More) The probability distributions of arrivals and serv 9% of the time there will be no one waiting. But t

Queue

Embed Size (px)

DESCRIPTION

.

Citation preview

InstructionsSteady State Queuing Models 26 Oct 2007John O. McClain [email protected] Graduate School of ManagementSage Hall, Cornell UniversityIthaca NY 14853This spreadsheet is intended for teaching purposes. You are welcome to use it in anymanner and change it as you see fit. This model comes without any guarantee, and isdistributed free of charge.Note: If the worksheets don't seem to work properly,Click HereContents:DescriptionsModelsModels included in this workbookDefinition of Steady StateUsing the ModelsExponential Service and Interarrival TimesModels with limited waiting capacity (balking)Finite Queue worksheetModels with infinite waiting capacity (no balking)Infinite Queue worksheetThe ModelsThe Finite Queue model assumes that there is a limit to the waiting line, and thatcustomers will not join the queue when that limit is reached. Those customers arepermanently lost, but the arrival rate of future customers is not affected.Assumptions: Identical Servers, Poisson arrivals, Exponential service times.(More)The Infinite Queue model assumes that there is no limit to the waiting line. That is,customers are extremely patient and will wait indefinitely.Assumptions: Identical Servers, Poisson arrivals, Exponential service times,and Arrival Rate < (Number of Servers)(Service Rate capacity per server)This model also allows up to 4 priority classes (non-preemptive).(More)Each of these models is described in more detail below, and examples are worked out.Steady State, Defined.These models give "Steady State" results. This has two important implications:The probability distributions of arrivals and service times do not change with time.For example, you cannot model variations in the arrivals at different times of day.The outputs are long run averages.For example, if the model gives 9% probability that the queue is empty, it means that9% of the time there will be no one waiting. But the 9% does not apply, for example, ifyou start with no one waiting and watch the system for 15 minutes.Using the ModelsYour inputs always go in the yellow cells, like this:Please be careful with your time units. Two of the inputs are rates, and they must have thesame time units. For example, suppose the arrival rate is 4 customers per hour, and theaverage service time is 10 minutes. To be consistent, the service rate must also be givenin customers per hour, which would be 60/10 or 6.For the first 3 models, the results are available immediately, as soon as you enter an input.However for the simulation, once you change the inputs, you must click a button and waitfor the simulation to finish. The program then writes new output on the spreadsheet.Finite Queues (limited waiting line capacity)Assumptions: Identical Servers, Poisson arrivals, Exponential service times.The model also assumes that arrivals cease when the queue is full. This is "balking".Your Inputs: The 4 basic inputs for the finite queuing model are c, K, Ri and Rp.There are c identical servers, and the queue can hold K customers.Therefore the system can hold up to K+c customers (K in queue and c in service).The arrival rate of customers is Ri, and the service rate is Rp for each server.Another input looks like this:Use it to find the probability of a queue exceeding a given length, Q. For example, to find theprobability of 11 or more customers waiting for service, type 10 in the yellow box.Example:City Clinic serves a population that requires an average of 45 visits per 8-hour day.There are two nurse-practitioners, each capable of serving 25 patients per day.Customers go to another clinic if the waiting room is full when they arrive.a.If there is no waiting area at all, what fraction of the patients will leave without service?b.How large should the waiting area be so that at least 95% of patients will be served?c.If the waiting area holds 20 patients, how often will more than 10 be waiting?Solution:a.On the Finite Queue worksheet, put in c = 2, K = 0, Ri = 45 and Rp = 25.Answer: Customers who Balk = 36.65%, so this is how many leave without service.b.Choose larger values for K until Customers who Balk is below 5%. Answer: K=9.Go to the Finite Queue Graph sheet to see the entire probability distribution displayed.c.Put in K=20 and Q=10. Answer: 19.22%Experiments:d.Using K=20 as the capacity of the waiting area, change the number of servers to 3and watch what happens to the Finite Queue Graph.e.Change the number of servers to 1 and watch what happens to the Finite Queue Graph.Note that the queue is never empty when there is only one server to handle the load.Infinite Queues (unlimited waiting line capacity)Assumptions: Identical Servers, Poisson arrivals, Exponential service times.Your Inputs: The 3 basic inputs for the infinite queuing model are c, K, Ri and Rp.There are c identical servers, and the queue can hold an unlimited number of customers.The arrival rate of customers is Ri, and the service rate is Rp for each server.Another input looks like this:Use it to find the probability of a queue exceeding a given length, Q. For example, to find theprobability of 11 or more customers waiting for service, type 10 in the yellow box.Similarly, this input,gives the probability that a customer will have to wait 0.5 time units* or longer before service,*The time units are the same as the ones you use for the arrival and service rates.You may (optionally) specify up to 4 customer categories, each with different priorities.When there is a waiting line, the highest priority customers get the next available server.Example:City Clinic serves a population that requires an average of 45 visits per 8-hour day.There are two nurse-practitioners, each capable of serving 25 patients per day.a.What is the average size of the waiting line, and how long is the average wait?b.What percent of the time are more than 10 patients are waiting?c.What is the probability that a patient will have to wait more than one-half of a day?d.20% of the patients have severe injuries that require immediate attention. How long dothese "high-priority" patients have to wait, on average?e.Does the use of a priority system change the total size of the waiting line?Solution:a.On the Infinite Queue worksheet, put in c = 2, Ri = 45 and Rp = 25.This will cause Ii = 7.674 patients waiting, on average, and Ti = 0.1705 days waiting,on average. (Ti is in days because the arrival rate is in customers per day.)b.Put in Q = 10. Answer: 26.76%c.Put in T = 0.5. Answer: 7%d.Put in 0.8 as the fraction of priority 2 customers, and put 0 for priorities 3 and 4.The result is Ti (1) = 0.0208 days for priority 1 customers.e.No. Adding the waiting lines gives a total of 7.674, the same as part (a).

&C&F, &A, page &PClick Here(More)(More)Models included in this workbookDefinition of Steady StateUsing the ModelsModels with limited waiting capacity (balking)Models with infinite waiting capacity (no balking)Finite Queue worksheetInfinite Queue worksheet

Module1Steady-State, Finite Capacity Queues2 Servers, Queue Capacity = 3, Arrival Rate = 4, Service Rate = 3Basic Inputs:Number of Servers, c =2Queue Capacity, K =3Arrival Rate, Ri =4Service Rate Capacity of each server, Rp =3Arrivals:Average Rate Joining System (R) =0Average Rate Leaving Without Service (RiPb) =0Customers who Balk: Probability that System is Full (Pb) =0.00%The Waiting Line:Average Number Waiting in Queue (Ii) =0.000Average Waiting Time (Ti) =0Q: Probability of more than0customers waiting0Service:Average Utilization of Servers =0.00%Average Number of Customers Being Served (Ip) =0The Total System (waiting line plus customers being served):Average Number in the System (I) =0.000Average Time in System (T) =0Probability Distribution:n = total number of customers in the systemq = number of customers in the waiting linenP(n)CumulativeqP(q)Cumulative00.00000.000010.00000.000020.00000.000000.00000.000030.00000.000010.00000.000040.00000.000020.00000.000050.00000.000030.00000.0000

&APage &P&C&F, &A, page &P

Module1

&C&F, &F, page &P2 Servers, Queue Capacity = 3, Arrival Rate = 4, Service Rate = 3Total Number of Customers in the System (waiting or being served)Steady-State Probabilities for Finite Capacity Queue

Finite QueueSteady-State, Infinite Capacity QueuesModel is OKBasic Inputs:Number of Servers, c =2Arrival Rate, Ri =13Service Rate Capacity of each server, Rp =25The Waiting Line:Average Number Waiting in Queue (Ii) =0.000Average Waiting Time (Ti) =0Q: Probability of more than20customers waiting0T: Probability of more than0.5time-units waiting0Service:Average Utilization of Servers =26.00%Average Number of Customers Receiving Service (Ip) =0.52The Total System (waiting line plus customers being served):Average Number in the System (I) =0.000Average Time in System (T) =0An Option: Multiple Classes of CustomersClassfraction(Ignore)Ii (k)Ti (k)highest priority = 10.20.9480.0000.000020.80.740.0000.0000300.740.0000.0000400.740.0000.0000

&C&F, &A, page &PIgnore this column. It contains an intermediate calculation that has no physical interpretation.

Infinite QueueWARNING: YOU NEED TO ENABLE THE MACROS IN THIS FILETry these steps. If step 1 does not work, then go to step 2.STEP 1: Try to enable the macros For Excel 2007,A.If you see the Security Warning in your menu bar, proceed with step B.If the Security Warning is not there, go to STEP 2.B.In the Security Warning, Click Options.C.In the Alert Window that appears, click Enable This Content and click OK. For Excel 2003,A.Close this file. Then open it again.B.In the window that appears, click Enable Macros.If a window like this onedoes NOT appear, then go to STEP 2.STEP 2: If Step 1 does not workIf you DID NOT get a Security Message, then your security setting is too high.Here is what you should do: For Excel 2007,A.Click the Microsoft Office Button at the top-left of the screen:B.Click Excel Options.C.Click Trust Center, then Trust Center Settings, and then Macro Settings.D.Click Disable all macros with notificationE.Exit from Excel. Closing the file is not enough. On the menu bar, select File, and then Exit.F.Open this file again and follow the instructions in STEP 1 to enable the macros. For Excel 2003,A.On the menu bar at the top of this page, select Tools, then Macro, then Security.B.On the Security Level tab, select Medium and click OK.C.Then exit from Excel. Closing the file is not enough. On the menu bar, select File, and then Exit.D.Open this file again and follow the instructions in STEP 1 to enable the macros.

&C&F, &A, p. &P of &N