Simulation 101

by Roger D. Smith, BTG Inc.

Published in SISO Simulation Technology Magazine.

BACKGROUND

Definition. Simulation is the process of designing a model of a real or imagined system and conducting experiments with that model. The purpose of simulation experiments is to understand the behavior of the system or evaluate strategies for the operation of the system. Assumptions are made about this system and mathematical algorithms and relationships are derived to describe these assumptions - this constitutes a "model" that can reveal how the system works. If the system is simple, the model may be represented and solved analytically. A single equation such as DISTANCE = (RATE * TIME) is an analytical solution representing the distance traveled by an object at constant rate for a given period of time.

However, problems of interest in the real world are usually much more complex than this. In fact, they may be so complex that a simple mathematical model can not be constructed to represent them. In this case, the behavior of the system must be estimated with a simulation. Exact representation is seldom possible in a model, constraining us to approximations to a degree of fidelity that is acceptable for the purposes of the study. Models have been constructed for almost every system imaginable, to include factories, communications and computer networks, integrated circuits, highway systems, flight dynamics, national economies, social interactions, and imaginary worlds. In each of these environments, a model of the system has proved to be more cost effective, less dangerous, faster, or otherwise more practical than experimenting with real system.

For example, a business may be interested in building a new factory to replace an old one, but is unsure whether the increased productivity will justify the investment. In this case, simulation would be used to evaluate a model of the new factory. The model would describe the floor space required, number of machines, number of employees, placement of equipment, production capacity of each machine, and the waiting time between machines. Simulation runs would then evaluate the system and provide an estimate of the production capacity and the costs of a new factory. This type of information is invaluable in making decisions without having to build an actual factory to arrive at an answer.

Simulations are usually referred to as either discrete event or continuous, based on the manner in which the state variables change. Discrete event refers to the fact that state variables change instantaneously at distinct points in time. In a continuous simulation, variables change continuously, usually through a function in which time is a variable. In practice, most simulations use both discrete and continuous state variables, but one of these is predominant and drives the classification of the entire simulation.

History. One of the pioneers of simulation concepts was John von Neumann. In the late 1940ís he conceived of the idea of running multiple repetitions of a model, gathering statistical data, and deriving behaviors of the real system based on these models. This came to be known as the Monte Carlo method because of the use of randomly generated variates to represent behaviors that could not be modeled exactly, but could be characterized statistically. von Neumann used this method to study the random actions of neutrons and the effectiveness of aircraft bombing missions. These methods wee first used in industry to determine the maximum potential productivity of factories.

Concepts for Discrete Event Simulations (DES) were developed in the late 1950's. The first DES-specific language was developed at General Electric by K.D. Tocher and D.G. Owen. The General Simulation Program (GSP) was created to study manufacturing problems at General Electric and was shared with the rest of the world at the Second International Conference on Operations Research.

Purpose. Simulation allows the analysis of a systemís capabilities, capacities, and behaviors without requiring the construction of or experimentation with the real system. Since it is extremely expensive to experiment with an entire factory to determine its best configuration, a simulation of the factory can be extremely valuable. There are also systems, like nuclear reactions and warfare, which are too dangerous to carry out for the sake of analysis, but which can be usefully analyzed through simulation.

Advantages and Disadvantages. When conducting a simulation or contriving a model, certain limitations must be acknowledged. Primary among these is the ability to create a model that accurately represents the system to be simulated. Real systems are extremely complex and a determination must be made about the details that will be captured in the model. Some details must be omitted and their effects lost or aggregated into other variables that are included in the model. In both cases, an inaccuracy has been introduced and the ramifications of this must be evaluated and accepted by the model developers. Another limitation is the availability of data for describing the behavior of the system. It is common for a model to require input data that is scarce or unavailable. This issue must be addressed prior to the design of the model to minimize its impact once the model is completed.

Both of the limitations listed above lead to a simulation that provides approximate results or that describes system behavior statistically. For this reason, simulation usually provides measurements of general trends, rather than exact data for specific situations or individuals. A simulation would be hard pressed to determine which piece of material will be ruined by a milling machine. But, it would be an excellent tool for determining the impacts of machine failure on factory productivity, using known statistical distributions for the failures of many machines.

