I
The Fundamentals
CHAPTER 1
Introduction
“The purpose of computing is insight, not numbers.”
–Richard Hamming
The purpose of this chapter is to motivate the importance of simulation as a scientific tool. The chapter also introduces some essential concepts which are needed in the rest of the book. The lifecycle of a simulation study is described here along with an example. In addition, the advantages and limitations of simulation are discussed. The reader is urged to carefully read this chapter before moving on to the next ones.
1.1 THE PILLARS OF SCIENCE AND ENGINEERING
Science and engineering are based on three pillars: observation, experimentation, and computation. Figure 1.1 uses the analogy of a table with three legs to show the relationship between these three tools and science and engineering. Historically, humans have been using observation and experimentation to acquire new knowledge (i.e., science) and then apply the newly acquired knowledge to solve problems (i.e., engineering). This approach is very effective because the actual phenomenon (system) is observed (utilized). However, as the complexity increases, observation and experimentation become very costly and cumbersome. This is when computation becomes the only tool that can be used.
The outcome of an observational study is a set of facts. For example, if a burning candle is covered with a glass cup, it will eventually go out on its own. This is the observation. Scientists had to do research before they could realize the reason for this phenomenon. The reason is that there is still oxygen inside the glass cup which will eventually be used up by the flame. Once all the oxygen is consumed, the candle goes out.
On the other hand, experimentation is the act of making an experiment. An experiment is a physical setup. It is performed to make measurements. Measurements are raw data. Experimentation is popular among scientists.
Figure 1.1
The three pillars of science and engineering: Observation (O), Experimentation (E), and Computation (C). By analogy, the table needs the three legs to stay up.
The output of the system is recorded as it occurs in an observational study. Furthermore, the response of the system is not influenced in any way and the environment in which the system operates cannot be manipulated. In experimentation, however, we can manipulate the environment in which the system operates and influence the response of the system.
A computation is a representation of the phenomenon or system under study in the form of a computer program. This representation can be as simple as a single mathematical equation or as complex as a program with a million lines of code. For mathematical equations, there are tools like calculus and queueing theory that can be used to obtain closed-form solutions. If a closed-form solution, on the other hand, cannot be obtained, approximation techniques can be used. If even an approximate solution cannot be obtained analytically, then computation has to be used.
In this book, we are interested in the use of computation as a tool for understanding the behavior of systems under different conditions. This goal is achieved by generating time-stamped data which is then statistically analyzed to produce performance summaries, like means and variances. The type of computation performed by the program which generates this type of data is referred to as event-oriented simulation. Developing such simulation programs is an art. The good news is that you can acquire this skill by practice. Therefore, it is recommended that you carefully study the examples in the book.
1.2 STUDYING THE QUEUEING PHENOMENON
Consider the situation in Figure 1.2 where five people have to wait in a queue at the checkout counter in a supermarket. This situation arises because there is only one cashier and more than one person wants to have access to him. This phenomenon is referred to as queueing. Let us see how observation, experimentation, and computation can be used to study this phenomenon.
Figure 1.2
A queue at a checkout counter in a supermarket. A phenomenon arising whenever there is a shared resource (i.e., the cashier) and multiple users (i.e., the shoppers).
If we want, for example, to estimate the average time a customer spends at the checkout counter, we should manually record the time each customer spends waiting to be served plus the service time. Therefore, for each customer, we have t...