TECHNICALNOTESIXTEEN technicalnote Definition of Simulation 6 4 6 Simulation Methodology 6 4 6 Problem definition Parameters defined Constructing a simulation model Variables defined Specifying values of variables and parameters Decision rules defined Evaluating results Distributions defined Validation Time incrementing defined Proposing a new experiment Run length (or run time) defined Computerization Simulating Waiting Lines 6 5 1 Example: a two-stage assembly line Spreadsheet Simulation 6 5 4 Simulation Programs and Languages 6 5 6 Desirable features of simulation software Advantages and Disadvantages of Simulation 6 5 9 Conclusion 6 5 9 Advanced Case: Understanding the Impact of Variability 6 6 8 on the Capacity of a Production System technical note sixteen SIMUL ATION cha06369_tn16.qxd 3/4/03 10:05 AM Page 645 646 section 4 PLANNING AND CONTROLLING THE SUPPLY CHAIN Simulation has become a standard tool in business. In manufacturing, simulation is used to determine production schedules, inventory levels, and maintenance procedures; to plan capacity, resource requirements, and processes; and more. In services, simulation is widely used to analyze waiting lines and schedule operations. Often, when a mathematical technique fails, we turn to simulation.Servi ce D E F I N I T I O N O F S I M U L AT I O N q q q Although the term simulation can have various meanings depending on its application, in business, it generally refers to using a computer to perform experiments on a model of a real system. Examples of other types of simulation are airplane flight simula- tors, video games, and virtual reality animation. Simulation experiments may be under- taken before a real system is operational, to aid in its design, to see how the system might react to changes in its operating rules, or to evaluate the system's response to changes in its structure. Simulation is particularly appropriate to situations in which the size or complex- ity of the problem makes the use of optimizing techniques difficult or impossible. Thus, job shops, which are characterized by complex queuing problems, have been studied exten- sively via simulation, as have certain types of inventory, layout, and maintenance problems (to name but a few). Simulation can also be used in conjunction with traditional statistical and management science techniques. In addition, simulation is useful in training managers and workers in how the real system operates, in demonstrating the effects of changes in system variables, in real-time control, and in developing new ideas about how to run the business. S I M U L AT I O N M E T H O D O L O G Y q q q Exhibit TN16.1 is a flowchart of the major phases in a simulation study. In this section, we develop each phase with particular reference to the key factors noted at the right of the chart. E X H I B I T TN1 6.1 Major Phases in a Simulation Study Start Define problem Construct simulation model Key Factors Objectives of the system studied Variables that affect achievement of objectives Specification of variables and parameters Specification of decision rules Specification of probability distributions Specification of time incrementing procedure Determination of starting conditions Determination of run length Determine statistical tests Compare with other information Stop Specify values of variables and parameters Run the simulation Evaluate results Validation Propose new experiment Vol. VIII "Robotics and Technology Featuring Genesis Systems Group" cha06369_tn16.qxd 3/4/03 10:05 AM Page 646 SIMULATION technical note 647 P R O B L E M D E F I N I T I O N Problem definition for purposes of simulation differs little from problem definition for any other tool of analysis. Essentially, it entails specifying the objectives and identifying the relevant controllable and uncontrollable variables of the system to be studied. Consider the example of a fish market. The objective of the market's owner is maximizing the profit on sales of fish. The relevant controllable variable (that is, under the control of the decision maker) is the ordering rule; the relevant uncontrollable variables are the daily demand levels for fish and the amount of fish sold. Other possible objectives could also be speci- fied, such as to maximize profit from the sale of lobsters or to maximize sales revenue. C O N S T R U C T I N G A S I M U L A T I O N M O D E L A feature that distinguishes simulation from techniques such as linear programming or queuing theory is the fact that a simulation model must be custom built for each problem situation. (A linear programming model, in contrast, can be used in a variety of situations with only a restatement of the values for the objective function and constraint equations.) There are simulation languages that make the model building easier, however. We discuss this subject later in this technical note. The unique nature of each simulation model means that the procedures discussed later for building and executing a model represent a synthe- sis of various approaches to simulation and are guidelines rather than rigid rules. S p e c i f i c a t i o n o f V a r i a b l e s a n d P a r a m e t e r s The first step in con- structing a simulation model is determining which properties of the real system should be fixed (called parameters) and which should be allowed to vary throughout the simulation run (called variables). In a fish market, the variables are the amount of fish ordered, the amount demanded, and the amount sold; the parameters are the cost of the fish and the sell- ing price of the fish. In most simulations, the focus is on the status of the variables at dif- ferent points in time, such as the number of pounds of fish demanded and sold each day. S p e c i f i c a t i o n o f D e c i s i o n R u l e s Decision rules (or operating rules) are sets of conditions under which the behavior of the simulation model is observed. These rules are either directly or indirectly the focus of most simulation studies. In many simula- tions, decision rules are priority rules (for example, which customer to serve first, which job to process first). In certain situations these can be quite involved, taking into account a large number of variables in the system. For example, an inventory ordering rule could be stated in such a way that the amount to order would depend on the amount in inventory, the amount previously ordered but not received, the amount backordered, and the desired safety stock. S p e c i f i c a t i o n o f P r o b a b i l i t y D i s t r i b u t i o n s Two categories of distributions can be used for simulation: empirical frequency distributions and standard mathematical distributions.An empirical distribution is derived from observing the relative frequencies of some event such as arrivals in a line or demand for a product. In other words, it is a custom-built demand distribution that is relevant only to a particular situation. It might appear like the one shown on the left side of Exhibit TN16.2. Such distributions have to be determined by direct observation or detailed analysis of records. (We show how to use these later in the waiting line simulation example.) But often demand, for example, can rea- sonably be assumed to closely approximate a standard mathematical distribution such as the normal or Poisson. This greatly simplifies data collection and computerization. EXAMPLE TN16.1: Relating Random Numbers to a Standard Distribution To illustrate how to relate random numbers to a standard distribution, suppose that daily demand for newspapers from a vending machine is normally distributed with a mean of 55 and standard devia- tion of 10. (This distribution is shown on the right side of Exhibit TN16.2.) Under this assumption, the generation of daily demand would employ a table of randomly distributed normal numbers (or deviates) in conjunction with the statistical formula Dn = x + Zn (terms defined later).1 Parameters Variables Decision rules Distributions cha06369_tn16.qxd 3/4/03 10:05 AM Page 647 648 section 4 PLANNING AND CONTROLLING THE SUPPLY CHAIN SOLUTION 1 Draw a five- or six-digit number from Exhibit TN16.3. The entries in this table are randomly developed deviate values that pertain to a normal distribution having a mean of 0 and a stan- dard deviation of 1. The term deviate refers to the number of standard deviations some value is from the mean and, in this case, represents the number of standard deviations that any day's demand is from the mean demand. In the preceding formula for Dn, it would be the value for Z on day n. If we are simulating Day 1 and using the first entry in Exhibit TN16.3, then Z1 = 1.23481. A negative deviate value means simply that the particular level of demand will be less than the mean, not that demand will be a negative value. 2 Substitute the value of Z1 , along with the predetermined values for x and , into the formula Dn = x + Zn where D = Demand on day n x = Mean demand (55 in this example) = Estimated standard deviation (10 in this example) Zn = Number of standard deviations from the mean on day n Thus Dn = 55 + (1.23481)(10). 3 Solve for Dn: Dn = 55 + 12.3481 Dn = 67.3481 E X H I B I T TN1 6.2 Actual Distribution of Demand and Normal Distribution with the Same Mean A. 0.30 0.20 0.10 P (demand) 35 45 55 65 75 Demand per day 0 B. 0.50 P (demand) 35 45 55 65 75 Demand per day 0 0.25 E X H I B I T TN1 6.3 Randomly Distributed Normal Numbers 1.23481 -1.66161 1.49673 -.26990 -.23812 .34506 1.54221 .02629 1.22318 .52304 .18124 .20790 .19126 1.18250 1.00826 .24826 -1.35882 .70691 -.54929 -.87214 -2.75470 -1.19941 -1.45402 .16760 1.14463 -.23153 1.11241 1.08497 -.28185 -.17022 -.63248 -.04776 -.55806 .04496 1.16515 2.24938 -.29988 .31052 -.49094 -.00926 -.28278 -.95339 -.32855 -.93166 -.04187 -.94171 1.64410 -.96893 .35331 .56176 -.98726 .82752 .32468 .36915 .72576 .04406 cha06369_tn16.qxd 3/4/03 10:05 AM Page 648 SIMULATION technical note 649 4 Repeat Steps 1 to 3, using different normal deviates from the table until the desired number of days have been simulated. ˇ S p e c i f i c a t i o n o f T i m e - I n c r e m e n t i n g P r o c e d u r e In a simulation model,timecanbeadvancedbyoneoftwomethods:(1)fixed-timeincrementsor(2)variable- time increments. Under both methods of time incrementing, the concept of a simulated clock is important. In the fixed­time increment method, uniform clock-time increments (such as minutes, hours, or days) are specified, and the simulation proceeds by fixed inter- vals from one time period to the next. At each point in clock time, the system is scanned to determine if any events are to occur. If they are, the events are simulated, and time is advanced; if they are not, time is still advanced by one unit. In the variable­time increment method, clock time is advanced by the amount required to initiate the next event. Which method is most appropriate? Experience suggests that the fixed­time increment is desirable when events of interest occur with regularity or when the number of events is large, with several commonly occurring in the same time period. The variable­time increment method is generally desirable, taking less computer run time, when there are relatively few events occurring within a considerable amount of time. It ignores time intervals where noth- ing happens and immediately advances to the next point when some event does take place. S P E C I F Y I N G V A L U E S O F V A R I A B L E S A N D PA R A M E T E R S A variable, by definition, changes in value as the simulation progresses, but it must be given an initial starting value. The value of a parameter, remember, stays constant; how- ever, it may be changed as different alternatives are studied in other simulations. D e t e r m i n i n g S t a r t i n g C o n d i t i o n s Determining starting conditions for variables is a major tactical decision in simulation. This is because the model is biased by the set of initial starting values until the model has settled down to a steady state. To cope with this problem, analysts have followed various approaches, such as (1) discarding data generated during the early parts of the run, (2) selecting starting conditions that reduce the duration of the warm-up period, or (3) selecting starting conditions that eliminate bias. To employ any of these alternatives, however, the analyst must have some idea of the range of output data expected. Therefore, in one sense, the analyst biases results. On the other hand, one of the unique features of simulation is that it allows judgment to enter into the design and analysis of the simulation; so if the analyst has some information that bears on the problem, it should be included. D e t e r m i n i n g R u n L e n g t h The length of the simulation run (run length or run time) depends on the purpose of the simulation. Perhaps the most common approach is to continue the simulation until it has achieved equilibrium. In the fish market example, this would mean that simulated fish sales correspond to their historical relative frequencies.An- other approach is to run the simulation for a set period, such as a month, a year, or a decade, and see if the conditions at the end of the period appear reasonable. A third approach is to set run length so that a sufficiently large sample is gathered for purposes of statistical hypothesis testing. This alternative is considered further in the next section. E V A L U A T I N G R E S U L T S The types of conclusions that can be drawn from a simulation depend, of course, on the degree to which the model reflects the real system, but they also depend on the design of the simulation in a statistical sense. Indeed, many analysts view simulation as a form of hypoth- esis testing, with each simulation run providing one or more pieces of sample data that are amenable to formal analysis through inferential statistical methods. Statistical procedures Time incrementing Run length (run time) cha06369_tn16.qxd 3/4/03 10:05 AM Page 649 650 section 4 PLANNING AND CONTROLLING THE SUPPLY CHAIN commonly used in evaluating simulation results include analysis of variance, regression analysis, and t tests. In most situations, the analyst has other information available with which to compare the simulation results: past operating data from the real system, operating data from the performance of similar systems, and the analyst's own intuitive understanding of the real system's operation. Admittedly, however, information obtained from these sources is prob- ably not sufficient to validate the conclusions derived from the simulation. Thus, the only true test of a simulation is how well the real system performs after the results of the study have been implemented. V A L I D A T I O N In this context, validation refers to testing the computer program to ensure that the simulation is correct. Specifically, it is a check to see whether the computer code is a valid translation of the flowchart model and whether the simulation adequately represents the real system. Errors may arise in the program from mistakes in the coding or from mistakes in logic. Mistakes in coding are usually easily found because the program is most likely not executed by the com- puter. Mistakes in logic, however, present more of a challenge. In these cases, the program runs but fails to yield correct results. To deal with this problem, the analyst has three alternatives: (1) have the program print out all calculations and verify these calculations by separate computation, (2) simulate present conditions and compare the results with the existing system, or (3) pick some point in the simulation run and compare its output to the answer obtained from solving a relevant mathematical model of the situation at that point. Even though the first two approaches have obvious drawbacks, they are more likely to be employed than the third, because if we had a relevant mathematical model in mind, we would probably be able to solve the prob- lem without the aid of simulation. P R O P O S I N G A N E W E X P E R I M E N T Based on the simulation results, a new simulation experiment may be in order. We might like to change many of the factors: parameters, variables, decision rules, starting condi- tions, and run length. As for parameters, we might be interested in replicating the simula- tion with several different costs or prices of a product to see what changes would occur. Trying different decision rules would obviously be in order if the initial rules led to poor results or if these runs yielded new insights into the problem. (The procedure of using the same stream of random numbers is a good general approach in that it sharpens the differ- ences among alternatives and permits shorter runs.)Also, the values from the previous exper- iment may be useful starting conditions for subsequent simulations. Finally, whether trying different run lengths constitutes a new experiment rather than a replication of a previous experiment depends on the types of events that occur in the system operation over time. It might happen, for example, that the system has more than one stable level of operation and that reaching the second level is time dependent. Thus, while the first series of runs of, say, 100 periods shows stable conditions, doubling the length of the series may provide new and distinctly different but equally stable conditions. In this case, running the simulation over 200 time periods could be thought of as a new experiment. C O M P U T E R I Z A T I O N When using a computer model, we reduce the system to be studied to a symbolic represen- tation to be run on a computer. Although it is beyond this book's scope to detail the techni- cal aspects of computer modeling, some that bear directly on simulation are 1 Computer language selection. 2 Flowcharting. 3 Coding. cha06369_tn16.qxd 3/4/03 10:05 AM Page 650 SIMULATION technical note 651 4 Data generation. 5 Output reports. 6 Validation. We say more about simulation programs and languages at the end of this technical note. O u t p u t R e p o r t s General-purpose languages permit the analyst to specify any type of output report (or data) desired, providing one is willing to pay the price in programming effort. Special-purpose languages have standard routines that can be activated by one or two program statements to print out such data as means, variances, and standard deviations. Regardless of language, however, our experience has been that too much data from a simu- lation can be as dysfunctional to problem solving as too little data; both situations tend to obscure important, truly meaningful information about the system under study. S I M U L AT I N G W A I T I N G L I N E S q q q Waiting lines that occur in series and parallel (such as in assembly lines and job shops) usually cannot be solved mathematically. However, because waiting lines are often easily simulated on a computer, we have chosen a two-stage assembly line as our second simulation example. E X A M P L E : A T W O - S T A G E A S S E M B L Y L I N E Consider an assembly line that makes a product of significant physical size, such as a re- frigerator, stove, car, boat, TV, or furniture. Exhibit TN16.4 shows two workstations on such a line. The size of the product is an important consideration in assembly-line analysis and design because the number of products that can exist at each workstation affects worker performance. If the product is large, then the workstations are dependent on each other. Exhibit TN16.4, for example, shows Bob and Ray working on a two-stage line where Bob's output in Station 1 is fed to Ray in Station 2. If the workstations are adjacent so that there is no room for items in between, then Bob, by working slowly, would cause Ray to wait. Conversely, if Bob completes a product quickly (or if Ray takes longer to finish the task), then Bob must wait for Ray. In this simulation, assume that Bob, the first worker on the line, can pull over a new item to work on whenever needed. We concentrate our analysis on the interaction between Bob and Ray. E X H I B I T TN1 6.4 Station 1 Station 2 Bob Ray Two Workstations on an Assembly Line cha06369_tn16.qxd 3/4/03 10:05 AM Page 651 652 section 4 PLANNING AND CONTROLLING THE SUPPLY CHAIN O b j e c t i v e o f t h e S t u d y We would like to answer a number of questions about the assembly line from this study. A partial list would be ˇ What is the average performance time of each worker? ˇ What is the output rate of product through this line? ˇ How much time does Bob wait for Ray? ˇ How much time does Ray wait for Bob? ˇ If the space between the two stations were increased so that items could be stored there and give workers some independence, how would this affect output rates, wait times, and so on? D a t a C o l l e c t i o n To simulate this system, we need the performance times of Bob and Ray. One way to collect these data is to divide the range of performance times into segments, and then observe each worker. A simple check or tally mark in each of these segments results in a useful histogram of data. Exhibit TN16.5 shows the data collection form used to observe the performances of Bob and Ray. To simplify the procedure, performance time was divided into 10-second inter- vals. Bob was observed for 100 repetitions of the work task, and Ray was observed just 50 times. The number of observations does not have to be the same, but the more there are and the smaller the size of the time segments, the more accurate the study will be. The trade-off is that more observations and smaller segments take more time and more people (as well as more time to program and run a simulation). Exhibit TN16.6 contains the random number intervals assigned that correspond to the same ratio as the actual observed data. For example, Bob had 4 out of 100 times at 10 seconds. Therefore, if we used 100 numbers, we would assign 4 of those numbers as corresponding to E X H I B I T TN1 6.5 Data Collection Form for Worker Observation BOB RAY SECONDS TOTALS TOTALS 5­14.99 4 4 15­24.99 6 5 25­34.99 10 6 35­44.99 20 7 45­54.99 40 10 55­64.99 11 8 65­74.99 5 6 75­84.99 4 4 100 50 E X H I B I T TN1 6.6 Random Number Intervals for Bob and Ray TIME FREQUENCIES FOR RN TIME FREQUENCIES FOR RN SECONDS BOB (OPERATION 1) INTERVALS RAY (OPERATION 2) INTERVALS 10 4 00­03 4 00­07 20 6 04­09 5 08­17 30 10 10­19 6 18­29 40 20 20­39 7 30­43 50 40 40­79 10 44­63 60 11 80­90 8 64­79 70 5 91­95 6 80­91 80 4 96­99 4 92­99 100 50 cha06369_tn16.qxd 3/4/03 10:05 AM Page 652 SIMULATION technical note 653 10 seconds. We could have assigned any four numbers, for example, 42, 18, 12, and 93. However, these would be a nuisance to search for, so we assign consecutive numbers, such as 00, 01, 02, and 03. There were 50 observations of Ray. There are two ways we could assign random num- bers. First, we could use just 50 numbers (say, 00­49) and ignore any numbers over that. However, this is wasteful because we would discard 50 percent of all the numbers from the list. Another choice would be to double the frequency number. For example, rather than as- sign, say, numbers 0­03 to account for the 4 observations out of 50 that took 10 seconds, we could assign numbers 00­07 to represent 8 observations out of 100, which is double the observed number but the same frequency. Actually, for this example and the speed of com- puters, the savings of time by doubling is insignificant. Exhibit TN16.7 shows a hand simulation of 10 items processed by Bob and Ray. The random numbers used were from Appendix B, starting at the first column of two numbers and working downward. Assume that we start out at time 00 and run it in continuous seconds (not bothering to convert this to hours and minutes). The first random number is 56 and corresponds to Bob's performance at 50 seconds on the first item. The item is passed to Ray, who starts at 50 sec- onds. Relating the next random number, 83, to Exhibit TN16.6, we find that Ray takes 70 seconds to complete the item. In the meantime, Bob starts on the next item at time 50 and takes 50 seconds (random number 55), finishing at time 100. However, Bob cannot start on the third item until Ray gets through with the first item at time 120. Bob, therefore, has a wait time of 20 seconds. (If there was storage space between Bob and Ray, this item could have been moved out of Bob's workstation, and Bob could have started the next item at time 100.) The remainder of the exhibit was calculated following the same pattern: obtain- ing a random number, finding the corresponding processing time, noting the wait time (if any), and computing the finish time. Note that with no storage space between Bob and Ray, there was considerable waiting time for both workers. We can now answer some questions and make some statements about the system. For example, The output time averages 60 seconds per unit (the complete time 600 for Ray divided by 10 units). Utilization of Bob is 470 530 = 88.7 percent. Utilization of Ray is 430 550 = 78.2 percent (disregarding the initial startup wait for the first item of 50 seconds). E X H I B I T TN1 6.7Simulation of Bob and Ray--Two-Stage Assembly Line BOB RAY ITEM RANDOM START PERFORMANCE FINISH WAIT STORAGE RANDOM START PERFORMANCE FINISH WAIT NUMBER NUMBER TIME TIME TIME TIME SPACE NUMBER TIME TIME TIME TIME 1 56 00 50 50 0 83 50 70 120 50 2 55 50 50 100 20 0 47 120 50 170 3 84 120 60 180 0 08 180 20 200 10 4 36 180 40 220 0 05 220 10 230 20 5 26 220 40 260 0 42 260 40 300 30 6 95 260 70 330 0 95 330 80 410 30 7 66 330 50 380 30 0 17 410 20 430 8 03 410 10 420 10 0 21 430 30 460 9 57 430 50 480 0 31 480 40 520 20 10 69 480 50 530 0 90 530 70 600 10 470 60 430 170 cha06369_tn16.qxd 3/4/03 10:05 AM Page 653 654 section 4 PLANNING AND CONTROLLING THE SUPPLY CHAIN S P R E A D S H E E T S I M U L AT I O N The average performance time for Bob is 470 10 = 47 seconds. The average performance time for Ray is 430 10 = 43 seconds. We have demonstrated how this problem would be solved in a simple manual simula- tion. A sample of 10 is really too small to place much confidence in, so this problem should be run on a computer for several thousand iterations. (We extend this same problem further in the next section of this technical note.) It is also vital to study the effect of item storage space between workers. The problem would be run to see what the throughput time and worker utilization times are with no stor- age space between workers. A second run should increase this storage space to one unit, with the corresponding changes noted. Repeating the runs for two, three, four, and so on offers management a chance to compute the additional cost of space compared with the increased use. Such increased space between workers may require a larger building, more materials and parts in the system, material handling equipment, and a transfer machine, plus added heat, light, building maintenance, and so on. These would also be useful data for management to see what changes in the system would occur if one worker position was automated. The assembly line could be simulated using data from the automated process to see if such a change would be cost justified. q q q As we have stated throughout this book, spreadsheets such as Microsoft Excel are very useful for a variety of problems. Exhibit TN16.8 shows Bob and Ray's two-stage assembly line on an Excel spreadsheet. The procedure follows the same pattern as our man- ual display in Exhibit TN16.7. The total simulation on Excel passed through 1,200 iterations (shown in ExhibitsTN16.10 and TN16.11); that is, 1,200 parts were finished by Ray. Simulation, as an analytic tool, has an advantage over quantitative methods in that it is dynamic, whereas analytic methods show long-run average performance. As you can see in Exhibits TN16.9 and TN16.10, there is an unmistakable startup (or transient) phase. We could even raise some questions about the long-term operation of the line because it does not seem to have settled to a constant (steady state) value, even after the 1,200 items. Exhibit TN16.9 shows 100 items that pass through the Bob and Ray two-stage system. Notice the wide variation in time for the first units com- pleted. These figures are the average time that units take. It is a cumulative number; that is, the first unit takes the time generated by the random numbers. The average time for two units is the average time of the sum of the first and second units. The average time for three units is the average time for the sum of the first three units, and so on. This display could have almost any starting shape, not necessarily what we have shown. It all depends on the stream of random numbers. What we can be sure of is that the times do oscillate for a while until they settle down as units are finished and smooth the average. Exhibit TN16.10 shows the average time that parts spend in the system. At the start, the display shows an increasing amount of time in the system. This can be expected because the system started empty and there are no interruptions for parts passing from Bob to Ray. Often parts enter the system and may have to wait between stages as work-in-process; this causes delays for subsequent parts and adds to the waiting time. As time goes on, however, stability should occur unless the capacity of the second stage is less than the first stage's. In our present case, we did not allow space between them. Therefore, if Bob finished first, he had to wait for Ray. If Ray finished first, he had to wait for Bob. Exhibit TN16.11 shows the results of simulating Bob and Ray completing 1,200 units of product. Compare these figures to those that we obtained simulating 10 items by hand. Not too bad, is it? The average performance time for Bob is shown as 46.48 seconds. This is close to the weighted average of what you would expect in the long run. For Bob it is (10 × 4 + 20 × 6 + 30 × 10 etc.)/100 = 45.9 seconds. Ray's expected time is (10 × 4 + 20 × 5 + 30 × 6 etc.)/50 = 46.4 seconds. cha06369_tn16.qxd 3/4/03 10:05 AM Page 654 SIMULATION technical note 655 E X H I B I T TN1 6.8Bob and Ray Two-Stage Assembly Line on Microsoft Excel Exc el: Two-St ageAsse mbly.xlsBOB RAY AVERAGE START PERF. FINISH WAIT START PERF. FINISH WAIT AVERAGE TOTAL TIME IN ITEM RN TIME TIME TIME TIME RN TIME TIME TIME TIME TIME/UNIT TIME SYSTEM 1 93 0 70 70 0 0 70 10 80 70 80.0 80 80.0 2 52 70 50 120 0 44 120 50 170 40 85.0 100 90.0 3 15 120 30 150 20 72 170 60 230 0 76.7 110 96.7 4 64 170 50 220 10 35 230 40 270 0 67.5 100 97.5 5 86 230 60 290 0 2 290 10 300 20 60.0 70 92.0 6 20 290 40 330 0 82 330 70 400 30 66.7 110 95.0 7 83 330 60 390 10 31 400 40 440 0 62.9 110 97.1 8 89 400 60 460 0 13 460 20 480 20 60.0 80 95.0 9 69 460 50 510 0 53 510 50 560 30 62.2 100 95.6 10 41 510 50 560 0 48 560 50 610 0 61.0 100 96.0 11 32 560 40 600 10 13 610 20 630 0 57.3 70 93.6 12 1 610 10 620 10 67 630 60 690 0 57.5 80 92.5 13 11 630 30 660 30 91 690 70 760 0 58.5 130 95.4 14 2 690 10 700 60 76 760 60 820 0 58.6 130 97.9 15 11 760 30 790 30 41 820 40 860 0 57.3 100 98.0 16 55 820 50 870 0 34 870 40 910 10 56.9 90 97.5 17 18 870 30 900 10 28 910 30 940 0 55.3 70 95.9 18 39 910 40 950 0 53 950 50 1000 10 55.6 90 95.6 19 13 950 30 980 20 41 1000 40 1040 0 54.7 90 95.3 20 7 1000 20 1020 20 21 1040 30 1070 0 53.5 70 94.0 21 29 1040 40 1080 0 54 1080 50 1130 10 53.8 90 93.8 22 58 1080 50 1130 0 39 1130 40 1170 0 53.2 90 93.6 23 95 1130 70 1200 0 70 1200 60 1260 30 54.8 130 95.2 24 27 1200 40 1240 20 60 1260 50 1310 0 54.6 110 95.8 25 59 1260 50 1310 0 93 1310 80 1390 0 55.6 130 97.2 26 85 1310 60 1370 20 51 1390 50 1440 0 55.4 130 98.5 27 12 1390 30 1420 20 35 1440 40 1480 0 54.8 90 98.1 28 34 1440 40 1480 0 51 1480 50 1530 0 54.6 90 97.9 29 60 1480 50 1530 0 87 1530 70 1600 0 55.2 120 98.6 30 97 1530 80 1610 0 29 1610 30 1640 10 54.7 110 99.0 The two-stage assembly line simulation is a good example of a specially designed spreadsheet for analyzing this problem. More general simulation programs built within Excel are available. John McClain, professor of operations management at Cornell Univer- sity, has developed two simulation spreadsheets that can be used to demonstrate a variety of common systems. These spreadsheets have been included on this book's CD-ROM. The first spreadsheet, titled "LineSim.xls," is designed to analyze a simple serial production line. This is a system with a series of machines; the output of one machine goes to a storage area, which is the input to the next machine. The spreadsheet can be easily configured for different numbers of machines, different buffer sizes, and numerous processing time distributions. In addition, machine breakdowns and repairs can be modeled. The second spreadsheet, "CellSim.xls," is similar but allows machines to be arranged more generally. We thank Professor McClain for making these spreadsheets available. Exc el: LineSi m.xls Exc el: CellSim .xls cha06369_tn16.qxd 3/4/03 10:05 AM Page 655 656 section 4 PLANNING AND CONTROLLING THE SUPPLY CHAIN q q q Simulation models can be classified as continuous or discrete. Continuous models are based on mathematical equations and therefore are continuous, with values for all points in time. In contrast, discrete simulation occurs only at specific points. For exam- ple, customers arriving at a bank teller's window would be discrete simulation. The sim- ulation jumps from point to point; the arrival of a customer, the start of a service, the ending of service, the arrival of the next customer, and so on. Discrete simulation can also be triggered to run by units of time (daily, hourly, minute by minute). This is called event simulation; points in between either have no value to our simulation or cannot be com- puted because of the lack of some sort of mathematical relationship to link the succeed- ing events. Operations management applications almost exclusively use discrete (event) simulation. Simulation programs also can be categorized as general-purpose and special-purpose. General-purpose software is really language that allows programmers to build their own models. Examples are SLAM II, SIMSCRIPT II.5, SIMAN, GPSS/H, GPSS/PC, PC- MODEL, and RESQ. Special-purpose software simulation programs are specially built to simulate specific applications, such as MAP/1 and SIMFACTORY. In a specialized simu- lation for manufacturing, for example, provisions in the model allow for specifying the number of work centers, their description, arrival rates, processing time, batch sizes, quan- tities of work in process, available resources including labor, sequences, and so on. Addi- tionally, the program may allow the observer to watch the animated operation and see the quantities and flows throughout the system as the simulation is running. Data are collected, analyzed, and presented in a form most suitable for that type of application. Many software simulation programs are available. How, then, do you choose a program from a long list? The first step is to understand the different types of simulation. Then it S I M U L AT I O N P R O G R A M S A N D L A N G U A G E S E X H I B I T TN1 6.11 Results of Simulating 1,200 Units Processed by Bob and Ray BOB RAY UNIT Utilization 0.81 0.85 Average wait time 10.02 9.63 Average performance time 46.48 46.88 Average time per unit 57.65 Average time in system 103.38 E X H I B I T TN1 6.9 & 10 88 84 80 76 72 68 64 60 56 52 10 20 30 40 50 60 70 80 90 Item Seconds 100 TN16.10--Average Time the Product Spends in the System Items 110 108 106 104 102 100 98 96 94 92 90 88 86 84 82 80 120 60 180 300 420 540 660 780 900 1020 1140 240 360 480 600 720 840 960 1080 TN16.9--Average Time per Unit of Output (Finish Time/Number of Units) cha06369_tn16.qxd 3/4/03 10:05 AM Page 656 SIMULATION technical note 657 SYSTEMS MODELING CORPORATION MAKES SOFTWARE FOR SYSTEMS FROM MANUFACTURING OPERATIONS TO FAST-FOOD RESTAURANTS. MODELS DEVELOPED WITH THEIR ARENA PRODUCT CAN BE USED TO HELP ENGINEERS AND MANAGERS LOOK FOR BOTTLENECKS AND PROBLEMS IN AN EXISTING SYSTEM OR GAUGE THE CAPACITY FLOW OF A PROPOSED SYSTEM SUCH AS THE DISTRIBUTION CENTER SHOWN HERE. becomes a matter of reviewing programs on the market to find one that fits your specific needs. (See the Breakthrough Box titled "Hospital Overcrowding SolutionsAre Found with Simulation" for a successful application of a commercial program.) As a last comment on simulation programs, do not rule out spreadsheets for simulation. As you noticed, we simulated Bob and Ray on a spreadsheet in the preceding section. Spread- sheets are becoming quite user-friendly and are adding many features, such as allowing random number generation and asking what-if questions. The simplicity in using a spread- sheet for simulation may well compensate for any needed reduction in the complexity of the problem in order to use the spreadsheet. @RISK is an add-in program that works with Microsoft Excel. The program adds many useful simulation-related functions to the spreadsheet. Using @RISK automates the process of taking random values from a specified distribution function, automates the recalculation of the spreadsheet with the new random values, and captures output values and statistics. @RISK simplifies the process of building and running spreadsheet simulations.2 D E S I R A B L E F E A T U R E S O F S I M U L A T I O N S O F T W A R E Simulation software takes a while to learn to use. Once specific software is learned, the tendency is to stay with it for a long time, so the choice must be made carefully. Simulation software should 1 Be capable of being used interactively as well as allowing complete runs. 2 Be user-friendly and easy to understand. 3 Allow modules to be built and then connected. In this way models can be worked on separately without affecting the rest of the system. 4 Allow users to write and incorporate their own routines; no simulation program can provide for all needs. 5 Have building blocks that contain built-in commands (such as statistical analysis or decision rules for where to go next). 6 Have macro capability, such as the ability to develop machining cells. 7 Have material flow capability. Operations involve the movement of material and people; the program should be able to model trucks, cranes, conveyers, and so on. 8 Output standard statistics such as cycle times, utilizations, and wait times. Servi ce cha06369_tn16.qxd 3/4/03 10:05 AM Page 657 658 section 4 PLANNING AND CONTROLLING THE SUPPLY CHAIN breakthroughB R E A K T H R O U G H HOSPITAL OVERCROWDING SOLUTIONS ARE FOUND WITH SIMULATION functions, if anything, were overstaffed and that a staff reduc- tion could take place with no appreciable reduction in patient service. Staffing was not the key problem. With respect to the option of utilizing another laboratory for overflow, there were significant opportunities for improving throughput if other patients could be enticed to use another laboratory. Although the simulation did not tell him how to get the patients to use SOURCE: MICRO ANALYSIS AND DESIGN SIMULATION SOFTWARE, INC., BOULDER, CO. Thanks to increased life expectancy through improved health care coupled with shifting population demographics, hos- pitals everywhere are becoming increasingly overcrowded. Limited health care budgets are forcing hospitals to explore creative solutions. But creative solutions can be risky, so they need to be carefully evaluated. From the standpoint of cost, the earlier a solution can be evaluated and either accepted or rejected, the better. Along these lines, the outpatient laboratory at Bay Medical Center was experiencing serious capacity constraints. Adding to its difficulties, a renovation designed to improve efficiency actually added to the overcrowding problem. Dave Nall, a management engineer for Bay Medical Center, ran a study to evaluate several alternatives and make recommendations designed to reduce bottlenecks and improve patient flow through the outpatient laboratory. The objective of this study was to develop and evaluate alternative ways of reducing overcrowding at the outpatient laboratory. SOLUTION The key technology employed by Dave in conducting this analysis was computer simulation. Dave had used computer simulation numerous times in the past and had found that it was an efficient way to both gain insight into the problem and evaluate the solutions. Through discussions with managers responsible for the out- patient laboratory, Dave built a network describing the patient's flow through the laboratory as it was currently configured. Then data were collected on the times required for patients to receive the various services they might need as well as the travel time between rooms where the services were provided. From this information, Dave constructed a computer simula- tion of the baseline laboratory configuration. Dave then modified the computer simulation and used it to study issues relating to three categories of solutions to out- patient laboratory overcrowding: (1) changing staff, including both medical and administrative staff; (2) utilizing another clinic as an overflow laboratory; and (3) possible redesign of the laboratory facility itself. With respect to staffing, the computer simulation verified that the medical staff currently employed was indeed the opti- mal number. However, Dave found that the administrative an alternative laboratory, it did allow Dave to quantify the benefits of implementing policies that would increase alterna- tive laboratory usage by 5 percent, 10 percent, and so on. With respect to redesign of the existing outpatient laboratory, Dave determined that, with a relatively minor redesign of the facil- ity and a procedural change, the laboratory would become significantly more productive. Increased productivity would, of course, lead to better patient service. BENEFITS Individually, no one could have accurately guessed the impact of the different ways of addressing overcrowding at the out- patient laboratory at Bay Medical Center. Through the results of the simulation analysis and the insights gained, Dave was able to assess the relative merits of each alternative as well as predict their impact. With a small investment in Dave's time, Bay Medical Center was able to make informed decisions with an understanding of both costs and benefits. As a result, the right decisions were made, money was saved, and patients were better served. cha06369_tn16.qxd 3/4/03 10:05 AM Page 658 SIMULATION technical note 659 9 Allow a variety of data analysis alternatives for both input and output data. 10 Have animation capabilities to display graphically the product flow through the system. 11 Permit interactive debugging of the model so the user can trace flows through the model and more easily find errors.3 A D VA N TA G E S A N D D I S A D VA N TA G E S O F S I M U L AT I O N q q q The following is not intended as a comprehensive list of reasons why one should elect to use or not use simulation as a technique. Rather, we state some of the gen- erally accepted advantages and disadvantages. ADVANTAGES 1 Developing the model of a system often leads to a better understanding of the real system. 2 Time can be compressed in simulation; years of experience in the real system can be compressed into seconds or minutes. 3 Simulation does not disrupt ongoing activities of the real system. 4 Simulation is far more general than mathematical models and can be used where conditions are not suitable for standard mathematical analysis. 5 Simulation can be used as a game for training experience. 6 Simulation provides a more realistic replication of a system than mathematical analysis. 7 Simulation can be used to analyze transient conditions, whereas mathematical tech- niques usually cannot. 8 Many standard packaged models, covering a wide range of topics, are available commercially. 9 Simulation answers what-if questions. DISADVANTAGES 1 Although a great deal of time and effort may be spent to develop a model for simu- lation, there is no guarantee that the model will, in fact, provide good answers. 2 There is no way to prove that a simulation model's performance is completely reliable. Simulation involves numerous repetitions of sequences that are based on randomly generated occurrences. An apparently stable system can, with the right combination of events--however unlikely--explode. 3 Depending on the system to be simulated, building a simulation model can take any- where from an hour to 100 worker years. Complicated systems can be very costly and take a long time. 4 Simulation may be less accurate than mathematical analysis because it is randomly based. If a given system can be represented by a mathematical model, it may be bet- ter to use than simulation. 5 A significant amount of computer time may be needed to run complex models. 6 The technique of simulation, while making progress, still lacks a standardized approach. Therefore, models of the same system built by different individuals may differ widely. C O N C L U S I O N q q q We could make the statement that anything that can be done mathematically can be done with simulation. However, simulation is not always the best choice. Mathemat- ical analysis, when appropriate to a specific problem, is usually faster and less expensive. Also, it is usually provable as far as the technique is concerned, and the only real question is whether the system is adequately represented by the mathematical model. cha06369_tn16.qxd 3/4/03 10:05 AM Page 659 660 section 4 PLANNING AND CONTROLLING THE SUPPLY CHAIN Simulation, however, has nothing fixed; there are no boundaries to building a model or making assumptions about the system. Expanding computer power and memory have pushed out the limits of what can be simulated. Further, the continued development of sim- ulation languages and programs--both general-purpose programs (SIMAN, SLAM) and special-purpose programs (Process Model SIMFACTORY, Optima!)--have made the entire process of creating simulation models much easier. Parameters Properties of a simulation model that are fixed. Variables Properties of a simulation model that are allowed to vary throughout the simulation run. The results of the simulation are analyzed through these variables. Decision rules Logic that controls the behavior of a simulation. Distributions The probability distributions that are used to model the random events in a simulation. Time incrementing The process of moving through time in a simulation. Run length (or run time) The duration of a simulation in simulated time or number of events. K E Y T E R M S S O L V E D P R O B L E M S SOLVED PROBLEM 1 To use an old statistical example for simulation, if an urn contains 100 balls, of which 10 percent are green, 40 percent are red, and 50 percent are spotted, develop a simulation model of the process of drawing balls at random from the urn. Each time a ball is drawn and its color noted, it is replaced. Use the following random numbers as you desire. Simulate drawing 10 balls from the urn. Show which numbers you have used. 26768 66954 83125 08021 42613 17457 55503 36458 95457 03704 47019 05752 95276 56970 84828 05752 Solution Assign random numbers to the balls to correspond to the percentage present in the urn. RANDOM NUMBER 10 green balls 00­09 40 red balls 10­49 50 spotted balls 50­99 Many possible answers exist, depending on how the random numbers were assigned and which numbers were used from the list provided in the problem. For the random number sequence above and using the first two numbers of those given, we obtain RN COLOR RN COLOR 26 Red 17 Red 42 Red 3 Green 95 Spotted 56 Spotted 95 Spotted 83 Spotted 66 Spotted 55 Spotted For the 10 there were 1 green, 3 red, and 6 spotted balls--a good estimate based on a sample of only 10! SOLVED PROBLEM 2 A rural clinic receives a delivery of fresh plasma once each week from a central blood bank. The supply varies according to demand from other clinics and hospitals in the region but ranges cha06369_tn16.qxd 3/4/03 10:05 AM Page 660 SIMULATION technical note 661 between four and nine pints of the most widely used blood type, type O. The number of patients per week requiring this blood varies from zero to four, and each patient may need from one to four pints. Given the following delivery quantities, patient distribution, and demand per patient, what would be the number of pints in excess or short for a six-week period? Use simulation to derive your answer. Consider that plasma is storable and there is currently none on hand. PATIENT DISTRIBUTION PATIENTS PER DELIVERY QUANTITIES WEEK REQUIRING DEMAND PER PATIENT PINTS PER WEEK PROBABILITY BLOOD PROBABILITY PINTS PROBABILITY 4 0.15 0 0.25 1 0.40 5 0.20 1 0.25 2 0.30 6 0.25 2 0.30 3 0.20 7 0.15 3 0.15 4 0.10 8 0.15 4 0.05 9 0.10 Solution First develop a random number sequence; then simulate. DELIVERY NUMBER OF PATIENTS PATIENT DEMAND RANDOM RANDOM RANDOM PINTS PROBABILITY NUMBER BLOOD PROBABILITY NUMBER PINTS PROBABILITY NUMBER 4 .15 00­14 0 .25 00­24 1 .40 00­39 5 .20 15­34 1 .25 25­49 2 .30 40­69 6 .25 35­59 2 .30 50­79 3 .20 70­89 7 .15 60­74 3 .15 80­94 4 .10 90­99 8 .15 75­89 4 .05 95­99 9 .10 90­99 QUANTITY PATIENTS QUANTITY DELIVERED TOTAL NEEDING BLOOD NEEDED NUMBER WEEK BEGINNING BLOOD OF PINTS NO. INVENTORY RN PINTS ON HAND RN PATIENTS PATIENT RN PINTS REMAINING 1 0 74 7 7 85 3 First 21 1 6 Second 06 1 5 Third 71 3 2 2 2 31 5 7 28 1 96 4 3 3 3 02 4 7 72 2 First 12 1 6 Second 67 2 4 4 4 53 6 10 44 1 23 1 9 5 9 16 5 14 16 0 14 6 14 40 6 20 83 3 First 65 2 18 Second 34 1 17 Third 82 3 14 7 14 At the end of six weeks, there were 14 pints on hand. R E V I E W A N D D I S C U S S I O N Q U E S T I O N S 1 Why is simulation often called a technique of last resort? 2 What roles does statistical hypothesis testing play in simulation? 3 What determines whether a simulation model is valid? 4 Must you use a computer to get good information from a simulation? Explain. 5 What methods are used to increment time in a simulation model? How do they work? cha06369_tn16.qxd 3/4/03 10:05 AM Page 661 662 section 4 PLANNING AND CONTROLLING THE SUPPLY CHAIN 6 What are the pros and cons of starting a simulation with the system empty? With the system in equilibrium? 7 Distinguish between known mathematical distributions and empirical distributions. What infor- mation is needed to simulate using a known mathematical distribution? 8 What is the importance of run length in simulation? Is a run of 100 observations twice as valid as a run of 50? Explain. P R O B L E M S 1 CLASSROOM SIMULATION: FISH FORWARDERS This is a competitive exercise designed to test players'skills at setting inventory ordering rules over a 10-week planning horizon. Maximum profit at the end determines the winner. Fish Forwarders supplies fresh shrimp to a variety of customers in the New Orleans area. It orders cases of shrimp from fleet representatives at the beginning of each week to meet a demand from its customers at the middle of the week. Shrimp are subsequently delivered to Fish Forwarders and then, at the end of the week, to its customers. Both the supply of shrimp and the demand for shrimp are uncertain. The supply may vary as much as 10 percent from the amount ordered, and by contract, Fish Forwarders must purchase this supply.The probability associated with this variation is -10 percent, 30 percent of the time; 0 percent, 50 percent of the time; and +10 percent, 20 percent of the time. Weekly demand for shrimp is normally distributed with a mean of 800 cases and standard deviation of 100 cases. A case of shrimp costs Fish Forwarders $30 and sells for $50. Any shrimp not sold at the end of the week are sold to a cat-food company at $4 per case. Fish Forwarders may, if it chooses, order the shrimp flash-frozen by the supplier at dockside, but this raises the cost of a case by $4 and, hence, costs Fish Forwarders $34 per case. Procedure for play. The game requires that each week a decision be made as to how many cases to order of regular shrimp and of flash-frozen shrimp. The number ordered may be any amount. The instructor plays the role of referee and supplies the random numbers. The steps in playing the game are as follows: a. Decide on the order amount of regular shrimp or flash-frozen shrimp and enter the figures in column 3 of the worksheet. (See Exhibit TN16.12.)Assume that there is no opening inven- tory of flash-frozen shrimp. b. Determine the amount that arrives and enter it under "Orders received." To accomplish this, the referee draws a random number from a uniform random number table (such as that E X H I B I T TN1 6.12 Simulation Worksheet (1) (2) (3) (4) (5) (6) (7) (8) (9) Week Flash- frozen inventory Orders placed Orders received Regular Flash- frozen Available (regular and flash-frozen) Demand (800 + 100Z) Sales (minimum of demand or available) Excess Shortages 1 2 3 4 5 6 7 8 9 10 MARDI GRAS *Flash-frozen only. Regular FlashRegular Flash- frozen * Total 1. See ISM. cha06369_tn16.qxd 3/4/03 10:05 AM Page 662 SIMULATION technical note 663 in Appendix B) and finds its associated level of variation from the following random number intervals: 00 to 29 = -10 percent, 30 to 79 = 0 percent, and 80 to 99 = +10 per- cent. If the random number is, say, 13, the amount of variation will be -10 percent. Thus if you decide to order 1,000 regular cases of shrimp and 100 flash-frozen cases, the amount you would actually receive would be 1,000 - 0.10(1,000), or 900 regular cases, and 100 - 0.10(100), or 90 flash-frozen cases. (Note that the variation is the same for both regular and flash-frozen shrimp.) These amounts are then entered in column 4. c. Add the amount of flash-frozen shrimp in inventory (if any) to the quantity of regular and flash-frozen shrimp just received and enter this amount in column 5. This would be 990, using the figures provided earlier. d. Determine the demand for shrimp.To accomplish this, the referee draws a random normal de- viatevaluefromExhibitTN16.3orAppendixCandentersitintotheequationatthetopofcol- umn 6. Thus if the deviate value is -1.76, demand for the week is 800 + 100(-1.76), or 624. e. Determine the amount sold. This will be the lesser of the amount demanded (column 6) and the amount available (column 5). Thus, if a player has received 990 and demand is 624, the quantity entered will be 624 (with 990 - 624, or 366 left over). f. Determine the excess. The amount of excess is simply that quantity remaining after demand for a given week is filled. Always assume that regular shrimp are sold before the flash- frozen. Thus if we use the 366 figure obtained in e, the excess would include all the origi- nal 90 cases of flash-frozen shrimp. g. Determine shortages. This is simply the amount of unsatisfied demand each period, and it occurs only when demand is greater than sales. (Because all customers use the shrimp within the week in which they are delivered, backorders are not relevant.) The amount of shortage (in cases of shrimp) is entered in column 9. Profit determination. Exhibit TN16.13 is provided for determining the profit achieved at the end of play. The values to be entered in the table are obtained by summing the relevant columns of Exhibit TN16.12 and making the calculations. Assignment. Simulate operations for a total of 10 weeks. It is suggested that a 10-minute break be taken at the end of Week 5, allowing the players to evaluate how they may improve their performance. They might also wish to plan an ordering strategy for the week of Mardi Gras, when no shrimp will be supplied. 2 The manager of a small post office is concerned that the growing township is overloading the one-window service being offered. Sample data are collected on 100 individuals who arrive for service: TIME BETWEEN ARRIVALS SERVICE TIME (MINUTES) FREQUENCY (MINUTES) FREQUENCY 1 8 1.0 12 2 35 1.5 21 3 34 2.0 36 4 17 2.5 19 5 6 3.0 7 100 3.5 5 100 2. Average customer waiting time = 1/6 min. Average teller idle time = 4/6 min. E X H I B I T TN1 6.13 Profit from Fish Forwarders' Operations Revenue from sales ($50 × Col. 7) $___________ Revenue from salvage ($4 × Col. 8 reg.) $___________ Total revenue $___________ Cost of regular purchases ($30 × Col. 4 reg.) $___________ Cost of flash-frozen purchases ($34 × Col. 4 flash) $___________ Cost of holding flash-frozen shrimp ($2 × Col. 8 flash) $___________ Cost of shortages ($20 × Col. 9) $___________ Total cost $___________ Profit $___________ cha06369_tn16.qxd 3/4/03 10:05 AM Page 663 664 section 4 PLANNING AND CONTROLLING THE SUPPLY CHAIN Using the following random number sequence, simulate six arrivals; estimate the average customer waiting time and the average idle time for clerks. RN: 08, 74, 24, 34, 45, 86, 31, 32, 45, 21, 10, 67, 60, 17, 60, 87, 74, 96 3 Thomas Magnus, a private investigator, has been contacted by a potential client in Kamalo, Molokai. The call came just in time because Magnus is down to his last $10. Employment, however, is conditional on Magnus's meeting the client at Kamalo within eight hours. Mag- nus, presently at the Masters'residence in Kipahulu, Maui, has three alternative ways to get to Kamalo. Magnus may a. Drive to the native village of Honokahua and take an outrigger to Kamalo. b. Drive to Honokahua and swim the 10 miles across Pailolo Channel to Kamalo. c. Drive to Hana and ask his friend T. C. to fly him by helicopter to Kamalo. If option a is chosen, driving times to Honokahua are given in Distribution 1. Once at Honokahua, Magnus must negotiate with the friendly Tai natives. Negotiations always include a few Mai Tais, so if Magnus begins to negotiate, swimming becomes impossible. Negotia- tions center on how much each of the three outrigger crew members will be paid. Negotiation time, crew pay, and outrigger travel time are in Distributions 3, 4, and 5, respectively. You may assume each crew member is paid the same amount. If crew pay totals more than $10, Magnus is out of luck--trip time may then be taken to be infinity. If option b is chosen, driving times to Honokahua and swimming times are given in Distributions 1 and 6. If option c is chosen, driving times to Hana are given in Distribution 2. T. C., however, is at the airport only 10 percent of the time. If T. C. is not at the airport, Magnus will wait for him to arrive. Magnus's waiting time is given by Distribution 8. T. C. may refuse to fly for the $10 Magnus has available; Magnus puts the probability of T. C. refusing to fly for $10 at 30 percent. You may assume negotiation time is zero. If T. C. refuses, Magnus will drive to Honokahua via Kipahulu and swim to Kamalo. Helicopter flying times are given in Distribution 7. Simulate each of the three alternative transportation plans twice and, based on your simu- lation results, calculate the average trip time for each plan. Use the following random numbers in the order they appear; do not skip any random numbers. RN: 7, 3, 0, 4, 0, 5, 3, 5, 6, 1, 6, 6, 4, 8, 4, 9, 0, 7, 7, 1, 7, 0, 6, 8, 8, 7, 9, 0, 1, 2, 9, 7, 3, 2, 3, 8, 6, 0, 6, 0, 5, 9, 7, 9, 6, 4, 7, 2, 8, 7, 8, 1, 7, 0, 5 DISTRIBUTION 1: TIME TO DRIVE FROM DISTRIBUTION 2: TIME TO DRIVE FROM KIPAHULU TO HONOKAHUA (HOURS) KIPAHULU TO HANA AND VICE VERSA (HOURS) TIME PROBABILITY RN TIME PROBABILITY RN 1 .2 0­1 .5 .2 0­1 1.5 .6 2­7 1 .7 2­8 2 .2 8­9 1.5 .1 9 DISTRIBUTION 3: NEGOTIATION TIME DISTRIBUTION 4: OUTRIGGER PAY PER (HOURS) CREW MEMBER TIME PROBABILITY RN PAY PROBABILITY RN 1 .2 0­1 $2 .3 0­2 1.5 .3 2­4 3 .3 3­5 2 .3 5­7 4 .4 6­9 2.5 .2 8­9 Molokai Kamalo Pailolo Channel Honokahua Maui Hana Kipahulu 3. Option a: Total Pay Total Time $6 7 $9 7 Option b: Total Time 6.5 7.5 Option c: Total Time 5 4 Average trip time: Option a = 7; Option b = 7; Option c = 4.5. cha06369_tn16.qxd 3/4/03 10:05 AM Page 664 SIMULATION technical note 665 DISTRIBUTION 5: OUTRIGGER TRAVEL TIME DISTRIBUTION 6: TIME TO SWIM FROM FROM HONOKAHUA TO KAMALO (HOURS) HONOKAHUA TO KAMALO (HOURS) TIME PROBABILITY RN TIME PROBABILITY RN 3 .1 0 5 .2 0­1 4 .5 1­5 6 .6 2­7 5 .4 6­9 7 .2 8­9 DISTRIBUTION 7: TIME TO FLY FROM DISTRIBUTION 8: MAGNUS'S WAITING HANA TO KAMALO (HOURS) TIME AT AIRPORT (HOURS) TIME PROBABILITY RN TIME PROBABILITY RN 1 .1 0 1 .1 0 1.5 .7 1­7 2 .2 1­2 2 .2 8­9 3 .4 3­6 4 .3 7­9 4 A bank of machines in a manufacturing shop breaks down according to the following interar- rival time distribution. The time it takes one repairperson to complete the repair of a machine is given in the service time distribution: INTERARRIVAL TIME (HOURS) P(X) RN SERVICE TIME (HOURS) P(X) RN .5 .30 0­29 .5 .25 0­24 1.0 .22 30­51 1.0 .20 25­44 1.5 .16 52­67 2.0 .25 45­69 2.0 .10 68­77 3.0 .15 70­84 3.0 .14 78­91 4.0 .10 85­94 4.0 .08 92­99 5.0 .05 95­99 1.00 1.00 Simulate the breakdown of five machines. Calculate the average machine downtime using two repairpersons and the following random number sequence. (Both repairpersons cannot work on the same machine.) RN: 30, 81, 02, 91, 51, 08, 28, 44, 86, 84, 29, 08, 37, 34, 99 5 Jennifer Jones owns a small candy store she operates herself. A study was made observing the time between customers coming into the store and the time that Jones took to serve them. The following data were collected from 100 customers observed: INTERARRIVAL TIME NUMBER SERVICE TIME NUMBER (MINUTES) OF OBSERVATIONS (MINUTES) OF OBSERVATIONS 1 5 1 10 2 10 2 15 3 10 3 15 4 15 4 20 5 15 5 15 6 20 6 10 7 10 7 8 8 8 8 4 9 5 9 2 10 2 10 1 Simulate the system (all of the arrivals and services) until 10 customers pass through the system and are serviced. How long does the average customer spend in the system? UseAppendix B to obtain random numbers. 4. Average downtime = 14.5/5 or 2.9 hours. 5. See ISM. cha06369_tn16.qxd 3/4/03 10:05 AM Page 665 666 section 4 PLANNING AND CONTROLLING THE SUPPLY CHAIN 6 A professional football coach has six running backs on his squad. He wants to evaluate how injuries might affect his stock of running backs. A minor injury causes a player to be removed from the game and miss only the next game. A major injury puts the player out of action for the rest of the season. The probability of a major injury in a game is 0.05. There is at most one major injury per game. The probability distribution of minor injuries per game is NUMBER OF INJURIES PROBABILITY 0 .2 1 .5 2 .22 3 .05 4 .025 5 .005 1.000 Injuries seem to happen in a completely random manner, with no discernible pattern over the season. A season is 10 games. Using the following random numbers, simulate the fluctuations in the coach's stock of run- ning backs over the season.Assume that he hires no additional running backs during the season. RN: 044, 392, 898, 615, 986, 959, 558, 353, 577, 866, 305, 813, 024, 189, 878, 023, 285, 442, 862, 848, 060, 131, 963, 874, 805, 105, 452 7 At Tucson Mills, minor breakdowns of machines occur frequently. The occurrence of break- downs and the service time to fix the machines are randomly distributed. Management is con- cerned with minimizing the cost of breakdowns. The cost per hour for the machines to be down is $40. The cost of service repairpersons is $12 per hour. A preliminary study has produced the following data on times between successive breakdowns and their service times: RELATIVE FREQUENCY OF BREAKDOWNS Time between breakdowns (in minutes) 4 5 6 7 8 9 Relative frequency .10 .30 .25 .20 .10 .05 RELATIVE FREQUENCY OF SERVICE TIMES Service time (in minutes) 4 5 6 7 8 9 Relative frequency .10 .40 .20 .15 .10 .05 Simulate 30 breakdowns under two conditions: with one service repairperson and with two service repairpersons. Use the following random number sequence to determine time between breakdowns: RN: 85, 16, 65, 76, 93, 99, 65, 70, 58, 44, 02, 85, 01, 97, 63, 52, 53, 11, 62, 28, 84, 82, 27, 20, 39, 70, 26, 21, 41, 81 Use the following random number sequence to determine service times: RN: 68, 26, 85, 11, 16, 26, 95, 67, 97, 73, 75, 64, 26, 45, 01, 87, 20, 01, 19, 36, 69, 89, 81, 81, 02, 05, 10, 51, 24, 36 a. Using the results of the simulations, calculate (1) The total idle time for the service repairpersons under each condition. (2) The total delay caused by waiting for a service repairperson to begin working on a breakdown. b. Determine the lowest-cost approach. 7. Condition 1 Condition 2 a. (1) Idle 18 min. 76 + 134 = 210 min. (2) Delay 87 min. 0 min. b. Cost of repairperson $ 38.80 $ 77.20 Cost of machine down time $175.33 $117.33 Total cost $214.13 $194.53 Lowest cost is Condition 2. 6. See ISM. cha06369_tn16.qxd 3/4/03 10:05 AM Page 666 SIMULATION technical note 667 8 Jethro's service station has one gasoline pump. Because everyone in Kornfield County drives big cars, there is room at the station for only three cars, including the car at the pump. Cars arriving when three cars are already at the station drive on to another station. Use the following probability distributions to simulate the arrival of four cars to Jethro's station: INTERARRIVAL TIME SERVICE TIME (MINUTES) P(X) RN (MINUTES) P(X) RN 10 .40 0­39 5 .45 0­44 20 .35 40­74 10 .30 45­74 30 .20 75­94 15 .20 75­94 40 .05 95­99 20 .05 95­99 Use the following random numbers sequence: RN: 99, 00, 73, 09, 38, 53, 72, 91 How many cars go to another station? What is the average time a car spends at the station? 9 You have been hired as a consultant by a supermarket chain to answer a basic question: How many items per customer should be permitted in the fast checkout line? This is no trivial question for the chain's management; your findings will be the basis for corporate policy for all 2,000 stores. The vice president of operations has given you one month to do the study and two assistants to help you gather the data. In starting this study, you decide to avoid queuing theory as the tool for analysis (because of your concern about the reliability of its assumptions) and instead opt for simulation. Given the following data, explain in detail how you would go about your analysis stating (1) the cri- teria you would use in making your recommendation, (2) what additional data you would need to set up your simulation, (3) how you would gather the preliminary data, (4) how you would set up the problem for simulation, and (5) which factors would affect the applicabil- ity of your findings to all of the stores. Store locations: The United States and Canada Hours of operation: 16 per day Average store size: 9 checkout stands including fast checkout Available checkers: 7 to 10 (some engage in stocking activities when not at a checkout stand) 10 The saga of Joe from Chapter 16 (Problem 12, page 641) continues. Joe has the opportunity to do a big repair job for a local motorcycle club. (Their cycles were accidentally run over by a garbage truck.) The compensation for the job is good, but it is vital that the total repair time for the five cycles be less than 40 hours. (The leader of the club has stated that he would be very distressed if the cycles were not available for a planned rally.) Joe knows from experi- ence that repairs of this type often entail several trips between processes for a given cycle, so estimates of time are difficult to provide. Still, Joe has the following historical data about the probability that a job will start in each process, processing time in each process, and transi- tional probabilities between each pair of processes: PROBABILITY OF GOING FROM PROBABILITY OF PROCESSING TIME PROCESS TO OTHER PROCESSES JOB STARTING PROBABILITY (HOURS) OR COMPLETION (OUT) PROCESS IN PROCESS 1 2 3 FRAME ENGINE WORK PAINTING OUT Frame repair 0.5 0.2 0.4 0.4 -- 0.4 0.4 0.2 Engine work 0.3 0.6 0.1 0.3 0.3 -- 0.4 0.3 Painting 0.2 0.3 0.3 0.4 0.1 0.1 -- 0.8 Given this information, use simulation to determine the repair times for each cycle. Dis- play your results on a Gantt chart showing an FCFS schedule. (Assume that only one cycle 8. Avg. time in system is 35/4 or 8.75 minutes. 10. See ISM. Joe can finish the job in 15 hours according to the simulation and schedule. 9. See ISM. cha06369_tn16.qxd 3/4/03 10:05 AM Page 667 668 section 4 PLANNING AND CONTROLLING THE SUPPLY CHAIN can be worked on at a time in each process.) Based on your simulation, what do you recom- mend Joe do next? 11 "Eat at Helen's" has decided to add a drive-up window to the restaurant. Due to limited capi- tal, there is enough space for only two cars in the drive-up window lane (one being served and one waiting). Helen would like to know how many customers are bypassing her restaurant due to the limited space in the drive-up window lane. Simulate 10 cars as they attempt to use the drive-up window using the following distributions and random numbers: TIME BETWEEN SERVICE ARRIVALS TIME (MINUTES) PROBABILITY (MINUTES) PROBABILITY 1 0.40 1 0.20 2 0.30 2 0.40 3 0.15 3 0.40 4 0.15 Use the following two-digit random numbers for this problem: Arrivals: 37, 60, 79, 21, 85, 71, 48, 39, 31, 35 Service: 66, 74, 90, 95, 29, 72, 17, 55, 15, 36 12 Jane's Auto World has a policy of placing an order for 27 of the most popular model when- ever inventory reaches 20. Lead time on delivery is two weeks, and 25 automobiles are cur- rently on hand. Simulate 15 weeks'worth of sales using the following probabilities that were derived from historical information: SALES PER WEEK PROBABILITY SALES PER WEEK PROBABILITY 5 .05 10 .20 6 .05 11 .20 7 .10 12 .10 8 .10 13 .05 9 .10 14 .05 Use the following random numbers for sales: 23, 59, 82, 83, 61, 00, 48, 33, 06, 32, 82, 51, 54, 66, 55. Does this policy appear to be appropriate? Explain. A D V A N C E D C A S E : U N D E R S T A N D I N G T H E I M P A C T O F V A R I A B I L I T Y O N T H E C A P A C I T Y O F A P R O D U C T I O N S Y S T E M q q q This exercise, which uses LineSim.xls, is an opportu- nity to study the impact that variability in processing time has on the capacity of a simple serial production system. Much more complex systems could be studied, but our hope is that by studying this sim- ple system, you will gain insight that can be applied to more com- plex systems. The system we are studying is similar to the two-stage assembly line discussed in this technical note; here we look at a three-stage assembly line. In practice, assembly lines have many more work- stations, but completing an exercise with more workstations would take considerably longer. If you do not believe that your results can be generalized to a larger system, feel free to expand your study. For this study we use the Serial Line Simulator (LineSim.xls) that is included on this book's CD-ROM. This Microsoft Excel spread- sheet simulates a simple serial production line. We are indebted to John McClain at the Johnson Graduate School of Management, Cornell University, for allowing us to use his innovative spreadsheet. GOAL OF THIS EXERCISE Our goal in this exercise is that you learn firsthand how variability can impact the performance of multistage production systems. A common approach used to reduce the impact of variability is through some type of buffering mechanism. To be more specific, in our system variability exists in the amount of time that it takes to perform work at a workstation. In analyzing the system we use the average time to complete each unit, so sometimes it takes longer and sometimes less time. It probably seldom takes exactly the average time. When there is variability, production engineers put buffer stations between each workstation. These buffers allow the variability to be smoothed so that the variability in one workstation has less impact on the other workstations. An interesting question to study with simu- lation is if these buffers are eliminated, or if there are 100 units between each workstation, how would this change the performance of the system? Exc el: LineSi m.xls 11. One car bypasses. 12. See ISM. cha06369_tn16.qxd 3/4/03 10:05 AM Page 668 SIMULATION technical note 669 DETAILS OF THE EXERCISE Start with the spreadsheet as Professor McClain configures it ini- tially. Click the "Design" tab, and note that we have a three-station assembly line. The stations are named "Joe," "Next's," and "M2." There is a buffer area downstream from "Joe" with a capacity of one unit, and another downstream from "Next's" with a capacity of one unit. The way this simulation is designed, "Joe" will always have something to work on, and "M2" can always deposit finished work in a storage area. Notice that the processing time distribution is Shifted Exponen- tial with a mean of 5 and a standard deviation of 5. The shape of this distribution, described in the "Instructions" tab, shows that there is much process time variation. Answer the following question before going on to the next part of the exercise: Question 1: How many units would you expect to be able to produce over 100 time periods? Click the "Run" tab and, using the default values for "Run-In Time," "Run Length," and "Repetitions," run the simulation. Tabu- late the average utilization at each machine based on the five repeti- tions, and tabulate the mean and standard deviation of the output of the system (these data are in the "Machine" worksheet). Question 2: How many units did you actually produce per 100 time periods? Explain any difference between your simulation result and your estimate made in Question 1. Next map the impact that increased buffer inventory has on the output of the system. You can change the buffer behind "Joe" and "Next" by changing the inventory cell designated "Joe's Inventory" (this is on the "Design" worksheet) and then clicking "Make Storage Areas Like #1." Question 3: Create a graph that shows the impact of changing the buffer stock on the output of the system. Consider buffer levels that vary from 0 to a maximum of 20 units. What can you conclude from your experiment? Finally, experiment with the impact of a bottleneck in the system. Question 4: What would be the impact on system perfor- mance if "M2" had a processing time that averaged 6 time units? (Assume that "Joe" and "Next" still run at an aver- age of 5.) What happens to the inventory after "Joe" and "Next"? Does varying the size of these inventories have any impact? Question 5: What happens if instead of "M2" being the bottleneck, "Joe" is the bottleneck? Do the buffers at "Joe" and "Next" have any impact? Keep your answers brief; your entire report, including graphs, should be no longer than two double-spaced pages. S E L E C T E D B I B L I O G R A P H Y Evans, J. R., and D. L. Olson. Introduction to Simulation and Risk Analysis. Upper Saddle River, NJ: Prentice Hall, 1998. Harrington, H. J., and K. Tumay. Simulation Modeling Methods. New York: McGraw-Hill, 1999. Law, A. M., and W. D. Kelton. Simulation Modeling and Analysis. New York: McGraw-Hill, 2000. Pritsker, A. A. Introduction to Simulation and SLAM II. New York: Wiley, 1995. Winston, W. L. Simulation Modeling Using @RISK. Belmont, CA: Wadsworth, 2000. F O O T N O T E S 1 The basic formula is Z = x- , which when restated in terms of x appears as x = + Z. We then substituted Dn for x and x­ for to relate the method more directly to the sample problem. 2 See W. L. Winston, Simulation Modeling Using @RISK (Belmont, CA: Wadsworth, 1996). @RISK is a product of Palisade Corporation (http://www.palisade.com). 3 S. W. Haider and J. Banks, "Simulation Software Products for Analyzing Manufacturing Systems," Industrial Engineering 18, no. 7 (July 1986), pp. 98­103. cha06369_tn16.qxd 3/4/03 10:05 AM Page 669