SIMULATION USERS

Simulation is used in nearly every engineering, scientific, and technological discipline. In the fifty years since its formal definition it has been adapted for a wide variety of applications. Today, the techniques are employed in the design of new systems, the analysis of existing systems, training for all types of activities, and as a form of interactive entertainment.

Design. Designers turn to simulation to allow them to characterize or visualize a system that does not yet exist and for which they wish to achieve the optimum solution. Manufacturing models may describe the capacities of individual machines, the time to prepare material for operation, time to transfer materials from one machine to another, the effects of human operators, and the capacities of waiting queues and storage bins. Simulations of new pieces of equipment may evaluate their performance, stress points, transportability, human interfaces, and potential hazards to the environment. Business process models may evaluate the flow of paperwork through a company to determine where redundancies or unnecessary operations are located, allowing them to redesign operations such that the same work can be performed with a fraction of the labor and time that has evolved into the process. Major airlines use simulations to study complex routing patterns for large numbers of aircraft traveling around the world. The intention is to identify routes that serve the most passengers and use the fewest assets most efficiently. Factors such as aircraft capacity, ground time, flight time, scheduled maintenance, crew availability, weather effects, and unscheduled downtimes are all considered in such models.
 
Simulation of a Manufacturing Production Line

Courtesy of Imagine That Inc.


 

Analysis. Analysis refers to the process of determining the behavior or capability of a system that is currently in operation. Unlike design, analysis may be supported by the collection of data from the actual system to establish model behaviors. The model can then be modified to determine the optimum configuration or implementation of the real system. A computer network can be described by the volume of traffic carried, the capacity of the lines and switches, performance of a router, and the path taken from sender to receiver. Based on measured message patterns, the network can be configured to deliver the most information using the shortest or most reliable paths available. In the health care industry, the models are used to schedule doctors, staff, equipment, and patients in an effort to improve service times and reduce costs. Social trends can be simulated to determine what services or goods will be needed at a given time by a specific sector of society. The impacts of aging, health, family composition, and a host of other factors can be predicted from an appropriate social model.
 
Traffic Flow Simulation

Courtesy of Intergraph Computers Inc.


 

Training. Training simulations recreate situations that people face on the job and stimulate the trainee to react to the situation until the correct responses are learned. These devices produce well prepared personnel without the expense of making mistakes on the job. Perhaps the best known of these are flight simulators, which model dangerous environments where life threatening situations can be mitigated through learning in a non-lethal environment. Military simulators replicate the performance characteristics of the aircraft, instruments in the cockpit, effects of weapons, support from other combat systems, communications with other pilots, and terrain over which the events occur. Similar systems are used to train the captains of large ocean-going ships to dock without destroying both a real ship and a real dock. Entire mock-ups are made of nuclear power control centers to teach operators how to respond to emergency situations and to identify potential hazards before a crisis occurs. Modern medical equipment is so expensive and scarce that simulations have been constructed to allow interns and nurses to practice, develop, and certify their skills without having to schedule training time on the real equipment, competing for its use by real patients.
 
Flight Simulator

Courtesy of SEOS International Ltd.

Entertainment. The entertainment industry makes wide use of simulation to create games that are enjoyable and exciting to play. These contain many, but usually not all of the components of simulation described in this article. Arcade games, computer games, board wargames, and role playing games all require the creation of a consistent model of an imaginary world and devices for interacting with that world. These simulations often appear very similar to training simulations, but differ in that their purpose is entertainment rather than practice for real-world events. This fact allows game developers the freedom to modify the laws of physics and other behaviors, rather than accurately capturing their real world equivalents. Advances in these simulations, together with the prevalence of the Internet, are allowing the creation of multi-player on-line games that pit players against multiple opponents around the world. Though the purpose of these simulations is entertainment, the technical challenges faced by their developers are just as daunting as those in the other categories.
 
