Pré-visualização parcial do texto
Baixe Kelton Simulation with Arena e outras Notas de estudo em PDF para Mecatrônica, somente na Docsity!
Simulation with Arena Second lidition W. David Kelton Professor, Management Science Chair Department of Management Science and Information Systems The Pennsvlvania State University Randall P. Sadoyeski Director Applications Engineering Rockavell Sofiware, inc. Deborah A. Sadowski Senior Product Engineer Rockwell Software, inc. Ei Boston Burr Ridge, IL Dubugue. IA Madison, Wi | NewYork San Francisco St. Louis Bankok Bogota Caracas Kuala lumpur Lisbon London Madrid Mexico City Milan Montreal New Delhi Santiago Scoul Singapore Sydney Taipei Toronto Contents Chapter 1 What Is Simulation?....... 11 “1.3 Sometimes You Can't (or Shouldn' 70 Play with tho System L14 Physical Models 1.1.5 Logical (or Mathemati 1.1.6 What Do You Do with a Logi 1.2 Computer Simulation ...... 1.2.1 Popularity and Advantages 122 13 How Simulations Get Done 13.1 By Hand. 132 Programming im Gencral-Purpose Languages . 13.3 Simulation Languages 1,34 Iigh-Level Simulators [3.5 Where Arena Fils n 14 When Simulations Are Used ..... [4.1 The Farly Years... 1.4.2 The Formative Vears 1.4.3 The Recent Past... 144 The Present 1.4.5 The Future. Chapter 2 Fundamental Simulation Concepts . 21 An Example... 2.11 The Sys 212 Goals of the Study 22 Analysis Options... 22.1 Educated Guessing . 222 Queueing Theor 3 Mechanistic Simulation . 23 Pieces ofa Simulation Model. 23) Entities ... 232 Atributos 23.3 (Global) V 234 Resources... 23.5 Queues... 3.5 Chapter 4 Modeling Basic Operations and Inputs. 41 4.2 43 44 34.7 The Resource and Queuc Data Modules 3.48 Resource Animation 3.4.9 The Dispose Flowchart Module 3.4.10 Dynamic Plots 34.11 Window Dressing 34.12 The Run/Sewp Dialogs... 34.13 Fstablishing Named Vicw More on Menus, Toolbars, Drawing. and Printing 3.5.1 Menus. 35.2 Toolbars . 3.5.3 Drawing 3.54 Printing Help!. More on Ruming Models Summary and Forecast. Exercises . Model 4-1: An Electronic Assembly and Test System 4.1.1 Developing a Modeling Approach 41.2 Building the Model... 4.1.3 Running the Model 4.14 Viewing the Results. Model 4-2: The Enhanced Electronic Assembly and Test System... 42.1 Expanding Resource Representation: Schedu 4.2.2 Resource Schedules ....... 423 Resource Failures 424 Frequencies.... 42.5 Results of Model 4-2 Model 4-3: Enhancing the Animation 4.3.1 Changing Animation Queucs 432 Changing Entity Pictures 43.3 Adding Resource Pictures .. 43.4 Adding Plots and Variable: Input Analysis: Specifying Model Paramc 44.1 Delerministic vs, Random Inputs 44.2 Collecting Data . 443 Using Data .... 4,44. Fitting Input Distributions V 44.5 No Data?. 4.4.6 Nonstationary Arrival Proce: 44.7 Multivariate and Correlated Input Data Summary and Forecast. Excreises .. and Distributions the Input Analyz Chapter 5 Detailed Modeling and Terminating Statistical Analysis ..... .. 167 5.1 Model 5-1; A Generic Call Center 5.2 New Modeling Issues. Nonstationary Arriv Process... a Balking 171 72 AR 173 Submodels... VA Costing and Animation 5.2.9 Terminating or Steady-State Modeling Approach .. Building the Model . 54.1 Defining the D: 5.4.2 Submodel Creation .. 5.4.3 Increment the Time Period. 5.44 Create Arrivals and Direct to Service 5.4.5 Technical Support Calls ..... 5.4.6 Technical Support Returned Calls 54.7 Sales Calls 54.8 Order-Status Calls 5.5 Finding and Fixing Model Eirrors Model 5-2: Animating the Call Center Model... 5.7 Model 5-3: The Call Center Model for Analysis with Overall Perform mance Mcasures ... 5.7.1 Run Conditions... 5.72 Slimming Down and Speeding Up 5.7.3 Overall Performance Measures 5.8 Statistical Analysis of Output fiom Terminating 5 Time Frame of Simulatio: Strategy for Data Collection and Analysis . Confidence Intervals for Terninating System: Comparing Two Alternatives Evaluating Many Alternatives with the Process Analyzer (PAN) Searching for an Optimal Alternative with OptQuest.... and Forecasi 178 79 186 imulations Summar O Exercises EA ='e Chapter 6 Intermediate Modeling and Steady-State Statistical Analysis .... 6.1 Model 6-1: The Electronic Assembly and Test System with Part Transfers 6.1.1 Some New Arena Concepts: Stations and Transfers 6.1.2 Adding the Route Logic ... 6.1.3 Altering the Animation ..... 8.52 Model 8-5: A Tightly Coupled Production System . 86 A Few Miscellaneous Modeling Issues .. 8.6.1 Guided Transporters 8.6.2 Parallel Queue: Chapter 9 Arena Integration and Customization ......... 9.1 Model 9-1: Generating Entity Arrivals from Historical Data 92 VBA in Arcna 9.2.1 Overvicw of ActiveX Automation and VBA 9.22 Builtin Arena VBA Events 9.23 Arena's Object Model 93 Model 9-2: Presenting Arrival Choices to the User ifying the Creation Logii 9.32 Designing the VBA UsciForm 9.3.3 Displaying the Form and Setting Model Dat 94 Model 9-3: Recording and Charting Model Results in Microsoft Exc 9.4.1 Setting Up Execl at lhe Beginning of he Run... 9.42 Storing Individual Call Data Using he VBA Module 9.43 Charting the Results and Cleaning Up at the End of the Run 9.5 Creating Modules Using the Arena Professional Edition: Template 9-1 . 9.5.1 The Create ftom File Module .. 9.52 The Template Source File: Template 09-01 4pl 9.5.3 The Panel Icon and User View 9.5.4 The Module Logic and Operands 9.5.5 Uses of Templates 9.6 Summary and Forecast... 97 Excreises... Chapter 10 Continuous and Combined Discrete/Continuous Models..... 10.1 Modeling Simple Discrete/Continuous Systems 10.1.1 Model 10-1: A Simple Continuous System 1.1.2 Model 10-2: Interfacing Continuous and Discrete Logic . 10.2 Model 10-3: A Coal-Loading Operation 10.2.1 System Description. 10.22 Modeling Approach 10.2.3 Building the Model. 10.3 Continuous State-Change System: 1.3.1 Model 10-4: A Soaking Pit Furnace ... 1032 Modeling Continucusly Changing Rates 10.3.3 Arenas Approach for Solving Differential Equations 10.3.4 Building the Model. 10.3.5 Defining the Differenti Equations Using VBA 10.4 Summary and Forecast. 10.5 Exercises Chapter 11 Further Statistical Issues .... 11.1 Random-Number Gencration 11.2 Generaling Random Variates . [1.2.1 Discrete . [1.2.2 Continuous 11.3 Nonstationary Poisson Proces 11.4 Variance Reduction .. [1.4.1 Common Random Numbers 114.2 Other Methods 11.5 Sequential Sampling 11,5.1 Terminating Mod [1.5.2 Steady-State Models . 11.6 Designing and Exccuting Simulation Experiments 11.7 Exercises Chapter 12 Conducting Simulation Studies... 12.1 A Successful Simulation Study 122 Problem Formulation .. 12.3 Solution Methodology .. 124 System and Simulation Specification 12.5 Model Formulation and Construction. 12.6 Verification and Validation . 12.7 Experimentation and Analysis [2.8 Presenting and Preserving the R 12.9 Disseminating the Model. Appendix À A Functional Specification for The Washington Post. AJ Introduction .. ALI Document Organization A12 Simulation Objectivos ..... A.1.3 Purpose of the Functional Spe 14 Use ofthe Model A.1.S Mardware and Software Requirements A2 System Descriplion and Modetine Approach 4.2.1 Model Timeline... A2Z2 Presses. A23 Product Typé A2Z4 Press Packaging Lines A2.5 Tray System Erlang..... Exponential Gamma Johnson . Lognormal. Normal Poisson Triangular . Uniform Weibull Appendix E Academic Software Installation Instructions .. E.1 Aulhorization to Copy Software . E2 Installing the Arena Sofiware E3 System Requirements ... References Reference: Index CHAPTER | What Is Simulation? eeseesençea corona men cnc spnpeçd ae 4 Cuspreel 1.1.1 What's Being Modeled? Computer simulation deals with models of systems. A system is a facility or process, either actual or planned, such as: = A manufacturing plant with machines, people, transport device: and storage space. = A bank or other personal-service operation, with different Kinds of customers, servers, and facilities like teller windows, automated teller machines (ATMS), loan desks, and safety deposit boxes. = A distribution network of plants, warchouses, and transportation links. = An emergency facility in a hospital, including personnel, rooms, equipment, sup- plíes, and patient transport. = A field service operation for appliances or office equipment, with potential cus- tomers scatlered across a geographic area, service technicians with different qualifications, trucks with different parts and tools, and a centra! depot and dis- patch center. = A computer network with servers, clients, disk drives, tape drives, printers, net- working capabilities, and operators. = A frceway system of road segments, interchanges, controls, and traffic. = A central insurance claims office where a lot of paperwork is received, reviewed, copied, filed, and mailed by people and machines, = A criminal justice system of court, judges, support staff. probation officers, parole agents, defendants, plaintiffs, convicted offenders, and schedul = A chemical products plant with storage tanks, pipelines, reactor vessi way tanker cars in which to ship the finished product. = A fast-food restaurant with workers of different types, customers, equipment, and supplies. = A supermarket with inventory control, checkout, and customer service. = A theme park with rides, stores, restaurants, workers, guests, and parking lots. “ The response of emergency personnel to the occurrence of a catastrophic event. conveyor belis, s, and rail- People often study a system to measure its performance, improve its operation, or design it if it doesn't exist. Managers or controllers of a system might also like to have a readily available aid for day-to-day operations, like help in deciding what to do in a fac- tory if an important machine goes down. We'rc even aware of managers who requested that simulations be constructed but didn't really care about the final results. Their primary goal was to focus attention on understanding how their system currently worked. Often simulation analysis find that the process of defining how the system works, which must be done before you can start developing the simulation model, provídes great insight into what changes need to be made. Part of this is due to the fact that rarely is there one individual responsible for un- derstanding how an entire system works. Therc are experts in machine design, material handling, processes, ctc., but not in the day-to-day operation of the system. So as you read on, be aware that simulation is much more than just building a model and War Is SIMULATION? 5 conducting a statistical experiment. There is much to be learned at cach step of a simula- tion project, and the decisions you make along the way can greutly affect the significance of your findings. 1.1.2 How About Just Playing with the System? K might be possible to experiment with the actual physical system. For instance: = Some cities have installed entrance-ramp traffic lights on their freeway systems to experiment with different sequencing to find settings that make rush hour as smooth and safe as possible. «A supermarket nianager might try diflerent policies for inventory control and checkout personnel assignment to sec what combinations seem to be most profit- able and provide the best service, = A computer facility can experiment with diflerent network layouts and job priori- ties to see how they affect machine utilization and turnaround. This approach certainly has its advantages. If you can directly experiment with the system and know that nothing else about it will change significantly, then you're unques- tionably looking at the right thing and needn't worry about whether a model or proxy for the system faithfully mimies it for your purposes. 1.1.3 Sometimes You Can't (or Shouldn't) Play with the System In many cases, it's just too difficult, costly, or downright impossible to do physical stud- ies on the system itself. * Obviously, you can't experiment with alternative layouts of a lactory if i built. » Eveninan existing factory, it might be very costhy to change to an experimental layout that might not work out anyway. = Itwould be hard to run twice as many customers through a bank to sec what will bappen when a nearby branch closes. = Trying a new check-in procedure at an airport might initially cause a lot of people to miss their flights if there are unforeseen problems with the new procedure. = Fiddling around with emergency room staffing in a hospital clearty won't do. 's not yet In these situations, you might build a model to serve as a stand-in for studying the system and ask pertinent questions about what wouid happen in the system if you did this or that, or if some situation beyond your control were to develop. Nobody gets hurt, and your freedom to try wide-ranging ideas with the model could imcover atiractive alterna- tives that vou might not have been able to try with the real system. However, you have to build models carefully and with enough detail so that what you learn about lhe model wi!l never! be different from what you would have learned about the system by playing with it directly. This is called model validity, and we'll have more to say about il later, in Chapter 12. "Nell, hardly ever War Is SiMuLATION? 7 closed-form formula, but rather an algorithm to generate numerical answers, you still have exact answers (up to roundoff, anyway) rather than estimates that are subject to un- certainty. However, most systems that people model and study arc pretty complicated, so that valid models” of them arc pretty complicated too. For such models, there may not be exact mathematical solutions worked out, which is where simulation comes in. 1.2 Computer Simulation Computer simulation refers to methods lor studying a wide variety of models of real- world systems by numcrical evaluation using soítware designed to imitate the systems operations or characteristics, often over time, From a practical viewpoint, simulation is the process of designing and creating a computerized model of a real or proposed system for the purpose of conducting numerical experiments to give us a berter understanding of” he behavior of that system for a given set of conditions. Although it can be used to study simple systems, the real power of this technique is fully realized when we use il to study complex systems. While simulation may not be the enty tool you could use to study the model, it's fre- quently the method of choice. The reason for this is that the simulation model can be allowed to become quite complex, if needed to represent the system faithfully, and you can still do a simulation analysis. Other methods may require stronger simplifying assumptions about the system to enable an analysis, which might bring the validity of the model into question. 1.2.1 Popularity and Advantages Over the last two or three decades, simulation has been consistently reported as the most popular operations research tool: * Rasmussen and George (1978) asked M.S. graduates from the Operations Research Department at Case Western Reserve University (of which there are many since that department has been around a long time) about the value of meth- ods afler graduation, The first four methods were statistical analysis, forecasting, systems ara and information systems, all of which arc very broad and gen- eral categories. Simulation was next, and ranked higher than other more tradi- tional operations rescarch tools like linear programming and queveing theory. Thomas and DaCosta (1979) gave analysts in 137 large firms a list of tools and asked them to check off which ones they used. Statistical analysis came in first, with 93% of the Firms reporting that they use it (it's hard to imagine a large firm that wouldn't), followed by simulation (84%). Again, simulation came in higher than tools like linear programming, PERT/CPM, inventory theory. and nonlinear programming. * You cam always build a simple (maybe simplistic) model of à complicated system, but there's a good chance that it wont be valid. Lf you go ahead and analyze such a model, you may be geiting nice, clean, simple answers to the wrong questions, 8 Charter | * Shannon, Long, and Buckles (1980) survcyed members of the Operations Research Division of the American Institute of Industrial Engineers (now the Institute of In- dustrial Engineers) and found that among the tools listed, simulation ranked First in utility and interest. Simulation was second in familiarity, behind linear program- ming, which might suggest that simulation should be given stronger emphasis in academic curricula. * Forgionne (1983): Harpell, Lane, and Mansour (1989); and Lane, Mansour, and Harpell (1993) all report that, in terms of utilization oí methods by practitioners in large corporations, statistical analysis was first and simulation was second. Again, though, academic curricula seem to be behind since linear programming was more frequently taught, as opposcd to being used by practitioners, than was simulation. "Morgan (1989) revicwed many surveys ofthe above type, and reported that “heavy” use of simulation was consistentiy found. Even in an industry with the lowest re- ported use of operations research tools (motor carriers), simulation ranked first in usage. The main reason for simulation's popularity is its ability to deal with very compli- cated models of correspondingly complicated systems, This makes it a versatile and powerful tool. Another reason for simulation's increasing popularity is the obvious im- provement in performance/price ratios of computer hardware, making it ever more cost effective to do what was prohibitively expensive computing just a few years ago. Finally, advances in simulation sofiware power, Flexibility, and ease of use have moved the approach from the realm of tedious and crror-prone low-level programming to the arena of quick and valid decision making. Our guess is that simulation popularity and cffectiveness are now even greater than reported in the surveys described above, precisely due to these advances in computer hardware and software. 1.22 The Bad News However, simulation isn't quite paradise, either. Because many real systems arc affected by uncontroilable and random inputs, many simulation models involve random, or stochastic, input components, causing their output to be random 100. For example, a model of a distribution center would have arrívals, de- partures, and lot sizes arising randomly according to particular probability distributions, which will propagate through the model's logic to cause output performance measures like throughput and cycle times to be random as well. So running a stochastie simulation once is like performing a random physical experiment once, or watching the distribution center for one day —you"ll probably see something different next time, even ifyou don't change anything yourself. in many simulations, as the time frame becomes longer (like months instead of a day), most results averaged over the run will tend to settle down and become less variable, but it can be hard to determine how long is “long enough” for this to happen. Moreover, the model or study might dictaie that the simulation stop ata par- ticular point (for instance, a bank is open from 9 to 5), so running it longer to calm the output is inappropriate. 10 Carrier 1 random inputs somewhere in (he model. As noted earlier, though, stochastic models produce uncertain output, which is a fact you must consider carefully in designing and interpreting the runs in your project. 1.3 How Simulations Get Done If you've determined that a simulation of some sort is appropriate, you next have to decide how to carry it out. In this section. we'll discuss options for running a simulation, including sofiware. [31 By Hand In the beginning. people really did do simulations by hand (we'll show you just onc, which is painful enough, in Chapter 2). For instance, around 1733 a fellow by the name of Georges Louis Leclerc (who later invited into the nobility, due no doubt to his simulation prowess, as Le Compte de Buffon) described an experiment to estimate the valuc of 7. Hf you toss a necdle of length f onto a table painted with parallel lines spaced « apart (d must be = fit turos out that the needle will cross a line with probability p = 2//txd). So Figure 1-1 shows a simula- tion experiment to estimate the value of x. (Don't try this al home. or at least not with à big ncedle.) Get ho nele a pm eins or e Decide nam many tr gonive velhrg lo loss lhe necdi. ada 1 to tho countar. cit duesmtcraas a ne, leave tra counter alone. É tuterossonaneorihe ines. Compute lhe proporciona! times lhe neecle crossed a lino: = final value cf the courter Provided tharj > 0. estimate by 1 du Figure 1-1. The Buffon Needle Problem Wear Is Simutarion? 1 Though this experiment may seem pretty simple (probably cven silly) to you, there are some aspects of it that are common to most simulations: = The purpose is to estimate something (in this case, 7) whose value would be hard to compute exactly (OK, maybe in 1733 that was true). The estimate we get at the end is not going to be exactly right: i.e., ilhas some error associated with it, and it might be nice to get an ídea of how large that error is likely to be. K seems intuitive that the more tosses we make (i.e., the bigger x is), the smaller the error is ikely to be and thus the better the estimate is likely to be. In fact, you could do a seguential experiment and just kecp tossing until the prob- able error is smalt enough for you to live with, instead of deciding on the number n of tosses beforchand. We'll come back to these kinds of issues as wc talk about more interesting and help- ful simulations. (For more on the Buffon Needle Problem, as well as other such interest- ing historical curiosities, see Morgan, 1984.) In the 1920s and 1930s, statisticians began using random-number machines and tables in numenical experiments to help them develop and understand statistical theory. For in- stance, Walter A. Shewhart (the quality control pioneer) did numerical experiments by drawing numbered chips from a bow! to study the first control charts. Guinness Brewery employce W. S. Gossett did similar numerical sampling experiments to help him gain in- sight into what was going on in mathematical statistics. (To protect his job at Guinness, he published his rescarch under the pseudonym “Student” and also developed the 4 distribu- tion used widely in statistical inference.) Engincers, physicists, and mathematicians have used various kinds of hand-simulation ideas for many years on a ide variety of problems. 1.32 Programming in General-Purpose Languages As digital computers appeared in the 1950s and 1960s, people began writing computer pro- grams in general-purpose procedural languages like FORTRAN to do simulations af more complicated systems. Support packages were written to help out with routine chores like list processing, keeping track of simulated events, and statistical bookkceping. This approach was highly customizable and flexible (in terms of the kinds of models and manipulations possible), but also painfully tedious and error-prone since models had to be coded pretty much fiom serateh every time. (Plus, if you dropped your deck of cards, it could take quite a while to reconstruct your “model”) For a more detailed his- tory of discrete-event simulation languages, see Nance (1996). 1.33 Simulation Languages Special-purpose simulation languages like GPSS, SIMSCRIPT, SLAM, and SIMAN appeared on the scenc some time later and provided a much better framework for the kinds of simulations many people do. Simulation languages have become very popular and are in wide use. Nonetheless, you still have to invest quite a bit of time to learn about their features and how to use them effectively. And, depending on the user interface provided, there can