Download presentation
Presentation is loading. Please wait.
Published byKarin Davidson Modified over 8 years ago
1
DECISION MODELING WITH MICROSOFT EXCEL Chapter 15 Copyright 2001 Prentice Hall Part 1 QUEUING
2
INTRODUCTION Queuing models are everywhere. For example, airplanes “queue up” in holding patterns, waiting for a runway so they can land. Then, they line up again to take off. People line up for tickets, to buy groceries, etc. Jobs line up for machines, orders line up to be filled, and so on. A. K. Erlang (a Danish engineer) is credited with founding queuing theory by studying telephone switchboards in Copenhagen for the Danish Telephone Company. Many of the queuing results used today were developed by Erlang.
3
A queuing model is one in which you have a sequence of times (such as people) arriving at a facility for service, as shown below: Consider St. Luke’s Hospital in Philadelphia and the following three queuing models. Model 1: St. Luke’s Hematology Lab St. Luke’s treats a large number of patients on an outpatient basis (i.e., not admitted to the hospital). Outpatients plus those admitted to the 600-bed hospital produce a large flow of new patients each day. Arrivals00000 Service Facility
4
Most new patients must visit the hematology laboratory as part of the diagnostic process. Each such patient has to be seen by a technician. After seeing a doctor, the patient arrives at the laboratory and checks in with a clerk. Patients are assigned on a first-come, first-served basis to test rooms as they become available. The technician assigned to that room performs the tests ordered by the doctor. When the testing is complete, the patient goes on to the next step in the process and the technician sees a new patient. We must decide how many technicians to hire.
5
WATS (Wide Area Telephone Service) is an acronym for a special flat-rate, long distance service offered by some phone companies. Model 2: Buying WATS Lines As part of its remodeling process, St. Luke’s is designing a new communications system which will include WATS lines. We must decide how many WATS lines the hospital should buy so that a minimum of busy signals will be encountered. When all the phone lines allocated to WATS are in use, the person dialing out will get a busy signal, indicating that the call can’t be completed.
6
The equipment includes measuring devices such as Model 3: Hiring Repairpeople St. Luke’s hires repairpeople to maintain 20 individual pieces of electronic equipment. If a piece of equipment fails and all the repairpeople are occupied, it must wait to be repaired. We must decide how many repairpeople to hire and balance their cost against the cost of having broken equipment. electrocardiogram machines small dedicated computers CAT scanner other equipment
7
All three of these models fit the general description of a queuing model as described below: PROBLEM ARRIVALSSERVICE FACILITY 1 Patients Technicians 2 Telephone Calls Switchboard 3 Broken Equipment Repairpeople These models will be resolved by using a combination of analytic and simulation models. To begin, let’s start with the basic queuing model.
8
THE BASIC MODEL Consider the Xerox machine located in the fourth- floor secretarial service suite. Assume that users arrive at the machine and form a single line. Each arrival in turn uses the machine to perform a specific task which varies from obtaining a copy of a 1-page letter to producing 100 copies of a 25-page report. This system is called a single-server (or single- channel) queue.
9
2. The number of people in the queue (waiting for service). 3. The waiting time in the system (the interval between when an individual enters the system and when he or she leaves the system). 4. The waiting time in the queue (the time between entering the system and the beginning of service). Questions about this or any other queuing system center on four quantities: 1. The number of people in the system (those being served and waiting in line).
10
ASSUMPTIONS OF THE BASIC MODEL 1. Arrival Process. Each arrival will be called a “job.” The interarrival time (the time between arrivals) is not known. Therefore, the exponential probability distribution (or negative exponential distribution) will be used to describe the interarrival times for the basic model. The exponential distribution is completely specified by one parameter,, the mean arrival rate (i.e., how many jobs arrive on the average during a specified time period).
11
Mean interarrival time is the average time between two arrivals. Thus, for the exponential distribution Avg. time between jobs = mean interarrival time = 1 Thus, if = 0.05 mean interarrival time = = = 20 1 1 0.05 0.05 2. Service Process. In the basic model, the time that it takes to complete a job (the service time) is also treated with the exponential distribution. The parameter for this exponential distribution is called (the mean service rate in jobs per minute).
12
T is the number of jobs that would be served (on the average) during a period of T minutes if the machine were busy during that time. The mean or average, service time (the average time to complete a job) is Avg. service time = 1 Thus, if = 0.10 mean service time = = = 10 mean service time = = = 101 1 0.10 0.10 3. Queue Size. There is no limit on the number of jobs that can wait in the queue (an infinite queue length).
13
4. Queue Discipline. Jobs are served on a first- come, first-serve basis (i.e., in the same order as they arrive at the queue). 5. Time Horizon. The system operates as described continuously over an infinite horizon. 6. Source Population. There is an infinite population available to arrive.
14
CHARACTERISTICS OF THE BASIC MODEL The values of the parameters and (together with the assumptions) are all that is needed to calculate several important operating characteristics of the basic model. NOTE: these formulas hold only if < . CHARACTERISTICSYMBOL FORMULA Utilization -- / Exp. No. in System L /( – ) Exp. No. in Queue L q 2 / ( – ) Exp. Waiting Time W 1 /( – ) Exp. Time in Queue W q / ( – ) Prob. System is Empty P 0 1 – ( / )
15
Consider a specific example where = 0.25 and = 0.10. Thus, on the average, a job arrives every 1/ = 1 / 0.25 = 4 minutes. Similarly, the time it takes to complete a job, on average, is 1/ = 1 / 0.10 = 10 minutes. In this case, since > , the service operation will get further behind (the queue will grow longer) as time goes by. Now, return to the Xerox model, in which < . Spreadsheets are ideal for crunching the numerical results from such formulas.
16
The following Excel spreadsheet was originally developed by Professor David Ashley. It already has the formulas entered. Here is the introductory page.
17
Plugging the numerical values from the Xerox model, = 0.05 and = 0.10 into the appropriate cells of the MMs worksheet yields the following results:
18
Steady-State Result Let’s interpret the results. L is the expected number of people in the system after the queue has reached steady-state. Steady-state means that the probability that you will observe a certain number of people in the system does not depend on the time at which you count them.
19
Thus, in a steady-state, 1.The system is empty with probability ½ 2.On average, there is 0.5 person in the queue 3.On average, an arrival must wait 10 min. before starting to use the machine. 4.On average, an arrival will spend 20 minutes in the system.
20
Using the Results These results hold for the basic model and the particular values for the parameters ( = 0.05 and = 0.10 ). Suppose, for example, management makes the following calculations: Since = 0.05, on the average 5 / 100 of a job arrives each minute. During each 8-hour day there are 8 x 60 = 480 minutes. Thus, during each day there is on the average a total of (0.05)(480) = 24 arrivals. (24 arrivals/day)(20 minutes/arrival) = 480 minutes or 8 hours We know that on the average each person spends 20 minutes in the system (W = 20). Thus, the total time spent at the facility is:
21
If management feels that 8 hours is too long to spend at the facility, then the following steps might be taken: 1.A new machine might be purchased with a smaller mean service time. 2.Another machine might be purchased and both machines used to satisfy the demand. This would change the system to a two-server queue. 3.Some personnel might be sent to a different and less busy copying facility. This would change the arrival process. In any case, management must balance the cost of providing service against the cost of waiting.
22
A TAXONOMY OF QUEUING MODELS There are many possible queuing models. Therefore, to facilitate communication among those working on queuing models, D. G. Kendall proposed a taxonomy based on the following notation: A/B/s A = arrival distribution B = service distribution s = number of servers where Different letters are used to designate certain distributions. Placed in the A or the B position, they indicate the arrival or the service distribution, respectively.
23
M = exponential distribution D = deterministic number G = any (a general) distribution of service times GI = any (a general) distribution of arrival times The following conventions are in general use: For example, the Xerox model is an M/M/1 model (i.e., a single-server queue with exponential inter- arrival and service times).
24
LITTLE’S FLOW EQUATION AND RELATED RESULTS It can be proven that in a steady-state queuing process L = W In the Xerox model, L = 0.05 x 20 = 1.0 Consider the diagram below: Scene 1: Our Hero Arrives In scene 1 our hero arrives and joins the queue. This equation is often called Little’s flow equation.
25
Arrived during the time our hero waited and was served Scene 2: Hecompletesservice In scene 2 he has just completed service. Assume the system is in steady-state. Since in this case the average number of people in the system is independent of time, let’s measure this quantity when our hero completes being served. At this time, the number of people in the system is precisely the total number who arrived after he did. Therefore, if W is his waiting time and people arrive at a rate of, we would expect L to equal W.
26
Note that Little’s flow equation applies to any steady-state queuing process and is thus applicable to a wide variety of models. The proof used to establish Little’s flow equation also shows that L q = W q In the Xerox model, L q = 0.05 x 10 = 0.5 It is essential that represent the rate at which arrivals join the queue. Consider, for example, a queue with an upper limit on the number of items that can wait in the queue (called a finite queue).
27
In such a system, a person can call, find the system full (receive a busy signal) and be sent away (hang up). For example, a modern phone system holds only a certain number of calls (say, 10) in a queue until they are answered by the next available service representative. This person does not join the queue. This is called a balk. Similarly, a customer may tire of waiting in line (or being on hold) and leave without being served. Here, the person joined the queue, became impatient and left without completing the transaction. This is called reneging.
28
Another important general result depends on the observation that expected waiting time = expected waiting time in queue + expected service time For the basic model, we found that Expected service time = 1 Putting the general result in symbols yields W = W q + 1 For the Xerox model: W = 10 + = 20 1 0.10 0.10 This general result holds for any queuing model in which a steady-state occurs.
29
Now we can easily compute the four operating characteristics L, L q, W, W q : First calculate L: - - L =L =L =L = From Little’s flow equation we know that L = W Thus, after computing L, we can now compute W: W = L/ W = L/ Knowing W, we can now compute W q : W q = W - 1 L q = W q And knowing W q, we can now compute L q :
30
THE M/G/1 QUEUE The exponential distribution may not fit the service process very well. Fortunately, there is a generalization of the basic model that permits the distribution of the service time to be arbitrary. It is not necessary to know the service time distribution, only the mean service time, 1/ , and its variance, 2.
31
The operating characteristics for this model are: CHARACTERISTICSYMBOL FORMULA Utilization -- / Exp. No. in System L L q + / Exp. No. in Queue L q 2 2 + ( / ) 2 2(1 – / ) 2(1 – / ) Exp. Waiting Time W W q + 1 / Exp. Time in Queue W q L q / Exp. Time in Queue W q L q / Prob. System is Empty P 0 1 – ( / ) As 2 increases, L, L q, W, W q all increase. This means that the consistency of a server may be as important as the speed of the server.
32
For example, suppose you must hire a secretary and you have to select one of two candidates. Secretary 1 is very consistent, typing any document in exactly 15 minutes. Secretary 2 is somewhat faster, with an average of 14 minutes per document, but with times varying according to the exponential distribution. With the “MG1” and “MMs” worksheets, we can easily determine which secretary will give shorter average turnaround times on documents.
33
Since Secretary 1 types every document in exactly 15 minutes, 2 = 0. In addition, = 3 per hour (or 0.05 per minute) and = 1 / 15 per minute. Averageturnaroundtime
34
For Secretary 2, enter the parameters = 14, = 0.05, and = 1 / 14 per minute. Averageturnaroundtime Even though Secretary 2 is “faster,” her average turnaround times are longer because of the high variability of her service times.
35
MODEL 1: AN M/M/S QUEUE (HEMATOLOGY LAB) Previously, the stated goal was to attack the three St. Luke’s Hospital models with queuing models. Consider the blood-testing model (Model 1): 000 Server 1 Server 2 Server 3 Each patient joins a common queue and, on arriving at the head of the line, enters the first available examining room.
36
This type of system must not be confused with a system in which a queue forms in front of each server, as in a typical grocery store. Now, assume This implies that a new patient arrives every 5 minutes on average since Mean interarrival = 1/ = 1/0.20 = 5 The interarrival time is given by an exponential distribution with parameter = 0.20 per min. Each server is identical
37
This implies that the mean service time is 8 minutes since Mean service time for an individual server = 1/ = 1/0.125 = 8 Each service time is given by an exponential distribution with parameter = 0.125 per min. Note that if there were only one server, the queue would grow without limit because > (0.20 > 0.125). However, for a multiserver queue, a steady-state will exist as long as < s , where s is the number of servers. For example, if there are 2 servers, a steady-state will be achieved because 0.20 < (2*0.125).
38
The Key Equations We want to find the values L, L q,W, and W q. However, since this is a multiserver queue, we must use different formulas. For this model, the probability that the system is empty is: P 0 = 1 ( / ) n n! n! ( / ) s s! s! 1 1 - ( /s ) + n=0 s-1 Lq =Lq =Lq =Lq = P0P0P0P0 ( / ) s+1 (s-1)!(s- / ) 2 The expected number of people in the queue is:
39
Assume now that we have decided to hire two technicians. We can input the parameters s = 2, = 0.20, and = 0.125 into the MMs worksheet to obtain the results.
40
Here are the results when a third technician is added (s = 3). Note that the expected waiting time has been reduced from 22.22 minutes to 9.56 minutes.
41
When a fourth technician is added (s = 4), the expected waiting time has been reduced slightly more.
42
Adding additional servers may decrease the waiting time, however, you have to consider not only how much extra you will pay for the additional servers but also if those additional servers will be busy most of the time. The previous results show that as more servers are added, the percentage of idle time for the technicians increases, which could lead to boredom and sloppy work.
43
ECONOMIC ANALYSIS OF QUEUING SYSTEMS The cost of hiring additional technicians is fairly clear. Now, let’s determine the cost of waiting. The cost to the patient is irrelevant to the decision, except as it affects the patient’s willingness to use the hospital. Besides the possible effect on demand, the hematology lab could cost the hospital money if it reduced the output of the hospital.
44
Cost Parameters If you are willing and able to estimate certain costs, you can build expected cost models of queuing systems. Consider, for example, the hematology lab model (in general terms any multiserver queue with exponential interarrival and service times), and suppose the manager is willing to specify two costs: C s = cost per hour of having a server available C W = cost per hour of having a person wait in the system (a very “fuzzy” or qualitative cost) Let’s start by calculating the total cost of hiring 2 servers for an 8-hour day.
45
There are two components: server cost = (C s )(2)(8) where C s is the cost per hour for one server 2 is the number of servers 8 is the number of hours each server works waiting cost = (C W )(L 2 )(8) where L 2 is the number of people in the queue when there are two servers. To calculate the total cost of using 4 servers for a 6- hour day, take (C s )(4)(6) + (C W )(L 4 )(6) or [(C s )(4) + (C W )(L 4 )]6
46
The Total Cost per Hour We now define TC(s) = total cost per hour of using s servers = (C s )(s) + (C W )(L s ) The goal is to find the value of s that will minimize the sum of these two costs. Note that as s, the number of servers, increases, the waiting cost will decrease and the server cost will increase. Unfortunately, it is not possible to derive a formula that gives the optimal value of s. However, consider the following worksheet…
47
In this worksheet, specify C s = $50/server/hour and C w = $100/customer/hour. =$B$1*A6*$E$1 Enter here the values for L (expected # in system) The results show that 3 servers minimizes the Total Cost. =SUM(C6:D6) an 8- hour shift. Compare the cost over =$B$2*B6*$E$1
48
Next, create a data table to determine the sensitivity of this decision to the “fuzzy” cost, C W ($0 to $180). Highlight the block, click on Data – Table. =E6 =E7 Enter B2 as the Column Input and click OK. =E8
49
Excel automatically fills in the table as shown below.
50
These results can be graphed to look for patterns and trends. You can see that 2 servers is optimal for C W = 0, while 3 servers is optimal from C W = $20 up to $180. For values of C W > $200, 4 servers is optimal.
51
End of Part 1 Please continue to Part 2
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.