As Simple as Possible, but No Simpler: a Gentle Introduction to Simulation Modeling

We start with basic terminology and concepts of modeling, and decompose the art of modeling as a process. This overview of the process helps clarify when we should or should not use simulation models. We discuss some common missteps made by many inexperienced modelers, and propose a concrete approach for avoiding those mistakes. After a quick review of event graphs, which are a very straightforward notation for discrete event systems, we illustrate how an event graph can be translated quite directly to a computer program with the aid of a surprisingly simple library. The resulting programs are easy to implement and computationally are extremely efficient. The first half of the paper focuses principles of modeling, and should be of general interest. The second half will be of interest to students, teachers, and readers who wish to know how simulation models work and how to implement them from the ground up. 1 BACKGROUND & TERMINOLOGY We use models in an attempt to gain understanding and insights about some aspect of the real world. Attempts to model reality assume a priori the existence of some type of “ground truth,” which impartial and omniscient observers would agree upon. Let’s start off by considering the universe—the universe, for our purposes, is the set of everything in existence over all time. While there are many fascinating possibilities for discussion about the totality of the universe, we set our sights much lower in this paper, observing that there is a much greater chance of finding consensus when we focus our attention locally in time and space. We will start our study of models at the level of a system. There are many excellent resources available for those who wish to study the topic of modeling in greater depth. See, for example, Law and Kelton (2000), Banks et al. (2005), Weinberg (2001), or Nise (2004). 2 1-4244-0501-7/06/$20.00 ©2006 IEEE We define a system to be a set of elements which interact or interrelate in some fashion. Elements which have no relationship to other elements which we classify as members of the system cannot affect the system’s elements, and thus are irrelevant to our goal of studying the system. The elements that make up the system are often referred to as entities. Note that the entities which comprise a system need not be tangible. For instance, we can talk about a queueing system, which is made up of customers, a queue, and a server. The customers and server are physical entities, but the queue itself is a concept. In some cultures, people waiting for a bus mimic the concept by standing in a row. However, there are some cultures where no line forms but it is considered improper to board the bus until everybody who was there before you has done so. Systems can exhibit set ownership or membership with regard to other systems. In other words, a given system can be made up of sub-systems, and/or may in turn be a sub-system within a larger framework. A model is a system which we use as a surrogate for another system. There can be many reasons for using a model. For instance, models can enable us to study how a prospective system will work before the real system has even been built. In many cases, the cost of building and studying a model is a small fraction of the cost of experimenting with the real system. Models can also be used to mitigate risk—it is far safer to teach a pilot how to cope with wind sheer during landing on a flight simulator than by going out and practicing real landings in wind sheer conditions. Another benefit is a model’s ability to scale time or space in a favorable manner—with a flight simulator we can create wind sheer conditions on demand, rather than flying around “hoping” to encounter them. Models come in many varieties. These can include but are not limited to physical duplicates (with or without scaling) such as wind tunnel mockups; “clockwork” and cam devices such as the Antikythera mechanism (de Solla Price 1959) or fire control computers on pre-digital battleships; mathematical equations such as the equations of motion