Section 1: Getting Started with Numerical Simulation
In this section, the basic concepts of simulation modeling are addressed. This section helps you to understand the fundamental concepts and elements of numerical simulation.
This section contains the following chapters:
Chapter 1, Introducing Simulation Models
Chapter 2, Understanding Randomness and Random Numbers
Chapter 3, Probability and Data Generating Processes
Chapter 1: Introducing Simulation Models
A simulation model is a tool capable of processing information and data and predicting the responses of a real system to certain inputs, thus becoming an effective support for analysis, performance evaluation, and decision-making processes. The term simulation refers to reproducing the behavior of a system. In general, we speak of simulation both in the case in which a concrete model is used and in the case in which an abstract model is used that reproduces reality using a computer. An example of a concrete model is a scale model of an airplane that is then placed in a wind tunnel to carry out simulated tests to estimate suitable performance measures.
Although, over the years, physicists have developed theoretical laws that we can use to obtain information on the performance of dynamic systems, often, the application of these laws to a real case takes too long. In these cases, it is convenient to construct a numerical simulation model that allows us to simulate the behavior of the system under certain conditions. This elaborated model will allow us to test the functionality of the system in a simple and immediate way, saving considerable resources in terms of time and money.
In this chapter, we're going to cover the following main topics:
- Introducing simulation models
- Classifying simulation models
- Approaching a simulation-based problem
- Dynamical systems modeling
Important Note
In this chapter, an introduction to simulation techniques will be discussed. In order to deal with the topics at hand, it is necessary that you have a basic knowledge of algebra and mathematical modeling.
Introducing simulation models
Simulation uses abstract models built to replicate the characteristics of a system. The operation of a system is simulated using probability distributions to randomly generate system events, and statistical observations are obtained from the simulated system. It plays a very important role, especially in the design of a stochastic system and in the definition of its operating procedures.
By not working directly on the real system, many scenarios can be simulated simply by changing the input parameters, thus limiting the costs that would occur if this solution were not used and, ultimately, reducing the time it would take. In this way, it is possible to quickly try alternative policies and design choices and model systems of great complexity by studying their behavior and evolution over time.
Important Note
Simulation is used when working on real systems is not convenient due to high costs, technical impossibility, and the non-existence of a real system. Simulation allows you to predict what happens to the real system if certain inputs are used. Changing these input parameters simulates different scenarios that allow us to identify the most convenient one from various points of view.
Decision-making workflow
In a decision-making process, the starting point is identifying the problematic context that requires a change and therefore a decision. The context that's identified is then analyzed in order to highlight what needs to be studied for the decisions that need to be made; that is, those elements that seem the most relevant are chosen, the relationships that connect them are highlighted, and the objectives to be achieved are defined. At this point, a formal model is constructed, which allows us to simulate the identified system in order to understand its behavior and to arrive at identifying the decisions to be made. The following diagram describes the workflow that allows us to make a decision, starting from observing the problematic context:
Figure 1.1 – Decision-making workflow
This represents a way of spreading knowledge and involves various actors. Constructing a model is a two-way process:
- Definition of conceptual models
- Continuous interaction between the model and reality by comparison
In addition, learning also has a participatory characteristic: it proceeds through the involvement of different actors. The models also allow you to analyze and propose organized actions so that you can modify the current situation and produce the desired solution.
Comparing modeling and simulation
To start, we will clarify the differences between modeling and simulation. A model is a representation of a physical system, while simulation is the process of seeing how a model-based system would work under certain conditions.
Modeling is a design methodology that is based on producing a model that implements a system and represents its functionality. In this way, it is possible to predict the behavior of a system and the effects of the variations or modifications that are made on it. Even if the model is a simplified representation of the system, it must still be close enough to the functional nature of the real system, but without becoming too complex and difficult to handle.
Important Note
Simulation is the process that puts the model into operation and allows you to evaluate its behavior under certain conditions. Simulation is a fundamental tool for modeling because, without necessarily resorting to physical prototyping, the developer can verify the functionality of the modeled system with the project specifications.
Simulation allows us to study the system through a wide spectrum of conditions so that we can understand how representative the model is of the system that it refers to.
Pros and cons of simulation modeling
Simulation is a tool that's widely used in a variety of fields, from operational research to the application industry. This technique can be made successful by it overcoming the difficulties that each complex procedure contains. The following are the pros and cons of simulation modeling. Let's start with the concrete advantages that can be obtained from the use of simulation models (pros):
- It reproduces the behavior of a system in reference to situations that cannot be directly experienced.
- It represents real systems, even complex ones, while also considering the sources of uncertainty.
- It requires limited resources in terms of data.
- It allows experimentation in limited time frames.
- The models that are obtained are easily demonstrable.
As anticipated, since it is a technique capable of reproducing complex scenarios, it has some limitations (cons):
- The simulation provides indications of the behavior of the system, but not exact results.
- The analysis of the output of a simulation could be complex and it could be difficult to identify which may be the best configuration.
- The implementation of a simulation model could be laborious and, moreover, it may take long calculation times to carry out a significant simulation.
- The results that are returned by the simulation depend on the quality of the input data: it cannot provide accurate results in the case of inaccurate input data.
- The complexity of the simulation model depends on the complexity of the system it intends to reproduce.
Nevertheless, simulation models represent the best solution for the analysis of complex scenarios.
Simulation modeling terminology
In this section, we will analyze the elements that make u...