You are on page 1of 16

93614159.

xls, Instructions, page 1

Steady State Queuing Models


John O. McClain

26 Oct 2007 jom1@cornell.edu

Johnson Graduate School of Management


Sage Hall, Cornell University Ithaca NY 14853 This spreadsheet is intended for teaching purposes. You are welcome to use it in any manner and change it as you see fit. This model comes without any guarantee, and is distributed free of charge. Note: If the worksheets don't seem to work properly, Click Here

Contents:
Models included in this workbook Definition of Steady State Using the Models

Descriptions

Exponential Service and Interarrival Times


Models with limited waiting capacity (balking) Models with infinite waiting capacity (no balking)

The Models The Finite Queue model assumes that there is a limit to the waiting line, and that customers will not join the queue when that limit is reached. Those customers are permanently 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 that 9% of the time there will be no one waiting. But the 9% does not apply, for example, if you start with no one waiting and watch the system for 15 minutes. Using the Models Your inputs always go in the yellow cells, like this:

93614159.xls, Instructions, page 2

Please be careful with your time units. Two of the inputs are rates, and they must have the same time units. For example, suppose the arrival rate is 4 customers per hour, and the average service time is 10 minutes. To be consistent, the service rate must also be given in 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 wait for 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:
Q: Probability of more than 10

custom w ers aiting

Use it to find the probability of a queue exceeding a given length, Q. For example, to find the probability 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 3 and 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.

93614159.xls, Instructions, page 3

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: Q: Probability of more than 10 custom w ers aiting Use it to find the probability of a queue exceeding a given length, Q. For example, to find the probability of 11 or more customers waiting for service, type 10 in the yellow box.
T: Probability of more than 0.5 Similarly, this input, tim e-units w aiting 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 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 do these "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).

93614159.xls, Instructions, page 4

ome to use it in any ny guarantee, and is

Models

Finite Queue worksheet Infinite Queue worksheet

aiting line, and that ose customers are affected. service times. waiting line. That is,

service times, y per server)

ples are worked out.

nt implications: t change with time. erent times of day.

s empty, it means that ot apply, for example, if

93614159.xls, Instructions, page 5

s, and they must have the mers per hour, and the e rate must also be given

on as you enter an input. st click a button and wait n the spreadsheet.

ne capacity)

rvice times. is full. This is "balking". , K, Ri and Rp.

e and c in service).

or each server.
custom w ers aiting

10

Q. For example, to find the the yellow box.

s per 8-hour day. ents per day.

l leave without service? atients will be served? 10 be waiting?

d Rp = 25. eave without service. 5%. Answer: K=9. ty distribution displayed.

mber of servers to 3

o the Finite Queue Graph. ver to handle the load.

93614159.xls, Instructions, page 6

line capacity)

rvice times.

c, K, Ri and Rp. mited number of customers. or each server.


custom w ers aiting

10

Q. For example, to find the the yellow box.

tim e-units w aiting s* or longer before service, al and service rates.

0.5

with different priorities. next available server.

s per 8-hour day. ents per day. e average wait?

n one-half of a day? e attention. How long do

aiting line?

0.1705 days waiting, ers per day.)

priorities 3 and 4. part (a).

93614159.xls, Finite Queue, page 7

Steady-State, Finite Capacity Queues


Basic Inputs:
Number of Servers, c = Queue Capacity, K = Arrival Rate, Ri = Service Rate Capacity of each server, Rp = 2 3 4 3

Steady-State Probabilities for Finite Capacity Queue 12 10 8 6 4 2 0


0 1 2 3 4

Arrivals:

Average Rate Joining System (R) = #MACRO? Average Rate Leaving Without Service (RiPb) = #MACRO? Customers who Balk: Probability that System is Full (Pb) = #MACRO?

The Waiting Line:

Average Number Waiting in Queue (Ii) = #MACRO? Average Waiting Time (Ti) = #MACRO? 0

Q: Probability of more than

customers waiting

#MACRO?

Service:

Average Utilization of Servers = #MACRO? Average Number of Customers Being Served (Ip) = #MACRO? Average Number in the System (I) = #MACRO? Average Time in System (T) = #MACRO?

The Total System (waiting line plus customers being served):

