





Estude fácil! Tem muito documento disponível na Docsity
Ganhe pontos ajudando outros esrudantes ou compre um plano Premium
Esta página não é visível na pré-visualização
Não perca as partes importantes!






Proceedings of the 1995 Winter Simulation Conference ed. C. Alexopoulos, K. Kang, W. 1?. Lilegdon, and D. Goldsman
Andrew F. Seila
Terry College of Business The University of Georgia Athens, Georgia 30602-6255, U.S.A.
The purpose of this tutorial is to introduce the ba- sic concepts of simulation, specifically discrete event simulation. Reasons for using simulation as a tool for decision making are presented, along with the process of conducting a simulation study. Types of available simulation software and statistical problems and con- siderations in simulation are also reviewed.
Computer simulation is the focus of the Winter Simu- lation Conference. This tutorial presents the author’s view of this subject and thus represents his experience and interests. Over the past several years, excellent introductory tutorials have appeared in the Proceed- ings (Thesen and Travis 1991, Shannon 1992, Gogg and Mott 1993, Pidd 1994). The reader is referred to these for alternative views of the subject of simula- tion. The term “simulation” has been used to mean quite a number of things. Usually it refers to a realization of a representation of some larger, more complex ac- tivity. For example, engineers build simulations of physical systems such as a ship’s flow through water. Aircraft pilots are trained on flight simulators which are physical devices that recreate the response of the craft to various actions the pilot might take, and allow the pilot to learn how to control the aircraft. Video games can be considered simulations. Physical sYs- tems such as manufacturing systems as well as more abstract systems such as computer networks can be simulated on a digital computer. All of these sim- ulations use a model to represent the behavior of a system that may or may not exist and that is gener- ally much larger, costlier and more complex than the model. The model may be physical, as in the cases of the aircraft simulator, or it may just be represented as a computer program, as in the case of the manu-
facturing and computer network simulations. In all cases, the key idea is that the simulation is an alter- native realization that approximates the system, and in all cases the purpose of the simulation is to analyze and understand the system’s behavior under various alternative actions or decisions. A simulation in its simplest form is just a sam- pling experiment that is performed using a model. In all of the examples in the previous paragraph, we can think of the simulation as sampling the behav- ior of the model. In some cases, such as the aircraft simulation, the sampling is done continuously over time; in others, such as the manufacturing systems and computer net works, the sampling is done only at certain points in time. In this paper, the term simu- lation is used to refer to a sampling experiment that is performed on a digital computer, and also to the numerical, statistical and programming methodology associated with this activity.
A system is a set of interacting components, or en- tities. Generally, the components work together to achieve some objective. Systems we commonly en- counter include hospitals, airport check-in and board- ing facilities, telecommunications systems such as the telephone net work, highways and the criminal justice system. These systems are large and complex, and would be difficult and expensive to experiment with directly. A model is an abstract and simplified repre- sent at ion of a s yst em. The model represents the most import ant system components, and the way in which they interact. A stochastic model is a model whose behavior cannot be predicted with certainty, but is subject to randomness. Most models that are an- alyzed using simulation are stochastic. The descrip- tion of these models includes probability y distributions for the values of variables that cannot be known with certainty. In manufacturing systems, for example, the times when machines will breakdown, or the lengths
8 Seila
of time required to repair the machines are usually unknown. In computer communications systems, the number of packets that will be transmitted and ex- actly when they will be transmitted are also random. In both cases, the model must describe the proba- bilistic structure of these processes,
Simulation has been used to analyze a very large variety of system. For evaluating the performance of manufacturing systems, simulation has come to be the dominant methodology, and special modeling tools and simulation software have been developed just for application to these systems. The confer- ence has a special track just for manufacturing ap- plications and another track for general applications. Other systems that have been simulated include transportation systems (railroad, naval, highways and air transportation), computer/communications systems (multiuser, multitasking computer systems, computer net works, telephone net works), military systems (warfare, logistics, personnel), agricultural systems (harvesting, logistics), public service systems (hospitals and other medical delivery systems, pub- lic health systems, emergency vehicle dispatch, police dispatch and other parts of the criminal justice sys- tem, hazardous waste management and nuclear power safety), and business processes (financial and other business transaction systems) among others. Simu- lation is a methodology that is not specific to any particular application areas, but can be applied to any system that can be modeled using the modeling concepts that we will discuss later.
All simulations are developed to determine system performance under alternative designs or environ- ments, with the objective of optimally designing or operating the system. For example, we might want to determine if it is cost-effective to purchase a high- volume computer-cent rolled manufacturing machine. If the machine will eliminate a bottleneck and in- crease the production rate substantially, then we should buy it, but if it just transfers the bottleneck to another place, without increasing the overall produc- tion rate then we should not buy it, A simulation will allow us to estimate the production rate under both decisions without having to experiment with the real system.
2.2 Implementing and Evaluating Decisions
All systems have parameters that define the quanti- tative and qualitative characteristics of the system. These parameters can define, for example, the num- ber of trunk lines in a communications system, the arrival rate for calls, the mean number of busy trunk lines, or the mean number of calls waiting. We can classify parameters into two classes: input parame- ters and output parameters. The number of trunk lines and the arrival rate of calls, which are examples of input parameters, must be specified in order to pro- vide enough information for the simulation program to operate. Decisions may be represented by the values of some input parameters. For example, if we set the number of trunk lines to 7, then we have decided to oper- ate the system with 7 trunk lines. In other cases, decisions may be represented by system logic. For example, we may wish to compare two policies for equipment replacement or preventative maintenance. These policies must be specified within the logic of the system, not by just setting some parameter val- ues. Thus, decisions may be either part of the model input or model structure. Output parameters are values that are determined by the system and usually are used to specify the per- formance of the system. For example, the mean num- ber of busy trunk lines tells us how heavily utilized the system is. Other output parameters might be the mean waiting time for calls entering the system, or the mean number of calls waiting in the system. All of these output parameters tell us somethig about how well the system is operating, and therefore are the “answers” that we seek from the model. When the simulation is running, it will produce data that can be used to estimate the values of these output parameters.
2.3 Simulation vs. Other Alternatives An alternative to simulation is to use probability the- ory to compute the output parameters. Both are le- gitimate methods to analyze system performance, but there are fundamental and important differences be- tween them. Mathematical analysis is limited to a small number of relatively simple systems; whereas, simulation can be used to analyze any system whose operation can be described in terms of a model. When the mathematical approach is used, parame- ters can usually be computed exactly, at least to the precision of the computer. Simulation, on the other hand, requires that we first collect data from the sim- ulation run, then use the data to estimate the output parameter. Thus, the best answer we can get from
the model should be usable as a tool to evaluate decisions concerning the system.
model to analyze decisions relating to the sys- tem, we must decide exactly what simulation runs will be done, using which parameter val- ues and how long these runs will be. This, of course, depends upon what decisions are to be evaluated. The result of this step will be a de- sign for the simulation production runs in the next step.
iment al design has been set, the actual produc- tion runs can be performed to produce the out- put data. At this point, this step is usually a me- chanical act. It is usually a good idea to store the data from the production runs on files so the runs will not have to be repeated if there is a change in the procedures used to analyze the data.
data is available and the statistical procedures have been specified, we need to apply them to actually compute the performance measures we seek. It is important here to compute not only point estimates for these performance measures but also error estimates, since the estimates are computed from a sample of data and therefore are subject to sampling variation.
have been successful, we are ready to use the results to determine which decisions provide su- perior performance. Sometimes the model will be used for a one-time decision; other times, it is being developed so it will be available for other decisions, perhaps on a regular basis. When this is the case, the model must be implemented so it can be used routinely in the future.
umenting the project, especially the model, is overlooked. However, this may be the most im- port ant part of the process. Even if further use of the model is not anticipated, it is important to document the model so that any future ap- plications of the model can be effected without having to recreate it.
Since the systems that are modeled are generally quite complex and dynamic, i.e., they change with
time, special techniques have been developed to rep- resent their structure and dynamics. In this section, we will discuss the characteristics of these models, classify them and review some of the methods for rep- resenting system models.
The system state is a collection of variables and pos- sibly other information from the model that includes all information necessary for the model to operate over time. The major task in developing a simulation of a system is to come up with a model that captures the behavior of the system. Thus, the modeler must first select a representation for the system state. In some simple models, the system state could be a col- lection of variables. For example, in a simple queue- ing system, variables representing the number of cus- tomers in the queue and the status of the servers (idle or busy) would suffice. More realistic models, how- ever, need a much richer representation for the system state in order to capture the complexity of the model. Most modeling approaches use the “entity-attribute- set” paradigm. In this view, a system is composed of entities. For example, in a hospital, the entities might be patients, doctors, nurses, operating rooms, X-ray equipment, etc. Entities have attributes which are items of information about the entity. A patient may have the attributes age, sex and type of illness. A doctor might have the attributes specialty and shift worked. Attributes are used to determine how the entities interact when the system model operates. A set (or queue) is a collection of entities, usually enti- ties waiting for some resources so that their progress through the system can continue. Normally, sets be- long to the system as a whole. For example, a hospital may have a set of patients waiting for surgery, a set of patients waiting for treatment in the emergency room and a set of patients occupying rooms. The system state then includes all entities present, the values of all of their attributes, their set memberships and any other system variables that may be defined.
The modeler has two choices about how time can be represented - as a continuous variable or as a dis- crete variable. Some modeling approaches treat time as a continuous variable and express system changes in terms of a set of differential equations involving the system state variables. In this case, the simula- tion program numerically integrates the differential equations to compute the sample path of the system
state. See chapter 15 of Pritsker (1986) for further discussion of continuous models. For many systems the system state changes only at discrete points in time when an event occurs to cause a change. For example, in a hospital, the sys- tem state changes when a new patient arrives. The number of patients waiting for admission increases by 1, the newly arrived patient may join a queue and other actions occur to accommodate the patient. Other events that cause system changes are, for example, the discharge of a patient, the placing of a patient in a room, the beginning of surgery for a patient, the end of surgery, etc. Between any two events, the sys- tem state remains constant even though people are moving and services are being rendered. Thus, to represent the changes in the system, we only need to describe the actions that occur in each event. This type of model is called a discrete-event system model. It is possible to have a combined discrete-event and continuous system model in which the values of some variables are controlled by differential equations and for others the values are changed at the moments that
occurs to cause the steel to begin heating, but the temperature of the steel is determined by a set of differential equations that depend upon the amount of power applied, the starting temperature and some random variables. The event involving pouring the steel cannot occur until the steel exceeds a specified temperature. Thus, the variables that change contin- uously over time and those that change only in events are interdependent. In practice, even variables that change continu- ously are evaluated only at discrete, usually equally- spaced, points in time since digital computers cannot represent continous functions numerically. Thus, we can consider even the continuous-time approach to be a special case of the discrete-event metlfodology, with the events denoting an updating of the values of the continuous variables.
4.1.2 Discrete-Event System Modeling
The dominant simulation modeling methodology is discrete-event system modeling. There are three ba- sic ways this methodology is implemented in practice: the event scheduling approach, the activity scan- ning approach and the process interaction approach. While each of these methods has its own special way of looking at system dynamics, every discrete-event system can be modeled using any of the three meth- ods. The event scheduling approach represents model changes by identifying all types of events that may
usually involving some action on an entity. For exam- ple, in a hospital, “surgery” is an activit y which starts with the “beginning of surgery” event and ends with the “end of surgery” event. The time between the two events is the duration of the activity “surgery”. Thus, for the activity scanning approach, our atten- tion is on the activities that occur over time, rather than the events that start and end these activities. Some people find this a more natural way to think about system operations. A process is a sequence of events and/or activi- ties that are logically connected. For example, we can think of the process by which the surgery patient receives treatment in a hospital. First, the patient arrives to the hospital, then waits for surgery to be- gin. Next comes the surgery activity, followed by a recuperation period and ending with the discharge event. All events and act ivit ies relate to the same patient, but the patient processes for individual pa- tients interact because patients are waiting for the same resources (admission clerks, doctors, operating rooms, etc.). Many modelers find this the most nat- ural point of view for modeling, and most simulation languages adopt this approach. Models can be expressed verbally or diagrammati- cally. Diagrammatic descriptions attempt to provide the same information as verbal descriptions but in a visual form. Event graphs (Schruben 1995) show the relationships among events using the event scheduling approach; GPSS flow diagrams are a visual represen- tation of the process interaction approach as imple- mented by the GPSS simulation language. Visual model descriptions use the brain’s visual informa- tion processing capabilities, which are older and more highly developed than our verbal information process- ing capabilities, to quickly describe the model.
Simulation software must be able to represent the sys- tem state and its changes over time. All discrete event simulation software packages have several character- istics in common. First, they are all able to represent
Introduction to Simulation 13
of these systems work in the same way. The im- portant characteristic is that the user uses icons on screen to represent the system in a way that closely resembles the physical system. Thus, the model ab- straction phase is largely obscured. Several of these packages are demonstrated in tutorials in the Soft- ware/Modelware tracks.
5.5 Simulation Program Verification
Regardless of the type of software that is used to im- plement the model, the analyst must make sure that the structure and logic of the implemented simulation corresponds to the intended model. For simulation programs this “debugging” process is complicated by the complexity of the system and the dynamic and uncertain nature of the operation of the program. Several techniques have been adopted to help the pro- cess. Random variates can be replaced with specific, known values so the response of the model can be pre- dicted exactly and the program output can be com- pared to the predicted response. As with most com- plex software, simulation programs should be devel- oped in modules that can be tested individually (the divide-and-conquer approach). Finally, animations of the systems are often useful to compare program op- erations to expected model behavior.
6 ANALYSIS METHODOLOGY
Probability and statistics play a dominant role in sim- ulation methodology. In this section we will review the statistical methods that are very important in the practice of simulation.
6.1 Input Data Analysis
The term “input data analysis” refers to techniques to estimate parameters of the populations associated with random variables in the model and fit distribu- tions to data collected from these populations in the real system. Most of the simulation texts in the bib- liography contain complete descriptions of parameter estimation and distribution fitting methods. Often the modeler is only interested in finding, from among all possible candidates, the distribution that best fits a given set of data. Software is available to do this testing automatically. The Unifit II tutorial in the Software/Modelware track is one such package.
6.2 Random Variate Generation
ticularly concerned with the details of random vari- ate generation techniques because all simulation soft- ware includes procedures to generate random variates from the commonly known distributions. All random variate generation methods begin with one or more independent, identically distributed uniform random variates between 0.0 and 1.0, and produce the de- sired random variate by making a transformation on this uniform random variate. Uniformly distributed random variates are generated by generating a uni- formly distributed integer between O and m, where m is an upper limit related to the representation of integers on the computer. Therefore, the correctness and reliability of random variates depends fundamen- tally on the quality of the random number generator. Most popular simulation packages use random num- ber generators that have been thoroughly tested and documented.
6.3 Output Data Analysis
in which one long output process is divided into sev- eral shorter segments whose sample means are com- puted and treated as a collection of mutually inde- pendent observations. This method has proved to be one of the most successful and robust techniques for computing reliable confidence intervals for the pro- cess mean from stationary output data. The tutorial on output analysis later in this volume reviews this
14 Seila
method as well as other techniques for analyzing sim- ulation data and provides additional references for this topic. Frequently, the objective of data analysis is to com- pare two or more system designs to determine which provides better performance. Statistical methods for ranking and comparison are available to determine the reliability of the rankings produced by the sim- ulations. System optimization methods seek to ad- just one or more decision variables to optimize sys- tem performance. This is a new but promising area of research.
The ultimate reward from developing a simulation model is to gain information that can be used to im- prove decision making with the system. In practice, the process of developing a simulation model is costly. Most models are a team effort and take months or even a year or more to develop. Costs are usually measured in tens of thousands of dollars. So, most organizations want the results of such an investment to be preserved. Some simulations are developed to be used on an on-going basis for system management and control by managers who were not necessarily in- volved with the original model development. In this case, documentation involves creating user’s manuals and training managers to use the model. In all cases, documentation of the model makes sure the benefits of the model-building investment are not lost after the initial model use.
ACKNOWLEDGMENTS
Many people and many books and papers on the sub- ject of simulation have influenced this paper. I would especially like to thank Professors George Fishman, Vlatko ~erid, Mike Pidd, David Goldsman and Chris- tos Alexopoulos for many helpful discussions.
REFERENCES
Princes Road, Windermere, Cumbria, UK. Fishman, G. S. 1978. Principles of Discrete Event Simulation. New York: John Wiley and Sons. Gogg, T. J., and J. R. A. Mott. 1993. Introduction
laghasemi, E. C. Russell, and W. E. Biles, 9-17. Institute of Electrical and Electronics Engineers, San Francisco, California. Law, A. M., and W. D. Kelton. 1991. Simulation Modeling and Analysis, Second Edition. New York: McGraw-Hill. Pagden, C. D., R. E. Shannon, and R. P. Sadowski.
vers, MA: Boyd & Fraser. Seila, A. F. 1988. SIMTOOLS: A Software Toolkit for Discrete Event Simulation in Pascal. Simulation
Shannon, R. E. 1992. Introduction to Simulation. In Proceedings of the 1992 Winter Simulation Con- ference, ed. J. J. Swain, D. Goldsman, R. C. Crain and J. R. Wilson, 65–73. Institute of Electrical and Electronics Engineers, San Francisco, California. Thesen, A. and L. E. Travis. 1991. Introduction to Simulation. In Proceedings of the 1991 Win- ter Simulation Conference, ed. B. L. Nelson, W. D. Kelton, and G. M. Clark. Institute of Electrical and Electronics Engineers, San Francisco, Califor- nia.