Modelling and Simulation
Modelling and Simulation
In this tutorial, we will discuss the concept and classification of Modelling & Simulation,
their architecture, application areas, and other key ideas.
Audience
This tutorial is designed for all those readers pursing either Bachelors or Masters degree
in Computer Science. It will help them understand the basic concepts related to Modelling
& Simulation.
Prerequisites
In this tutorial, all the topics have been explained at the elementary level. Therefore, a
beginner can easily understand this tutorial. However, if readers have a prior knowledge
of computer architecture in general, it will be quite easy to grasp the concepts explained
here.
All the content and graphics published in this e-book are the property of Tutorials Point (I)
Pvt. Ltd. The user of this e-book is prohibited to reuse, retain, copy, distribute or republish
any contents or a part of contents of this e-book in any manner without written consent
of the publisher.
We strive to update the contents of our website and tutorials as timely and as precisely as
possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt.
Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our
website or its contents including this tutorial. If you discover any errors on our website or
in this tutorial, please notify us at [email protected].
1
Modelling & Simulation
Table of Contents
About the Tutorial ................................................................................................................................... 1
Audience ................................................................................................................................................. 1
Prerequisites ........................................................................................................................................... 1
2
Modelling & Simulation
3
1. Modelling & Simulation Introduction
Modelling & Simulation
Modelling is the process of representing a model which includes its construction and
working. This model is similar to a real system, which helps the analyst predict the effect
of changes to the system. In other words, modelling is creating a model which represents
a system including their properties. It is an act of building a model.
Simulation of a system is the operation of a model in terms of time or space, which helps
analyze the performance of an existing or a proposed system. In other words, simulation
is the process of using a model to study the performance of a system. It is an act of using
a model for simulation.
History of Simulation
The historical perspective of simulation is as enumerated in a chronological order.
1940: A method named Monte Carlo was developed by researchers (John von
Neumann, Stanislaw Ulan, Edward Teller, Herman Kahn) and physicists working on
a Manhattan project to study neutron scattering.
1980: During this period, PC-based simulation software, graphical user interfaces
and object-oriented programming were developed.
Step 2: Design the problem while taking care of the existing system factors and
limitations.
Step 3: Collect and start processing the system data, observing its performance
and result.
Step 4: Develop the model using network diagrams and verify it using various
verifications techniques.
4
Modelling & Simulation
Step 5: Validate the model by comparing its performance under various conditions
with the real system.
Step 6: Create a document of the model for future use, which includes objectives,
assumptions, input variables and performance in detail.
Step 8: Induce experimental conditions on the model and observe the result.
Step 2: Choose input variables and create entities for the simulation process. There
are two types of variables - decision variables and uncontrollable variables.
Decision variables are controlled by the programmer, whereas uncontrollable
variables are the random variables.
Step 5: Collect data from the real-life system to input into the simulation.
Step 8: Verify the simulation model by comparing its result with the real-time
system.
Step 10: Finally, apply these results into the real-time system.
Easy to understand: Allows to understand how the system really operates without
working on real-time systems.
Easy to test: Allows to make changes into the system and their effect on the
output without working on real-time systems.
5
Modelling & Simulation
Easy to diagnose problems: Certain systems are so complex that it is not easy
to understand their interaction at a time. However, Modelling & Simulation allows
to understand all the interactions and analyze their effect. Additionally, new
policies, operations, and procedures can be explored without affecting the real
system.
Operations are performed on the system using random number, hence difficult to
predict the result.
Additionally, it is used to study the internal structure of a complex system such as the
biological system. It is used while optimizing the system design such as routing algorithm,
assembly line, etc. It is used to test new designs and policies. It is used to verify analytic
solutions.
6
2. Modelling Concepts & Classification
Modelling & Simulation
Object is an entity which exists in the real world to study the behavior of a model.
System is the articulate object under definite conditions, which exists in the real
world.
7
Modelling & Simulation
Entities & Attributes: An entity represents an object whose value can be static
or dynamic, depending upon the process with other entities. Attributes are the local
values used by the entity.
Lists: Lists are used to represent the queues used by the entities and resources.
There are various possibilities of queues such as LIFO, FIFO, etc. depending upon
the process.
Classification of Models
A system can be classified into the following categories.
Static vs. Dynamic Simulation: Static simulation include models which are not
affected with time. For example: Monte Carlo Model. Dynamic Simulation include
models which are affected with time.
8
Modelling & Simulation
9
Modelling & Simulation
Modelling Process
Modelling process includes the following steps.
Step 1: Examine the problem. In this stage, we must understand the problem and choose
its classification accordingly, such as deterministic or stochastic.
Step 2: Design a model. In this stage, we have to perform the following simple tasks
which help us design a model:
Analyze the system features, its assumptions and necessary actions to be taken to
make the model successful.
Determine the variable names, functions, its units, relationships, and their
applications used in the model.
Solve the model using a suitable technique and verify the result using verification
methods. Next, validate the result.
Step 3: Provide recommendations after completing the entire process related to the
model. It includes investment, resources, algorithms, techniques, etc.
10
3. Modelling & Simulation VerificationModelling
& Validation
& Simulation
One of the real problems that the simulation analyst faces is to validate the model. The
simulation model is valid only if the model is an accurate representation of the actual
system, else it is invalid.
Validation and verification are the two steps in any simulation project to validate a model.
By tracing the intermediate results and comparing them with observed outcomes.
11
Modelling & Simulation
The model must be discussed with the system experts while designing.
The model must interact with the client throughout the process.
The output must supervised by system experts.
Step 2: Test the model at assumptions data. This can be achieved by applying the
assumption data into the model and testing it quantitatively. Sensitive analysis can also
be performed to observe the effect of change in the result when significant changes are
made in the input data.
Step 3: Determine the representative output of the Simulation model. This can be
achieved using the following steps:
Determine how close is the simulation output with the real system output.
Comparison can be performed using the Turing Test. It presents the data in the
system format, which can be explained by experts only.
Statistical method can be used for compare the model output with the real
system output.
Subsystem Validity: A model itself may not have any existing system to compare
it with, but it may consist of a known subsystem. Each of that validity can be tested
separately.
Internal Validity: A model with high degree of internal variance will be rejected
as a stochastic system with high variance due to its internal processes will hide the
changes in the output due to input changes.
12
Modelling & Simulation
Face Validity: When the model performs on opposite logics, then it should be
rejected even if it behaves like the real system.
13
4. Modelling & Simulation Discrete System Simulation
Modelling & Simulation
In discrete systems, the changes in the system state are discontinuous and each change
in the state of the system is called an event. The model used in a discrete system
simulation has a set of numbers to represent the state of the system, called as a state
descriptor. In this chapter, we will also learn about queuing simulation, which is a very
important aspect in discrete event simulation along with simulation of time-sharing
system.
Entities: These are the representation of real elements like the parts of
machines.
Random Number Generator: It helps to simulate different data coming into the
simulation model.
Results & Statistics: It validates the model and provides its performance
measures.
14
Modelling & Simulation
Time Slicing: It is the time defined by a model for each event until the absence
of any event.
Next Event: It is the event defined by the model for the next event to be executed
instead of a time interval. It is more efficient than Time Slicing.
Parameters
Following is the list of parameters used in the Queuing System.
Symbol Description
Denotes the arrival rate which is the number of arrivals per second
Denotes the mean service time for each arrival excluding the waiting time
Ts
in the queue
Denotes the server time utilization, both when it was idle and busy
15
Modelling & Simulation
Td Denotes the mean waiting time of the items waiting in the queue
Denotes the yth percentile which means the value of y below which x
mx(y)
occurs y percent of the time
There is an exception of utilization. Let N be the identical servers, then is the utilization
of each server. Consider N to be the utilization of the entire system; then the maximum
utilization is N*100%, and the maximum input rate is:
max =
16
Modelling & Simulation
Queuing Relationships
The following table shows some basic queuing relationships.
Tr = Tw + Ts r = w + N
17
5. Modelling & Simulation ContinuousModelling
Simulation
& Simulation
A continuous system is one in which important activities of the system completes smoothly
without any delay, i.e. no queue of events, no sorting of time simulation, etc. When a
continuous system is modeled mathematically, its variables representing the attributes
are controlled by continuous functions.
Application Areas
Continuous simulation is used in the following sectors. In civil engineering for the
construction of dam embankment and tunnel constructions. In military applications for
simulation of missile trajectory, simulation of fighter aircraft training, and designing &
testing of intelligent controller for underwater vehicles.
In logistics for designing of toll plaza, passenger flow analysis at the airport terminal, and
proactive flight schedule evaluation. In business development for product development
planning, staff management planning, and market study analysis
18
6. Modelling & Simulation Monte Carlo Simulation
Modelling & Simulation
This method was first used by scientists working on the atom bomb in 1940. This method
can be used in those situations where we need to make an estimate and uncertain
decisions such as weather forecast predictions.
The results of this method are only the approximation of true values, not the exact.
19
Modelling & Simulation
20
7. Modelling & Simulation Database
Modelling & Simulation
The objective of the database in Modelling & Simulation is to provide data representation
and its relationship for analysis and testing purposes. The first data model was introduced
in 1980 by Edgar Codd. Following were the salient features of the model.
Database is the collection of different data objects that defines the information and
their relationships.
Initially, Data Modelling was based on the concept of entities & relationships in which the
entities are types of information of data, and relationships represent the associations
between the entities.
The latest concept for data modeling is the object-oriented design in which entities are
represented as classes, which are used as templates in computer programming. A class
having its name, attributes, constraints, and relationships with objects of other classes.
Data Representation
21
Modelling & Simulation
History
The historical perspective of simulation is as enumerated in a chronological order.
The first neural model was developed in 1940 by McCulloch & Pitts.
In 1949, Donald Hebb wrote a book The Organization of Behavior, which pointed to the
concept of neurons.
In 1950, with the computers being advanced, it became possible to make a model on
these theories. It was done by IBM research laboratories. However, the effort failed and
later attempts were successful.
In 1959, Bernard Widrow and Marcian Hoff, developed models called ADALINE and
MADALINE. These models have Multiple ADAptive LINear Elements. MADALINE was the
first neural network to be applied to a real-world problem.
In 1962, the perceptron model was developed by Rosenblatt, having the ability to solve
simple pattern classification problems.
In 1969, Minsky & Papert provided mathematical proof of the limitations of the perceptron
model in computation. It was said that the perceptron model cannot solve X-OR problem.
Such drawbacks led to the temporary decline of the neural networks.
In 1982, John Hopfield of Caltech presented his ideas on paper to the National Academy
of Sciences to create machines using bidirectional lines. Previously, unidirectional lines
were used.
When traditional artificial intelligence techniques involving symbolic methods failed, then
arises the need to use neural networks. Neural networks have its massive parallelism
techniques, which provide the computing power needed to solve such problems.
Application Areas
Neural network can be used in speech synthesis machines, for pattern recognition, to
detect diagnostic problems, in robotic control boards and medical equipments.
22
Modelling & Simulation
A = {(x,A(x))| x X}
x X A(x) 0
sup x X {A(x)} = 1
Case 2: Let fuzzy set B be defined as A = {(3, 0.3), (4, 0.7), (5, 1), (6, 0.4)}, then
its standard fuzzy notation is written as A = {0.3/3, 0.7/4, 1/5, 0.4/6}
Any value with a membership grade of zero doesnt appear in the expression of the set.
The following figure depicts the relationship between a fuzzy set and a classical crisp set.
23