Queue

Document Sample

```					                         1388cf58-c67c-460a-b86f-7d3d666f8ad5.xls, Instructions, page 1

Steady State Queuing Models                     26 Oct 2007
John O. McClain              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:                                                   Descriptions                  Models
Models included in this workbook
Definition of Steady State
Using the Models
Exponential Service and Interarrival Times
Models with limited waiting capacity (balking)          Finite Queue worksheet
Models with infinite waiting capacity (no balking)     Infinite Queue worksheet

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:
Please be careful with your time units. Two of the inputs are rates, and they must have the
1388cf58-c67c-460a-b86f-7d3d666f8ad5.xls, Instructions, page 2
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    customers waiting
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.

Q: Probability of more than   10    customers waiting

T: Probability of more than   0.5   time-units waiting
1388cf58-c67c-460a-b86f-7d3d666f8ad5.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 customers waiting
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.
Similarly, this input,              T: Probability of more than 0.5 time-units waiting
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 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).
1388cf58-c67c-460a-b86f-7d3d666f8ad5.xls, Finite Queue, page 4

Steady-State, Finite Capacity Queues
Basic Inputs:                                 Number of Servers, c =        2
Queue Capacity, K =        3                       Steady-
Arrival Rate, Ri =     4                  2 Servers, Queue Capacity = 3, Arrival Rate = 4, Service Rate = 3
Service Rate Capacity of each server, Rp =      3              1
0.9
Arrivals:                       Average Rate Joining System (R) = #NAME?
0.8
Average Rate Leaving Without Service (RiPb) = #NAME?
0.7
Customers who Balk: Probability that System is Full (Pb) = #NAME?
0.6
The Waiting Line:               Average Number Waiting in Queue (Ii) = #NAME?            0.5
Average Waiting Time (Ti) = #NAME?             0.4
Q: Probability of more than   0     customers waiting #NAME?                 0.3
0.2
Service:                            Average Utilization of Servers = #NAME?
Average Number of Customers Being Served (Ip) = #NAME?               0.1
0
The Total System (waiting line plus customers being served):                                          0
Average Number in the System (I) = #NAME?                       Total Number of Customers in the System (waiting or being
Average Time in System (T) = #NAME?

Probability Distribution:     n = total number of customers in the system
q = number of customers in the waiting line
n     P(n)   Cumulative          q     P(q)    Cumulative
0   #NAME?    #NAME?
1   #NAME?    #NAME?
2   #NAME?    #NAME?             0    #NAME?   #NAME?
3   #NAME?    #NAME?             1    #NAME?   #NAME?
4   #NAME?    #NAME?             2    #NAME?   #NAME?
5   #NAME?    #NAME?             3    #NAME?   #NAME?
1388cf58-c67c-460a-b86f-7d3d666f8ad5.xls, Infinite Queue, page 5

Steady-State, Infinite Capacity Queues
Model is OK

Basic Inputs:                                Number of Servers, c =        2
Arrival Rate, Ri =     13
Service Rate Capacity of each server, Rp =      25

The Waiting Line:              Average Number Waiting in Queue (Ii) =    #######
Average Waiting Time (Ti) =    #######
Q: Probability of more than   20     customers waiting        #######
T: Probability of more than   0.5     time-units waiting      #######

Service:                            Average Utilization of Servers = 26.00%
Average Number of Customers Receiving Service (I p) = 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 fraction    (Ignore)     Ii (k)      Ti (k)
highest priority = 1 0.2       0.948     #NAME?       #######
2    0.8        0.74     #NAME?       #######
3     0         0.74     #NAME?       #######
4     0         0.74     #NAME?       #######
1388cf58-c67c-460a-b86f-7d3d666f8ad5.xls, Warning, p. 6 of 8

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.
D. Click Disable all macros with notification
1388cf58-c67c-460a-b86f-7d3d666f8ad5.xls, Warning, p. 7 of 8
E. 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.
1388cf58-c67c-460a-b86f-7d3d666f8ad5.xls, Warning, p. 8 of 8

```
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
 views: 8 posted: 9/12/2011 language: English pages: 8