Queuing Formulas

advertisement
Queuing Formulas
Read supplement E in the text on queuing. Then refer to these notes.
You are not responsible for the formulas in the section on probability distributions (pages
364 - 366).
The basic idea of queuing is that customers or parts arrive to be served or processed. If
the processor(s) is(are) busy, waiting occurs. How much waiting occurs depends on how
much capacity there is and the rate of demand on the processor. I like to divide the
information into two groups: system parameters and system performance measures.
System parameters
System parameters are characteristics of the system itself. These are the root traits that
determine performance. Some of these traits, management can change, some of them
management cannot change.
, pronounced "lambda", is the rate of demand on the facility. It is commonly expressed in
customers per hour or per minute.
, pronounced "myu" is the rate at which customers can be served, it is often also expressed
in customers per hour or per minute.
Note that is always the per server rate. If you have two servers (machines or people)
then the system can serve at a rate of 2. But that fact is built into the various formulas
that apply.
Closely related to these two parameters are the average time between the arrival of two
customers (called interarrival time) and the average time it takes to serve a customer.
ait = average interarrival time, is the average time between two customers. It is the reciprocal
of .
pi = is the processing time or the time to serve a customer. You might remember this variable
from the capacity formulas, it is the reciprocal of .
Finally, a system may have more than one processor that can operate in parallel.
s = the number of servers is a system.
It is common to express these parameters with a composite parameter called the system
utilization. Many of the formulas that we will look at can be expressed in terms of the
utilization, because many of the system performance characteristics are a function of the
utilization, not the specific arrival rate and service rate.
, pronounced "row", is the system utilization and is equal to /s .
System Performance Measures
There are three main ways to tell how well a queuing system is doing. The three
performance measures are: average wait time, average number of people waiting, and
probability of a certain number in the system. Average wait time is denoted by the letter
W, number in line by the letter L, and system probabilities by the letter P.
Wq = average time spent waiting in the line.
W = average time spent in the system, waiting and being served. (the system includes the
waiting area and the service area, so time in system includes both.)
Lq = the average size of the waiting line, or the average number in the queue
L = the average number of customers in the system, including those waiting and being
served.
Pn = probability of having n in the system, either waiting or begin served
Po = probability of an empty system, no one waiting or being served.
P>n = probability that there are more than n in the system.
The average number being served is not given a name in the textbook, but I will call it r.
r = the average number being served, must be less than the number of servers.
Using Queuing Models
Queuing is a highly mathematical field. There are formulas that allow you to compute
any of the performance measure values given the values of the system parameters. Often,
you can solve backwards or with trial and error to determine what value of a system
parameter would be necessary in order to achieve some level of performance. For this
web class, rather than have you focus on learning the formulas and applying them by
hand, I will have you use the software for Queuing that comes with your text.
You will need to take the disk from your text and install the OMExplorer files. If you put
the disk in, it will either start automatically, or you may have to follow the instructions on
the CD. You will see a list of possible things to install: Select the OMExplorer choice
and follow the instructions given. This will ultimately add a menu to your Excel program
called “OM Explorer”. For this problem, we will use the “Solvers” option, then “Waiting
lines”. This will bring up a new spreadsheet with two tabs. Click on the link to continue
or click on the tab that says Inputs. You will see a screen like shown on the next page.
Inputs
Solver - Waiting Lines
Enter data in yellow shaded areas.
Servers
Arrival Rate ()
Service Rate ()
(Number of servers is assumed to be 1 in single-server model.)
Probability of zero customers in the system (P0)
Probability of
customers in the system
4
(Pn)
Average utilization of the server ()
Average number of customers in the system (L)
#DIV/0!
Average number of customers in line (Lq)
Average waiting/service time in the system (W)
#DIV/0!
#DIV/0!
Average waiting time in line (W q)
#DIV/0!
#DIV/0!
#DIV/0!
#DIV/0!
This spreadsheet allows you to analyze queuing cases that fit into three categories – the
single server model, the multiple server model, and the finite source model. There are
many more models that these, but these correspond to some very common cases. The
single server model uses the assumptions that:
1. there is only one server.
2. arrivals come from a large group of customers acting independently – so that there is
no coordination between customers as to when they will arrive, and customers don’t leave
when they see a big line.
3. service times are exponentially distributed. (a statistical concept we will not focus on in
this course, but we will always assume.)
4. there is no limit to the number of customers that may be waiting in line at any one time.
The multiple server case has all of these assumptions except that there is more than one
server. The finite source model assumes 1 server again, but applies to a system that has
only a limited number of customers. An example would be a system when a network
printer provides service to a group of people working in a certain area. The only
customers for that printer would be those people in that group. If the number of
customers is less than 25, this makes a big difference on the system performance
characteristics and a different set of formulas should be used.
Let’s look at a couple examples. First turn in the text to page 378. Problem 1 describes a
case where the server is a secretary. The assumptions they describe fit the single server
model. The arrival rate is 8 pages per hour requested and the service rate is 10 pages per
hour. On the spreadsheet, make sure the single-server model is checked, put 1 in for
servers, 8 for arrival rate, and 10 for service rate. The spreadsheet now looks like this:
Inputs
Solver - Waiting Lines
Enter data in yellow shaded areas.
Servers
Arrival Rate ()
Service Rate ()
1
8
10
(Number of servers is assumed to be 1 in single-server model.)
Probability of zero customers in the system (P0)
Probability of
4
customers in the system (Pn)
0.2000
Average utilization of the server ()
Average number of customers in the system (L)
0.3277
0.8000
4.0000
Average number of customers in line (Lq)
Average waiting/service time in the system (W)
3.2000
0.5000
Average waiting time in line (W q)
0.4000
The answers to the questions are as follows.
a. What is the average utilization rate of the secretary? This is .800 or 80%.
b. What is the probability that more than 4 pages are waiting or being typed? Is the
second row of output values, there is a menu choice with several options about how many
customers are in the system. The phrase “in the system” includes both those waiting and
those being served. I selected the menu choice “more than” and put 4 in the yellow box.
The spreadsheet determined that there is a .3277 chance of having more than 4 pages
waiting to be typed, a 33% probability.
c. What is the average number of pages waiting to be typed? The phrasing here includes
those waiting to be typed, but not pages currently being typed. This would be the 5th row
of results: Average number of customers in line (Lq), which is 3.2 customers. It is fine to
leave this as a non-integer, since it is an average value.
Problem 4, on page 379 concerns a system with more than one server. The assumptions
match the multiple server model. On the spreadsheet model, click the button for multiple
server model. Then enter 2 in for the number of servers, 8 for the arrival rate, and 5 for
the service rate. Always make sure that your arrival and service rate and in the same
units. In this case, both are per hour.
a. this question asks about the average waiting time if all customers waiting form a single
line, with the first person in line going to the first server available. This is another
assumption of the multiple-server model. The wait time before being served is waiting
time in line, which is .3556. What are the units on this? Since arrival rate and service
rate were per hour, this value is in hours. It would be equivalent to 21.33 minutes
Solver - Waiting Lines
Enter data in yellow shaded areas.
Servers
Arrival Rate ()
Service Rate ()
2
8
5
Probability of zero customers in the system (P0)
Probability of
4
customers in the system (Pn)
0.1111
Average utilization of the server ()
Average number of customers in the system (L)
0.3641
0.8000
4.4444
Average number of customers in line (Lq)
Average waiting/service time in the system (W)
2.8444
0.5556
Average waiting time in line (W q)
0.3556
b. This part of the question asks about what would happen in the line were not a joint line
for both hair stylists, but rather, each customer has a specific hairstylist to see. This really
means that we don’t have one multiple server system, we really have two, parallel single
server systems that each have a service rate of 5, and an arrival rate of 4. If you put these
parameters into the software, the average time waiting in line is .80 hours or 48 minutes,
for each separately and as an average between the two. Note that this is larger than in part
a where they both used the same waiting line.
c. You can explain the difference between the two systems by realizing that in the second
system, you could be waiting for your desired stylist while the other stylist is idle. This
can’t happen in the first system, since each stylist serves whoever is waiting next in line.
Let’s do one last problem—one that uses the finite-source model. Problem 10 talks about
a situation where there are 5 copy machines. Although the copy machines provide service
to the College, the problem is looking at the copy machines as being customers of the
maintenance person who repairs them. Since there are only a small number of machines
to be serviced, this fits the requirements for the finite-source model. Go to the
spreadsheet and click on the finite source model. The first yellow box is now labeled as
“Customers”, so we put 5 into that box. We put .4 (failures per day) into the box for
arrival rate. The service rate is 2.5 machines per day, that the maintenance person can
repair. Once these numbers are entered, the spreadsheet looks like this:
Solver - Waiting Lines
Enter data in yellow shaded areas.
Customers
Arrival Rate ()
Service Rate ()
5
0.4
2.5
Probability of zero customers in the system (P0)
Probability of
2
customers in the system (Pn)
Average utilization of the server ()
Average number of customers in the system (L)
0.3775
#N/A
0.6225
1.1094
Average number of customers in line (Lq)
Average waiting/service time in the system (W)
0.4869
0.7129
Average waiting time in line (W q)
0.3129
a. The average utilization of the server is .6225 or 62%.
b. Copy machines being or waiting to be repaired is L, which is 1.11. (Remember, Lq is
only those waiting , not including those currently being repaired.)
c. The average time spent in the system is .7129. This is days, since arrival rate and
service rate are given per day.
This week’s problem set has you do some more problems like this. Some will ask you to
do further computations with the results of the queuing analysis. One will have you use
trial and error to find a needed service rate. One word of caution is to be careful in
distinguishing the difference between average time and average rate. In the example
problems wejust did, we were always given rate directly. Some of the homework
problems give you time and you must take the reciprocal to get the rate.
Download