Tank Simulator Computer Game

Courtesy of MaK Technologies, Interactive Magic, and Zombie Studios


 

All of the areas listed here allow systems to be understood without incurring the expenses or dangers of working with the actual system. As the benefits of simulation become more widely understood, and the complexity of modern problems increases, the user base for simulation will grow rapidly.

COMPUTER TECHNOLOGIES

Simulations, like all other applications, leverage technologies from other areas of science. The algorithms and information required to create a very complex model usually exceed the power of the available computer hardware and software necessary to run it. However, simulation programs are growing larger and more useful as a direct result of advancements in computer science. A few of the most useful technologies are described here.

Networks. The ability to distribute a simulation across a network of computers leads to more detailed, scaleable, complex, and accessible models. Distributed message passing and event synchronization allow a single problem to be addressed with a large number of traditional computers on a network. The proliferation of standardized networks between computerized machinery, communications systems, decision aids, and other tools has created an environment in which simulations can drive "real world" computers directly and extract data from them in real time. This has blurred the boundary between real and simulated worlds.

Parallel Computing. Parallel computing provides many of the advantages of networked computers, but adds the characteristic of close coupling. Some problems can be divided into many thousands of separate processes, but the interactions between them are so frequent that a general-purpose network for delivering messages introduces delays that greatly extend the execution time of the simulation. In these cases, parallel computers can provide the close coupling between processors and memory that allow the simulation to execute much more quickly.

Artificial Intelligence. The representation of human and group behavior has become essential in some parts of the simulation community. Techniques developed under the umbrella of artificial intelligence and cognitive modeling can solve some of these problems. Simulations are including more finite state machines, expert systems, neural networks, case based reasoning, and genetic algorithms in an attempt to represent human behavior with more fidelity and realism.

Computer Graphics. Simulation data lends itself very well to graphic displays. Factories and battlefields can be represented in full 3D animation using virtual reality techniques and hardware devices. Graphical user interfaces provide easy model construction, operation, data analysis, and data presentation. These tools place a new and more attractive face on simulations that previously relied on the mindís eye for visualization. This often leads to greater acceptance of the models and their results by the engineering and business communities.

Databases. Simulations can generate a large amount of data to be analyzed and often require large volumes input data to drive the models. The availability of relational and object oriented databases has made the task of organizing and accessing this information much more efficient and accessible. Previously, model developers were required to build their own storage constructs and query languages, a distraction from the real focus of the simulation study.

Systems Architecture. Simulations can be grouped into families, or domains, where the same software architectures can be used to model entire classes of problems. This recognition in transaction-based simulation has lead to the creation of a host of simulation products that encapsulate functionality used to model everything from factory operations to aircraft routing schedules.

World Wide Web. The expansion of the Internet and the World Wide Web has led to experiments with simulations that are either distributed through the Internet or accessible from it. These simulations make use of standard protocols and allow the distribution of a simulation across multiple computers that are not directly controlled on a dedicated network. Simulation users do not necessarily need to own the computers that run the simulation. Instead, the user may access a simulation-specific machine connected to the Web, provide input values, control model execution, and receive the results without ever having their own copy of the simulation software or the computers necessary to run it.

CONCLUSION

Like all computer applications, modeling and simulation is expanding as a result of improvements in computer hardware and software technologies. There was a time when simulation was performed entirely by dedicated personnel using expensive, dedicated computer systems. We have reached a point where significant simulations can be performed on personal computers by experts in a specific field, without the need for a staff of simulation specialists.

The manufacturing, research, planning, and training communities have discovered that answers to their questions and insights into their problems can be obtained economically and quickly from simulation models. As the world evolves into an information society, more and more business, recreation, and government activities will be defined in the form of digital data which can be organized, analyzed, and predicted using simulation. This power will drive the wide adoption of simulation by all forms of business and government.

REFERENCES

This article was derived from a longer paper by the author for the year 2000 edition of the Encyclopedia of Computer Science. That paper is available on the web at: http://www.modelbenders.com/encyclopedia/.