Total Number of Customers in the System (waiting or being ser

Probability Distribution:

n = total number of customers in the system q = number of customers in the waiting line
n 0 1 2 3 4 5 P(n) Cumulative #MACRO? #MACRO? #MACRO? #MACRO? #MACRO? #MACRO? #MACRO? #MACRO? #MACRO? #MACRO? #MACRO? #MACRO? q P(q)

Cumulative

0 1 2 3

#MACRO? #MACRO? #MACRO? #MACRO?

#MACRO? #MACRO? #MACRO? #MACRO?

93614159.xls , Finite Queue, page 8

Steady-State, Finite Capacity Queues


Basic Inputs:
Number of Servers, c = Queue Capacity, K = Arrival Rate, Ri = Service Rate Capacity of each server, Rp = 2 3 4 3

Steady-State Probabilities for Finite Capacity Queue 12 10 8 6 4 2 0


0 1 2 3 4 5

Arrivals:

Average Rate Joining System (R) = #MACRO? Average Rate Leaving Without Service (RiPb) = #MACRO? Customers who Balk: Probability that System is Full (Pb) = #MACRO?

The Waiting Line:

Average Number Waiting in Queue (Ii) = #MACRO? Average Waiting Time (Ti) = #MACRO? 0

Q: Probability of more than

customers waiting

#MACRO?

Service:

Average Utilization of Servers = #MACRO? Average Number of Customers Being Served (Ip) = #MACRO? Average Number in the System (I) = #MACRO? Average Time in System (T) = #MACRO?

The Total System (waiting line plus customers being served):

Total Number of Customers in the System (waiting or being served)

Probability Distribution:

n = total number of customers in the system q = number of customers in the waiting line
n 0 1 2 3 4 5

Cumulative P(n) #MACRO? #MACRO? #MACRO? #MACRO? #MACRO? #MACRO? #MACRO? #MACRO? #MACRO? #MACRO? #MACRO? #MACRO?

P(q)

Cumulative

0 1 2 3

#MACRO? #MACRO? #MACRO? #MACRO?

#MACRO? #MACRO? #MACRO? #MACRO?

93614159.xls , Finite Queue , page 9

93614159.xls , Finite Queue , page 10

93614159.xls , Finite Queue , page 11

93614159.xls, Infinite Queue, page 12

Steady-State, Infinite Capacity Queues


Model is OK Basic Inputs:
Number of Servers, c = Arrival Rate, Ri = Service Rate Capacity of each server, Rp = Average Number Waiting in Queue (Ii) = ### Average Waiting Time (Ti) = ### Q: Probability of more than T: Probability of more than 20 0.5 2 13 25

The Waiting Line:

customers waiting ### time-units waiting ###

Service:

Average Utilization of Servers = 26.00% Average Number of Customers Receiving Service (Ip) = 0.52

The Total System (waiting line plus customers being served):


Average Number in the System (I) = ### Average Time in System (T) = ###

An Option: Multiple Classes of Customers


Class highest priority = 1 2 3 4 fraction 0.2 0.8 0 0 (Ignore) 0.95 0.74 0.74 0.74 Ii (k) #MACRO? #MACRO? #MACRO? #MACRO? Ti (k) ### ### ### ###

93614159.xls, Warning, p. 13 of 16

WARNING: YOU NEED TO ENABLE THE MACROS IN THIS FILE


Try 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 one does NOT appear, then go to STEP 2.

STEP 2: If Step 1 does not work


If 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.

93614159.xls, Warning, p. 14 of 16 D. Click Disable all macros with notification E. Exit from Excel. Closing the file is not enough. On the menu bar, select File, and then F. Open this file again and follow the instructions in STEP 1 to enable the macros. For Excel 2003, A. B. C. D. On the menu bar at the top of this page, select Tools, then Macro, then Security. On the Security Level tab, select Medium and click OK. Then exit from Excel. Closing the file is not enough. On the menu bar, select File Open this file again and follow the instructions in STEP 1 to enable the macros.

93614159.xls, Warning, p. 15 of 16

NABLE THE MACROS IN THIS FILE

93614159.xls, Warning, p. 16 of 16

ect File, and then Exit.

ar, select File, and then Exit.