1 Introduction To Digital Simulation: 1.1 Types of Systems

Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

1 Introduction to digital simulation

A computer simulation is an attempt to model a real-life or hypothetical situation on a


computer so that it can be studied to see how the system works
[http://en.wikipedia.org/wiki/Simulation#Computer_simulation]. More practically,
simulation can be used to forecast the future behavior of a system, and determine what we
can do to influence that future behavior. In order to analyze, study and improve the behavior
of a system using digital simulation techniques it is necessary first to develop a conceptual
model that describes the dynamics of interest, and then after to code it in a simulator in order
to be able to analyze the results.
Although digital simulation is a relatively recent technique, the use of the simulation
methodology is a very old activity, and it could be said that it is inherent to the process of
learning of the human beings. This is the case, for example, of a small boy playing with
objects that are not more than scaled representations of real objects. In order to be able to
understand the reality and all the complexity that a system can entail, it has been necessary to
construct artificial objects and to experiment dynamically with them before interacting with
the real system. Digital simulation can be seen like the electronic equivalent to this type of
experimentation.
These techniques had recently acquired an importance more and more relevant in the resolution
of different kinds of practical problems; it is usual to find applications in fields such as
engineering, economy, medicine, life’s sciences as well as ecology and social sciences. In fact,
education in the development of mathematical models and its execution in digital simulators are
present in many university degrees.

1.1 Types of systems

To be able to introduce the concept of model of a system, as well as to present the types of
model simulation and its principal characteristics, it is indispensable to define previously
what we do understand for a system.
A system can be defined as a set of objects or entities that interact in order to reach a
specified objective. If we plant to study the number of available cashiers in a supermarket in
Introduction

order to offer a good service to its customers, the entities of the system would consist in the
customers waiting to be attended and the cashiers that carry out the service. The state of a
system can be defined as the minimum set of necessary variables to characterize or describe
all those aspects of interest of the system in a specific instant of time. We denominate those
variables state variables. It is worth reiterating that the number and kind of these variables
depend on the goals of our study. So, in the described system example, state variables could
be the state of each one of the cashiers (available or occupied in this case), and the total
number of customers in the supermarket.
Paying attention to the relation between the evolution of state variables and the time
independent variable, systems can be classified in continuous and discrete.
 Continuous systems: state variables progress in a continuous way along time. An example
of this kind of systems is the temperature’s evolution in a room for any period of time, or
the evolution of liquid level in a tank (Figure 1.1).

Figure 1.1 Evolution of a continuous system


 Discrete systems: are characterized because state variables of the system change in a certain
instant or instants sequence, and stay constant the rest of the time. The instants sequence in
which the state of the system can present a change, obey normally to a periodic pattern or to
a random pattern. If the instant sequence obeys to a random pattern the systems can be
further characterized as discrete-event system.

EXEMPLE 1.1 Motorway toll


A known process that illustrates the discrete behavior is a motorway toll, where cars arrive in
a random way and in which it is desired to foresee the waiting time of the cars in the queues
as a function of the number of opened ticket offices. Considering, for example, the changes
in the state of a ticket office (available, occupied), it can be observed that the time instants in
which the state change appears, obey to a random pattern. In figure 1.2 (left) it has been
represented the state of one of the ticket offices of a motorway toll, indicating with the value
Introducción a las técnicas de simulación digital - 3

1 that the ticket office is available, and with value 0 that the ticket office is occupied. In
contrast, in the same figure (right) the evolution of the control signal generated by a
computer with a constant period of sampling is represented.

Figure 1.2 Evolution of discrete systems

1.2 Types of models

There exist other alternatives to the digital simulation to imitate the behavior of a system.
Typical alternatives are the construction of a scaled prototype of the real system, the
analogical representation of the system by electric circuits, or the analogy with other
physical or biological systems, as it could be the drugs experimentation in animals to foresee
their effects in humans.
Many of these techniques have in common that in order to imitate the behavior of a system; they
require the description of the internal characteristics of the system. The description of the
characteristics of interest of a system is known as model of the system, and the abstraction
process to obtain this description is known as modeling.
There exist many types of models (physical models, mental models, symbolic models) to
represent the systems of interest. However, since one of the objectives to which models are
going to be developed is its use in digital simulation environments, it is necessary that the
models formalize the knowledge of the system in a concise way, with no ambiguities (unique
interpretation), and that could be processed by a computer. These characteristics determine the
use of the symbolic mathematics models as a tool to represent the dynamics of interest of any
system in a simulation digital environment. The symbolic mathematical models map the
existing relations between the physical properties of the system that is pretended to be modeled
in the corresponding mathematics structures. The kind of mathematical formalization used is
going to depend on the intrinsic characteristics of the dynamics of interest that would be
represented.
Although it exist a great diversity of methodologies for the development of mathematical
models of physical systems, the following considerations should be taken into account to
guarantee an efficient representation of the real system:
Introduction

 A model is always developed from a group of approximations and hypothesis and,


consequently, represents the reality only partially.
 A model is constructed for a specific finality and should be formulated in order to be useful
to that aim.
 A model must be necessarily a compromise between simplicity and necessity to collect all
the essential aspects of the system in study.
So, a good model should preserve both properties:
 Represent adequately those characteristics of the system that are of our interest.
 Be an abstract representation of the reality sufficiently simple to facilitate its maintenance,
adaptation and re-utilization.
In general, model complexity involves a trade-off between simplicity and accuracy of the
model. Occam's Razor is a principle particularly relevant to modeling; the essential idea being
that among models with roughly equal predictive power, the simplest one is the most desirable.
While added complexity usually improves the fit of a model, it can make the model difficult to
understand and work with, and can also pose computational problems
Attending to the characteristics that should possess a good model, as well as the objectives of
the simulation study, the simulation models can to be classified in:

Static models versus dynamic models


Static models usually represent the system in a certain instant of time; and the advance in time is
not considered in its formulation. For illustrative purposes, consider a simple mathematical
model of material quantity in a warehouse in an industry:
Stock = Initial Stock + Entrance Material – Material Consumed by the Industry.
These kinds of models are very useful when the system is in equilibrium (does not progress
with respect to time). If the equilibrium point is changed altering one or more system values,
the model allows deducing the rest of values, but does not show the way they changed.
In contraposition to static models, dynamic models allow to compute how the variables of
interest progress with respect to time. An example o a dynamic model is the evolution of
material in a stock that depends on the entrance and exit flows. The following equations
describes mathematically the evolution of a stock supposing that the variables of interest
make progress in a continuous or discrete way respectively, where Fi and Fo represent
entrance and exit flows from the warehouse.
dS t 
 Fi (t )  Fo (t )
dt
Introducción a las técnicas de simulación digital - 5

S  k  1  S  k   Fi  k   Fo  k 

Deterministic models versus stochastic (probabilistic) models


A deterministic model is one in which every set of state variables is uniquely determined by
parameters in the model and by sets of previous states of these variables. Therefore,
deterministic models perform the same way for a given set of initial conditions. Conversely, in a
stochastic model, randomness is present, and state variables are not described by unique values,
but rather by probability distributions.

Continuous versus discrete models


Continuous models are characterized for presenting the evolution of the variables of interest in a
continuous way. In general we use Ordinary Differential Equations (ODE) to model the
evolution of a property respect time, or Partial Differential Equations (PDE) to model also the
evolution with respect to space.
In an analogous way to the definition of continuous models, discrete models are characterized
for representing the evolution of variables of interest in a discrete way.
It is important to notice from the previous models classification, that it is possible to describe a
continuous system by means of a discrete model and the other way round. The decision of using
a continuous model or a discrete model depends on the particular objectives of each study and
not so much on the system characteristics. So, for example, it is possible to find continuous
models of flow of cars in a motorway where it has been chosen a continuous formulation when
the objectives of the study are centered, for example, in evaluating the evolution of traffic in the
presence of an accident, where the movement of a particular car lacks of importance.
Discrete-event models are dynamic, stochastic and discrete models where the state variables
change its value in non periodic instants of time. These instants of time correspond with the
occurrence of an event. So, an event is defined as the instantaneous action that can change
the state of the model.

1.3 Advantages, disadvantages and pitfalls of simulation

Simulation is widely used and increasingly popular for studying complex systems. Its
advantages have been already presented in [LAW00].
 Most complex, real-world systems with stochastic elements cannot be accurately
described by a mathematical model that can be evaluated analytically. Thus, a simulation
is often the only type of investigation possible.
Introduction

 Simulation allows us to estimate the performance of an existing system under some


projected set of operating conditions.
 Alternative proposed system designs or operating policies can be compared via
simulation to see which best meets a specified requirement.
 In a simulation we can maintain much better control over experimental conditions that
would generally be possible when experimenting with the system itself.
In summary, simulation is a candidate and safe technique to:
 To answer questions of the type “what it would happen if we made this change in…”
 Contribute to the reduction of the inherent risk in the decision making process.
On the other hand, some disadvantages are:
 Simulation models are often expensive and time-consuming to develop.
 The large volume of numbers produced by the simulation study or the persuasive impact
of a realistic simulation often created a tendency to place greater confidence in a study’s
results than is justified. If a model is not a valid representation of a system under study,
the simulation results, no matter how impressive they appear, will provide useful
information about the system. A simulation model cannot be better than the data used. In
relation to this point we should remember the saying: “Garbage in, garbage out”
[http://en.wikipedia.org/wiki/Garbage_in,_garbage_out].
When managing a simulation study through its various phases, we should watch for a
number of potential pitfalls [LAW86, MARI97, DEVI04]:
 Using simulation when an analytic solution is appropriate.
 Failure to have a well-defined set of objectives at the beginning of the simulation study.
Sometimes, the project is ill-defined, or started too ambitious and simplifications or
assumptions are made along the way. This may result in the simulation becoming the
goal instead of a means.
 Simulation alone cannot solve problems. It provides the managers with potential
solutions to solve the problems. It is up to the responsible individuals to actually
implement the proposed changes. For this reason, it is important to communicate with
them on a regular basis. This is essential to ensure that the correct problem is solved, to
promote model credibility and to promote that potential solutions are implemented.
 Lack of knowledge of simulation methodology and also of probability and statistics. A
significant percentage of the people involved in simulation modeling are only trained in
how to use a particular simulation-software package, which we feel is definitely not
sufficient. The simulation analyst must also be knowledgeable in simulation
Introducción a las técnicas de simulación digital - 7

methodology (validating a model, selecting input probability distributions, designing and


analyzing simulation experiments, etc.) and also probability and statistics (probability
distributions, confidence intervals, etc.).
 Inappropriate level of model detail. A very common pitfall for beginning simulation
analysts is to have an excessive level of model detail. Modeling each aspect of the
system will seldom be required to make effective decisions, and will also be infeasible
due to time, money, or computer constraints.
 Failure to collect good system data. Simulation cannot give accurate results when the
input data are inaccurate. If one is modeling an existing system, it is important to collect
data on key system random variables. Often this is not done because of project time
constraints or because the simulation analyst does not realize that this is an important
consideration.
 Model building and data-acquisition often takes more time than planned, which results in
too little time for proper verification and validation, this can led to wrong conclusions
regarding the correctness of the model.
 Belief that so-called "easy-to-use" simulation packages require a significantly lower
level of technical competence. For most real-world problems, programming in some
form is required. Furthermore, the simulation modeler will still have to be concerned
with formulating the problem, collecting and analyzing data, validating the model,
modeling system randomness, designing and analyzing simulation experiments, and
managing the overall simulation project. These activities require a significant amount of
technical competence and experience.
 Misuse of animation. Animation is useful for communicating the essence of a simulation
model to decision-makers, for debugging simulation computer programs, and for
suggesting improved operational procedures for a system. However, the efficacy of a
particular system design should be decided by applying appropriate statistical procedures
to carefully designed simulation experiments.
 Replacing a probability distribution by its mean or using an inappropriate probability
distribution. A common (but unfortunate) practice in simulation modeling is to represent
a source of system randomness by the perceived mean value rather than its
corresponding probability distribution.
 Failure to perform a proper output-data analysis. A stochastic simulation model does not
produce the true performance measures for the model; it only produces statistical
estimates of them. A simulation analyst must properly choose the simulation run length,
the length of the warm-up period (if one is appropriate), and the number of independent
model replications (each using different random numbers).
Introduction

 The model’s use is extended to address questions for which it was never designed or to
extrapolate results beyond the original scope of the model. The initial set of objectives
and the model simplifications hypothesis must always kept in mind when experimenting
with the model.

1.4 Life cycle of a simulation project

Consensus exists between the people involved in the development and maintenance of
simulation models, that simple models are preferable to complex models. In spite of it, in
many projects, the simulation models usually are large and complex. It is necessary to
emphasize that the excess of complexity in the models not only has impact in the
computational performance; it also affects other aspects, such the time needed for the model
development, its maintenance, verification and validation.

Although it seems a very intuitive concept, it does not exist a definition or measurement of
complexity accepted as a standard by the scientific community. Some authors relate, for
example, the complexity of the model with “the level of detail” and others with “the spread
of the system”. Some of the advantages about working with simple models are:
 They are easier to implement, to validate and to analyze.
 It is easier and, in certain way, less painful, to reject a simple model that has, for
example, a design error than a complex model in which a considerable number of hours
of expert personnel have been invested.
 It is easier to adapt a simple model than a complex model if the conditions or hypotheses
of operation on the real system change.
 The overall project life cycle time is usually smaller.
A simulation project is dynamic by nature. The results that are obtained as it is developed,
expose new problems as well as inherent limitations to the studied system, this can force to
reconsider the initial project orientation. Moreover, the motivation of the client can also
change throughout the project, as a consequence of the obtained results or by external factors
to the own project. In order to be successful in such dynamic environment, it is necessary to
use a correct methodology.
Next table shows the set of phases of a simulation project. Although it can seem that the
development of a simulation process is a sequential process, actually is not thus. For
example, if the obtained model of simulation does not surpass the validation phase (phase 5);
it is possible that it would be necessary to modify the conceptual model as well as the
simulation model.
Introducción a las técnicas de simulación digital - 9

Phase Description
Formulation of the problem Definition of the problem and setting of the objectives.
Design of the conceptual Specification of the elements of the system and its
model interactions considering the objectives of the problem.
Data collection Identification, to gathering and analyzing the data
needed for the study.
Construction of the model Construction of the simulation model based on the
conceptual model and on the collected data.
Verification and validation Verification that the running model behavior agrees with
the conceptual model and collected data. Checking that
the simulation model represents the real system.
Experimentation and analysis Analyzing the results of the simulation with the purpose
of detecting problems in the real system and/or
recommending improvements.
Documentation Providing documentation on the conducted study.
Implementation Putting in practice the decisions taken with the support
of the simulation study.
Table 1.1.Phases of a simulation project

 Formulation of the problem: the specification of objectives is one of the most important
tasks of a simulation project. All modeling and analysis activities should be focused on
the objectives. If the objectives are not clear or are little concrete, there exists the danger
of not approaching the problem correctly and being incapable to respond to the
generated expectations. Consequently, it is necessary, in the initial phase of any
simulation project to identify the objectives and to formalize them so that they are
precise, reasonable, comprehensible and measurable. These objectives will serve as
guide throughout the project.
 Design of the conceptual model: once the objectives of the project are simulation, the
temptation to initiate the construction of the simulation model immediately should be
avoided. This option leads generally to simulation models with multiple lagoons and
difficult maintenance. For this reason it is advisable to formulate or to specify the
simulation model being used at a level of abstraction (conceptual model) superior to the
level of the simulation code. The conceptual model specifies the more important
structural relations of the system that is tried to simulate and, consequently, constitutes a
means of dialogue and coordination between the different departments or involved
groups.
Introduction

Also it corresponds to this phase to specify what results or statistics we hoped to obtain
from the simulation model in order to respond to the questions formulated in the
definition of objectives.
 Data collection: in general, it is recommended to question all the information and data
available. Which is the source? , when was obtained? , how was gathered? , has this one
sense? , we have insufficient data or it is excessive?. In order to obtain good results it is
an indispensable condition having good data. Unfortunately, in many cases this is not
possible. Even so, an answer to the raised questions is required and is necessary to carry
out reasonable hypotheses in collaboration with the end user. If the data is limited or its
quality is doubtful it is advisable to be prudent at the time of drawing conclusions on the
base of the simulation results. Even in the cases in which there are problems with the
data; the acquired knowledge and the results obtained in the simulation study are
valuable information for the decision making.
 Construction of the model: often, the effort concentrates more in the construction of the
model than in the resolution of the problem. Obtaining a running model becomes
erroneously a high-priority objective. The dominant motivation should be the
understanding of the problem and the obtaining of solutions. In order to advance more
quickly in the attainment of these objectives, is recommendable to construct in the first
place one or several simplified models that characterize the most essential parts of the
system.
 Verification and validation: The presumption of innocence — being innocent until
proven guilty — is a legal right that the accused in criminal trials has in many modern
nations. It states that no person shall be considered guilty until finally convicted by a
court. On the contrary, in the simulation field, the experience recommends to suppose
that all models are incorrect unless the opposite is proven. One of the main dangers of
the simulation is “to forget the real world and to accept without repairs the results of the
model”. In order to have a reasonable guarantee that the simulation model represents the
reality, and as a consequence, to make strategic decisions or operational being based on
the results, it is absolutely necessary to verify and to validate the simulation model.
The verification consists of checking that the model is executed correctly and according
to the specifications (conceptual model). The validation consists of checking that the
theories, hypothesis as well as suppositions, are correct. If the process still does not exist,
is necessary to contrast the results with experts on the process of interest to check if the
model behaves as expected. Validation is a difficult task since there is not a standard
way to solve validation problems [DIJK99]. Though this book does not talk much about
validation, we should not ignore the importance of this phase.
Introducción a las técnicas de simulación digital - 11

 Experimentation and analysis: it consists of experimenting with the model with the
objective to carry out inferences that allow making decisions with greater security. In
this stage techniques such as the reduction of the variance or the design of experiments
are often used.
In general, the most important added value of a simulation study is not the final results
obtained with the model. The most valuable result is the insight knowledge acquired in
the analysis process that gives justified qualitative and/or quantitative arguments in favor
or against the different raised design options.
 Documentation: it is important to maintain an updated document that reflects the state of
the project. Therefore, the document will evolve and it will become mature in parallel
with the simulation project. The objectives pursued with the documentation are:

1. To show the state of the project at a given moment. In this manner, all the technical
or directive personnel who are related to the project have up to date information on
its progress.
2. To inform about the whole project (final document).
3. To facilitate the reusability of the model in the cases in which a possible interest in
its future use is anticipated.

It is recommended to collect in the documentation the following information:


introduction, objectives, hypothesis, physical description of the system, description of
the conceptual and simulation models, verification and validation, analysis of the
conducted experiments and conclusions.
 Implementation: taking decisions as a result of a simulation study is understood as
implementation. It is very important for a simulation analyst to interact with the
appropriate managers on a regular basis. If the manager or decision makers understand
and agree with the model’s assumptions, they are more likely to accept the model as
valid and use the results to take decisions [LAW86].

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy