0% found this document useful (0 votes)
22 views91 pages

Ebs Cohost

Uploaded by

Andres Felipe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
22 views91 pages

Ebs Cohost

Uploaded by

Andres Felipe
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 91

Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved.

May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

Chapter 1
SYSTEMS CONCEPTS AND MODELING

1.1 INTRODUCTION
The objective of this subject is to learn about heavy construction equipment, methods,
modeling, and simulation. In this text readers will learn how to choose and configure
equipment for different purposes such pure pursuit problem, reservoir, inventory control,
queueing system, etc.
Computer system users, administrators, and designers usually have a goal of highest
performance at lowest cost in least time. Modeling and simulation of system design trade
off is good preparation for design and engineering decisions in real-world jobs. In this
subject we study modeling and simulation of a variety of systems.
Simulation is one of the most powerful tools available to decision-makers responsible
for the design and operation of complex processes and systems. It makes possible the
study, analysis and evaluation of situations that would not be otherwise possible. In an
increasingly competitive world, simulation has become an indispensable problem solving
methodology for engineers, designers and managers. The simulation discipline has now
expanded to include modeling of systems that are human-centered (like commercial, economical,
and social) thus, containing a large amount of uncertainty. Those new fields of applications
make modeling and simulation a dynamically expanding discipline. However, there is a
growing gap between the new problems and the methodology. In particular, more robust
research is required in the area of continuous simulation methodology and numerical
methods. Another important point is model validation: it is difficult to prove that the
model used is absolutely valid. Through examining the system dynamics methodology,
which is over fifty years old, and it is still used in many application fields. However, less
attention is given to the model validity. Modeling and simulation lies somewhere between
science and art, frequently resembling the art of misapprehension.
Modeling and Simulation is a discipline, it is also very much a form of art. One can
learn about riding a bicycle from reading a book. To really learn to ride a bicycle one must
applicable copyright law.

become actively engaged with a bicycle. Modeling and Simulation follows much the same
reality. One can learn much about modeling and simulation from reading books and talking
with other people. Skill and talent in developing models and performing simulations is only

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

2 MODELING AND SIMULATION CONCEPTS

developed through the building of models and simulating them. From the interaction of the
developer, the modeling emerges an understanding of what makes sense and what does not.
The terms model and system are key components of simulation. By a model we mean
a representation of a group of objects or ideas in some form other than that of the entity
itself. By a system we mean a group or collection of interrelated elements that cooperate
to accomplish some stated objective. One of the real strengths of simulation is the fact that
we can simulate systems that already exist as well as those that are capable of being
brought into existence, i.e., those in the preliminary or planning stage of development.
Dynamic modeling in organizations is the collective ability to understand the implications
of change overtime. This skill lies at the heart of successful strategic decision process. The
availability of effective visual modeling and simulation enables the analysts and the decision-
makers to boost their dynamic decision by rehearsing strategy to avoid hidden pitfalls.
System Simulation is the mimicking of the operation of a real system, such as the
day-to-day operation of a bank, or the running of an assembly line in a factory, or the
value of a stock portfolio over a time period, or the staff assignment of a hospital or a
security company, in a computer. Instead of building extensive mathematical models by
experts, the readily available simulation software has made it possible to model and
analyze the operation of a real system by non-experts, who are managers but not programmers.
Simulation is nothing but the execution of a model, represented by a computer
program that gives information about the system being investigated. The simulation
approach of analyzing a model is opposed to the analytical approach, where the method
of analyzing the system is purely theoretical. As this approach is more reliable, the
simulation approach gives more flexibility and convenience. The activities of the model
consist of events, which are activated at certain points in time and in this way affect the
overall state of the system. The points in time that an event is activated are randomized,
so no input from outside the system is required. Events exist autonomously and they are
discrete so between the executions of two events nothing happens. The SIMSCRIPT
(a simulation language) provides a process-based approach of writing a simulation program.
With this approach, the components of the program consist of entities, which combine
several related events into one process.
In the field of simulation, the concept of principle of computational equivalence has
beneficial implications for the decision-maker. Simulated experimentation accelerates and
replaces effectively the wait and watch anxieties in discovering new insight and explanations
of future behavior of the real system.
With the integration of artificial intelligence, agents and other modeling techniques,
simulation has become an effective and appropriate decision support for the managers.
For example, in a consumer retail environment it can be used to find out how the roles
of consumers and employees can be simulated to achieve peak performance. It is apparent
that there are many problems of real-life that cannot be represented mathematically due
to the stochastic nature of the problem, the conflicting ideas needed to properly describe
the problem under study, or the complexity in problem formulation. Therefore under such
circumstances simulation is the most often used tool. The analysts and designers of
applicable copyright law.

physical systems have long applied the simulation techniques and these now have become
important tools for dealing with the complex problems in real-life.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEMS CONCEPTS AND MODELING 3

Most but not all digital integrated circuits manufactured today are first extensively
simulated before they are manufactured to identify and correct design errors. Simulation
early in the design cycle is important because the cost to repair mistakes increases
dramatically the later in the product life cycle that the error is detected. Another important
application of simulation is in developing virtual environments, for example in training.
Simulations generate dynamic environments with which users can interact as if they were
really there. Such simulations are used extensively today to train military personnel for
battlefield situations, at a fraction of the cost of running exercises involving real tanks,
aircraft, etc.
It is assumed that Von Neuman and Stanislaw Ulam developed first important application
of simulation for determining the complicated behavior of neutrons in a nuclear shielding
problem being to complex for mathematical analysis. Computer simulation provides a
means to take off the behaviors of complex real systems both quickly and economically.
Simulation models can expeditiously compare the outcomes of alternatives before selecting
a course of action. Simulation models can also provide a dynamic virtual environment for
training. All simulation models require the mathematical representation of a real system
that exists, or could exist, in time and space. A computational representation of that
system then links inputs to outputs through the system architecture.
Computer-based modeling and simulation is used extensively for development of
many complex, large-scale systems such as networks, information systems, and physical
systems. Modeling concepts, theories, and methods provide a foundation for characterizing
structure and behavior of dynamic systems at varying levels of details. These models can
be constructed and subsequently simulated. Since dynamical systems can be described
using alternative modeling and simulation approaches, it is important to understand their
strengths and appropriateness.
It is often said that computers are revolutionizing science and engineering. By using
computers we are able to construct complex engineering designs such as space shuttles.
We are able to compute the properties of the universe, as it was fractions of a second after
the big bang. Our ambitions are ever increasing. We want to create even more complex
designs such as better spaceships, cars, medicines, computerized cellular phone systems,
etc. We want to understand deeper aspects of nature. These are just a few examples of
computer-supported modeling and simulation.
This text presents an object-oriented component-based approach to computer-supported
mathematical modeling and simulation through the powerful Modelica language and its
associated technology. Modelica can be viewed as an almost-universal approach to high-
level computational modeling and simulation, by being able to represent a range of
application areas and providing general notation as well as powerful abstractions and
efficient implementations.

1.2 MODELING AND SIMULATION PROJECTS


applicable copyright law.

Several projects have been developed so far and several are under progress. The
main objectives of the modeling and simulation project being developed are to:

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

4 MODELING AND SIMULATION CONCEPTS

• Learn about the potential of modeling and simulation tools in construction


• Learn how to use simple modeling and simulation software
• Analyze a specific site operation in order to gain insight into its design.
The modeling and simulation project includes the following tasks:
1. Use of modeling and simulation software package to accurately model and
simulate an operation from one site to which a field trip was organized. This
requires learning about basic modeling approaches, collecting site data, and
learning how to use the software. There are usually classic models available.
Accuracy of the model must be verified.
2. Suggest possible improvements and/or alternatives to the operation based on
analysis.
3. Perform a sensitivity analysis of the operation.
4. Evaluate the software used based on its ease to learn and usefulness for
different applications.
5. Documentation of the model, simulating results, sensitivity analysis, final conclusions
and recommendations in a project report.

1.3 THE SYSTEM CONCEPT


Before simulation we need a system. Let us define a system first. What is a system?
A system can be almost anything. A system can contain subsystems, and the subsystems
may again contain sub-systems. A possible definition of systems might be: System is a
well-defined object in the Real-world under specific conditions, only considering specific
aspects of its structure and behavior, or a system is an object or collection of objects
whose properties we want to study. A system can also be defined as the collection of
objects that act and interact together toward some logical end. Our wish to study selected
properties of objects is central in this definition. The selection and definition of what constitutes
a system is somewhat arbitrary and must be guided by what the system is to be used for.
A system can be understood as an entity, which maintains its existence through the
interaction of its parts. Model is a simplified representation of the actual system intended
to promote understanding. Whether a model is a good model or not depends on the extent
to which it promotes understanding. Since all models are simplifications of reality there
is always a trade-off as to what level of detail is included in the model. If too little detail
is included in the model one runs the risk of missing relevant interactions and the
resultant model does not promote understanding. If too much detail is included in the
model may become overly complicated and actually exclude the possibility of the development
of understanding.
A system is a potential source of data. It can be defined as a list of variables. There
are variables that are generated by the environment, and which influence the behavior
of the system. These variables are called the input of the system. There are some other
applicable copyright law.

variables that are determined by the system, and that in turn influence the behavior of
its environment. These variables are called outputs of the system.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEMS CONCEPTS AND MODELING 5

Some other definition of systems can also be adapted. While defining the system,
there are certain tasks that must be done. Among these are:
• Divide the system into logical subsystems.
• Define the entities, which will flow through the system.
• For each subsystem, define the stations (locations where something is done to
or for the entities).
• Define the basic flow patterns of entities through the stations using flow
diagrams.
• Define alternative designs for the system, which are to be considered.
• Develop flow charts to show the routing logic for flexible paths.

1.3.1 System Terminology


We live in a world of systems driven by causes and affects. Those systems include
inventory, production, financial, chemical, biological, thermodynamic or workflow. Systems
can be modeled as nodes representing system variables and connecting lines representing
causal effects. The changing value of one variable can cause another to increase or
decrease. Understanding how a system really works is the first step towards using, improving,
automating or explaining it to others.
Causal Loop Diagrams (CLDs) are used to model the dynamic systems. It is the
simple diagram notation of nodes and lines identifies the important variables in a system
and how they interact. Facts about the system are used to parameterize a causal loop
diagram. Each node becomes a variable that identifies a quantifiable property of the
system that changes overtime. Each line can have equations or rules that formalize how
one variable affects another.
The parameterized models must have all the information needed to simulate the
dynamic response of the system over a series of time increments. The model is declarative
in that the diagram, variables and equations just declare facts about the system. Let us
define various factors of a system:
• State: Collection of variables and their values necessary to characterize a
system at a particular time. It can also be defined as a variable characterizing
an attribute in the system such as level of stock in inventory or number of jobs
waiting for processing.
• Event: A change in system state, or an occurrence at a point in time which
may change the state of the system, such as arrival of a customer or start of
work on a job.
• Entity: An object that passes through the system.
• Queue: A queue is not only a physical queue of people, it can also be a task
list, a buffer of finished goods waiting for transportation or any place where
entities are waiting for something to happen for any reason.
applicable copyright law.

• Creating: Creating is causing an arrival of a new entity to the system at some


point in time.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

6 MODELING AND SIMULATION CONCEPTS

• Scheduling: Scheduling is the act of assigning a new future event to an


existing entity.
• Random variable: A random variable is a quantity that is uncertain, such as
inter-arrival time between two incoming flights or number of defective parts
in a shipment.
• Random variate: A random variate is an artificially generated random variable.
• Distribution: A distribution is the mathematical law, which governs the probabilistic
features of a random variable.

1.3.2 Entity States


Entities migrate from state to state while they work their way through a model. An
entity is always in one of five alternative states, as detailed below.
The Active State. The Active State is the state of the currently moving entity. Only
one entity moves at any instant of wall-clock time. This entity progresses through its
operations nonstop until it encounters a delay. It then migrates to an alternative state.
Some other entity then becomes the next active entity, and so on.
The Ready State. During an Entity Movement Phase there may be more than one
entity ready to move, and yet entities can only move (be in the Active State) one-by-one.
The Ready State is the state of entities waiting to enter the Active State during the
current Entity Movement Phase.
The Time-delayed State. The Time-delayed state is the state of entities waiting for
a known future simulated time to be reached so that they can then (re)enter the ready
state. A part entity is in a time-delayed state, for example, while waiting for the future
simulated time at which an operation being performed on it by a machine will come to
an end.
The Condition-delayed State. The Condition-delayed State is the state of entities
delayed until some specified condition comes about, e.g., a part entity might wait in the
condition-delayed state until its turn comes to use a machine. Condition-delayed entities
are removed automatically from the condition-delayed state when conditions permit.
The Dormant State. Sometimes it is desirable to put entities into a state from
which no escape will be triggered automatically by changes in model conditions. It is
called state the dormant state. Dormant-state entities rely on modeler-supplied logic to
transfer them from the Dormant State back to the Ready State. Job-ticket entities might
be put into a Dormant State, for example, until an operator entity decides which job-ticket
to pull next.

1.3.3 Entity Management Structures


Simulation software uses the following lists to organize and track entities in the five
entity states.
applicable copyright law.

The Active Entity. The active entity forms an unnamed list consisting only of the
active entity. The Active-State entity moves nonstop until encountering an operation that

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEMS CONCEPTS AND MODELING 7

puts it into another state (transfers it to another list) or removes it from the model. A
Ready-State entity then becomes the next Active-State entity. Eventually there is no
possibility of further action at the current time. The EMP (Entity Management System)
then ends and a Clock Update Phase begin.
The Current Events List. Entities in the Ready-State are kept in a single list here
called the current events list (CEL). Entities migrate to the current events list from the
future events list, from delay lists, and from user-managed lists. In addition, entities cloned
from the Active-State entity usually start their existence on the current events list.
The Future Events List. Entities in the Time-Delayed State belong to a single list
into which they are inserted at the beginning of their time-based delay. This list, called
the future events list (FEL) here, is usually ranked by increasing entity move time. Move
time is the simulated time at which an entity is scheduled to try to move again. At the
time of entity insertion into the FEL, the entity’s move time is calculated by adding the
value of the simulation clock to the known (sampled) duration of the time-based delay.
After an Entity Movement Phase is over, the Clock Update Phase sets the clock’s
value to the move time of the FEL’s highest ranked (smallest move time) entity. This
entity is then transferred from the FEL to the CEL, migrating from the Time-Delayed
State to the Ready State and setting the stage for the next EMP to begin.
The preceding statement assumes there are not other entities on the FEL whose
move time matches the clock’s updated value. In the case of move-time ties, some tools
will transfer all the time-tied entities from the FEL to the CEL during a single CUP,
whereas other tools take a “one entity transfer per CUP” approach. Languages that work
with internal entities usually use the FEL to support the timing requirements of these
entities. The FEL is typically composed both of external and internal entities in such
languages.
Delay Lists. Delay lists are lists of entities in the Condition-Delayed State. These
entities are waiting for a condition to come about (e.g., waiting their turn to use a
machine) so they can be transferred automatically into the Ready State on the current
events list. Delay lists, which are generally created automatically by the simulation software,
are managed by using related waiting or polled waiting.
If a delay can be related easily to events in the model that might resolve the
condition, then related waiting can be used to manage the delay list. For example, suppose
a machine’s status changes from busy to idle. In response, the software can automatically
remove the next machine-using entity from the appropriate delay list and put it in the
Ready-State on the current events list. Related waiting is the prevalent approach used to
manage conditional delays. If the delay condition is too complex to be related easily to
events that might resolve it, polled waiting can be used. With polled waiting the software
checks routinely to see if entities can be transferred from one or more delay lists to the
Ready-State. Complex delay conditions for which polled waiting can be useful include
Boolean combinations of state changes, e.g., a part supply runs low or an output bin needs
applicable copyright law.

to be emptied.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

8 MODELING AND SIMULATION CONCEPTS

User-Managed Lists. User-managed lists are lists of entities in the Dormant State.
The modeler must take steps to establish such lists and provide the logic needed to
transfer entities to and from the lists.

1.3.4 A Simple Example


Let us consider building a simulation fuel station with a single pump served by a
single service man. Assume that arrival of vehicles as well their service times are random.
At first identify the:
• States: number of vehicles waiting for service and number of vehicles served
at any moment
• Events: arrival of vehicles, start of service, and end of service
• Entities: these are the vehicles in this example
• Queue: the queue of vehicles in front of the pump, waiting for service
• Random realizations: inter-arrival times, service times, etc.
• Distributions: we shall assume exponential distributions for both the inter-
arrival time and service time.
Next, specify what to do at each event. The above example would look like this, at
event of entity arrival, Create next arrival. If the server is free, send entity for start of
service. Otherwise it joins the queue. At event of service start, Server becomes occupied.
At event of service end, Server becomes free. If any entities waiting in queue then: (i)
remove first entity from the queue; and (ii) send it for start of service.
Some initiation is still required, for example, the creation of the first arrival. Lastly,
the above is translated into code. This is easy with an appropriate library that has
subroutines for creation, scheduling, proper timing of events, queue manipulations, random
variate generation, and statistics collection.
How to simulate? Besides the above, the simulation program records the number of
vehicles in the system before and after every change, together with the length of each event.

1.3.5 Systems and Experiments


Experimentation is the physical act of carrying out an experiment. An experiment
may interfere with system operation (influence its input and parameters) or it may not.
As such, the experimentation environment may be seen as a system in its own right
(which may in turn be modeled by a lumped model). Also, experimentation involves
observation. Observation yields measurements. A system is given, what reasons can there
be to study a system? There are many answers to this question but we can distinguish
two major motivations:
• Study a system to understand it in order to build it. This is the engineering
point of view.
• Satisfy human interest, e.g., to understand more about nature.
applicable copyright law.

• System: That which is to be described, analyzed and controlled, anything of


interest, which is to be described in detail. Often defined as a collection of

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEMS CONCEPTS AND MODELING 9

objects enclosed by a boundary, but this is not essential and the boundary may
be conceptual rather than tangible.
• Environment: All that is external to the system. Everything else of interest,
but which will not be described in detail. Commonly conceived, as external to
the system, but again, this is not essential.
• Open and closed systems: The behavior of an open system may depend upon
its environment; i.e., the two interact. A closed system does not interact with
its environment.
• System variable: A quantity, used to describe the system, which may change
with time or space.
• System input: A quantity that is prescribed or imposed on the system by the
environment; i.e., an independent variable.
• System output: Any system variable of interest is system’s output.
• State determined systems (SDS): A class of systems fully determined by a
finite set of state variables.
• State: A minimal, complete and independent set of state variables that uniquely
describe the system.
• State equations: To describe a state-determined system’s behavior uniquely
for all t > t0 it is sufficient to have:
(i) Value of a finite set of variables (x1, x2, x3, ……., xn) at t0,
(ii) Value of a finite set system inputs (u1, u2, u3, ……., un) for all t > t0, and
(iii) A set of state equations: ym = g m ( x1 , x2 ,......, xn , u1 , u2 , u3 ,......ur , t )
dx1 / dt = f1 ( x1 , x2 ,......, xn , u1 , u2 , u3 ,......ur , t )
dx2 / dt = f 2 ( x1 , x2 ,......, xn , u1 , u2 , u3 ,......ur , t )
dx3 / dt = f 3 ( x1 , x2 ,......, xn , u1 , u2 , u3 ,......ur , t )
.
.
.
dxn / dt = f n ( x1 , x2 ,......, xn , u1 , u2 , u3 ,......ur , t )
• Output equations: Any output variables of a state-determined system may be
expressed as functions of its state and input variables:
y1 = g1 ( x1 , x2 ,......, xn , u1 , u2 , u3 ,......ur , t )
y2 = g 2 ( x1 , x2 ,......, xn , u1 , u2 , u3 ,......ur , t )
y3 = g3 ( x1 , x2 ,......, xn , u1 , u2 , u3 ,......ur , t )
.
.
applicable copyright law.

.
ym = g m ( x1 , x2 ,......, xn , u1 , u2 , u3 ,......ur , t )

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

10 MODELING AND SIMULATION CONCEPTS

1.3.6 Vector Notation


A more compact notation in terms of vectors is given as follows:
• State space: An abstract n-dimensional space defined by the state variables.
• State vector: A point in state space defined by a complete set of state variables.
• Input space: An abstract r-dimensional space defined by the input variables.
• Input vector: A point in input space defined by a complete set of input variables.
• Output space: An abstract m-dimensional space defined by the output variables.
• Output vector: A point in output space defined by a complete set of output
variables.

1.3.7 Natural and Artificial Systems


As, a system, can be described as orderly interconnections of parts into a meaningful
whole. As we are concerned with the classifications of systems, we can easily recognize
three broad categories of systems:
Natural Systems—The systems whose operation is beyond the man’s control are
called natural systems, like solar system.
Man-made Systems—The systems, which are devised and operated by human, like
aircraft flight control system.
Hybrid System—The systems, which are only partially controllable by human being,
like artificial rain production system.
A system can occur naturally, e.g., the universe, and it can also be artificial such as
a space shuttle, or a mix of both (hybrid). For example, the house in with solar-heated
valve warm water is an artificial system, i.e., manufactured by humans. If we also include
the sun and clouds in the system it becomes a combination of natural and artificial
components.
Here, we must be clear about how a system is to be defined for specific simulation.
Our first impulse is to point at the pendulum and to say “the system is that thing there.”
This method, however, has a fundamental disadvantage: every material object contains no
less than infinity of variables, and therefore, of possible systems. The real pendulum, for
instance, has not only length and position; it has also mass, temperature, electric conductivity,
chemical impurities, crystalline structure, radioactivity, velocity, reflecting power, tensile
strength, a surface film of moisture, bacterial contamination, an optical absorption, elasticity,
shape, specific gravity, etc. Any suggestion that we should study all the facts is unrealistic,
and actually the attempt is never made. The necessary point is that we should pick out
and study the facts that are relevant to some main interest that is already given.
Let us consider, if the system is completely artificial, we must be highly selective in
its definition depending on what aspects we want to study for the moment. An important
property of systems is that they should be observable. Some systems, but not large natural
systems like the universe, are also controllable in the sense that we can influence their
applicable copyright law.

behavior through inputs:

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEMS CONCEPTS AND MODELING 11

• The inputs of a system are variables of the environment that influence the
behavior of the system. These inputs may or may not be controllable by us.
• The outputs of a system are variables that are determined by the system and
may influence the surrounding environment.
In many systems the same variables act as both inputs and outputs. We talk about
a causal behavior if the relationships or influences between variables do not have a causal
direction, which is the case for relationships described by equations. For example, in a
mechanical system the forces from the environment influence the displacement of an
object, but on the other hand, the displacement of the object influences the forces between
the object and environment. What is input and what output is in this case, is primarily
a choice by the observer, guided by what is interesting to study, rather than a property
of the system itself.

1.3.8 Experiment with System


An experiment can be defined as a process of extracting data from system by exerting
it through its inputs. Experimenting with a system thus means to make use of its property
of being controllable and observable. To perform an experiment on the system means to
apply a set of external conditions to the accessible inputs, and to observe the reaction of
the system to these inputs by considering the route behavior of the accessible outputs.
Observation is essential in order to study a system according to our definition of
system. We must at least be able to observe some outputs of a system. We can learn even
more if it is possible to exercise a system by controlling its inputs. This process is called
experimentation, like the definition below says:
An experiment is the process of extracting information from a system by exercising
its inputs. To perform an experiment on a system it must be both controllable and
observable. We apply a set of external conditions to the accessible inputs and observe the
reaction of the system by measuring the accessible outputs.
One of the disadvantages of the experimental method is that for a large number of
systems many inputs are not accessible and controllable. These systems are under the
influence of inaccessible inputs, sometimes called disturbance inputs. Likewise, it is often
the case that many really useful possible outputs are not accessible for measurements;
these are sometimes called internal states of the system. There are also a number of
practical problems associated with performing an experiment, like:
• The experiment might be too expensive: investigating ship durability by building
ships and letting them collide is a very expensive method of gaining information.
• The experiment might be too dangerous: training nuclear plant operators in
handling dangerous situations by letting the nuclear reactor enter hazardous
states is not advisable.
• The system needed for the experiment might not yet exist: This is typical of
systems to be designed or manufactured.
applicable copyright law.

The shortcomings of the experimental method lead us over to the model concept. If
we make a model of a system, this model can be investigated and may answer many

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

12 MODELING AND SIMULATION CONCEPTS

questions regarding the real system if the model is realistic enough. One of the major
disadvantages of experimenting with real or actual system is that the systems are under
the influence of a large number of additional inaccessible inputs and a number of real
useful outputs, which are not accessible through measurements either.

1.3.9 Preliminary Data Preparation and Experimental Design


We can define simulation as being experimentation via a model to gain information
about a real world process or system. It then can follow that we must concern ourselves
with the strategic planning of how to design experiments that will yield the desired
information at the lowest cost. The design of experiments comes into play at two different
stages of a simulation study. It first comes into play very early in the study, before the
first line of code has been written and before the finalization of the design of the model.
As early as possible, we want to select the measures of effectiveness to be used in the
study, what factors we are going to vary, how many levels of each of those factors we will
investigate and the number of samples we will need in order to carry out the entire
experiment. We can calculate ahead of time the sample sizes needed. If the number is
large then we know that the model must run very fast and let this influence the design
of the model. Having this fairly detailed idea of the experimental plan early, allows the
model to be better planned to provide efficient generation of the desired data.
We need data to drive our simulation model. Every simulation study involves input
data gathering and analysis. Stochastic systems contain numerous sources of randomness.
The analyst must therefore be concerned about what data to use for input to the model
for things such as the inter-arrival rate of entities to the system, processing times required
at various stations, time between breakdowns of equipment, rejection rates, travel times
between stations etc. Having good data to drive a model is just as important as having
sound model logic and structure. Data gathering is usually interpreted to mean gathering
numbers, but gathering numbers is only one aspect of the problem. The analyst must also
decide what data is needed, what data are available and whether it is pertinent, whether
existing data are valid for the required purpose, and how to gather the data.
In real-world simulation studies, the gathering and evaluation of input data is very
time consuming and difficult. Up to one third of the total time used in the study is often
consumed by this task. Depending upon the situation, there are several potential sources
of data. These include:
• Historical records
• Observational data
• Similar systems
• Operator estimates
• Vendor’s claims
• Designer estimates
• Theoretical considerations.
applicable copyright law.

Each of these sources has potential problems. Even when we have copious data, it
may not be relevant. For example, we may have sales data when we need demand data.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEMS CONCEPTS AND MODELING 13

In other cases we may have only summary statistics. When historical data does not exist,
the problem is even more difficult. In such cases we must estimate both the probability
distribution and the parameters based upon theoretical considerations.

1.4 CONCEPT OF MODEL


The essence of the art of modeling is abstraction and simplification. We want to
design a model of the real system that neither oversimplifies the system to the point
where the model becomes trivial (or worse misleading) nor carries so much detail that it
becomes clumsy and prohibitively expensive to build and run. The tendency among inexperienced
modelers is to try to include too much detail. One should always design the model around
the questions to be answered rather than try to imitate the real system exactly. In every
group or collection of entities, there exists a vital few and a trivial many. In fact 80% of
the behavior can be explained by the action of 20% of the components. Our problem in
designing the simulation model is to make sure that we correctly identify the vital few
components and include them in our model.
Modeling is used to represent/re-use/exchange knowledge about system structure
and behavior. According to definitions of model:
A model is a simplified representation of a system at some particular point in time
or space intended to promote understanding of the real system.
A model (M) for a system (S) and an experiment (E) is anything to which experiment
(E) can be applied in order to answer questions about system (S).
These definitions do not imply that a model is a computer program. It can also be
a piece of hardware or simply an understanding of how a particular system works. Given
the previous definitions of system and experiment, we can now attempt to define the
notion of model:
A model of a system is anything an experiment can be applied to in order to answer
questions about that system. This implies that a model can be used to answer questions
about a system without doing experiments on the real system. Instead we perform a kind
of simplified experiments on the model, which in turn can be regarded as a kind of
simplified system that reflects properties of the real system. In the simplest case a model
can just be a piece of information that is used to answer questions about the system.
Given this definition, any model also qualifies as a system. Models, just like systems,
are hierarchical in nature. We can cut out a piece of a model, which becomes a new model
that is valid for a subset of the experiments for which the original model is valid. A model
is always related to the system it models and the experiments it can be subject to. A
statement such as “a model of a system is invalid” is meaningless without mentioning the
associated system and the experiment. A model of a system might be valid for one experiment
on the model and invalid for another. The term model validation always refers to an
experiment or a class of experiment to be performed.
We talk about different kinds of models depending on how the model is represented:
applicable copyright law.

• Physical model: This is a physical object that mimics some properties of a real
system, to help us answer questions about that system. For example, during

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

14 MODELING AND SIMULATION CONCEPTS

design of artifacts such as buildings, reservoirs, airplanes, etc., it is common


to construct small physical models with same shape and appearance as the real
objects to be studied, e.g., with respect to their smooth properties and aesthetics.
• Mathematical model: A description of a system where the relationships between
variables of the system are expressed in mathematical form. Variables can be
measurable quantities such as size, length, weight, volume, temperature,
unemployment level, bit rate, information flow, etc. Most laws of nature are
mathematical models in this sense. For example, Ohm’s law describes the
relationship between current and voltage for a resistor; Newton’s laws describe
relationships between velocity, acceleration, mass, force, etc.
• Mental model: A statement like “a person is reliable” helps us answer questions
about that person’s behavior in various situations, such kinds of models are
mental models.
• Verbal model: This kind of model is expressed in words. For example, the
sentence “More accidents will occur if the speed limit is increased” is an
example of a verbal model. Expert systems is a technology for formalizing
verbal models.
The kinds of models that we primarily deal with in this text are mathematical
models represented in various ways, e.g., as equations, functions, simulation programs,
etc. Artifacts represented by mathematical models in a computer are often called virtual
prototypes. The process of constructing and investigating such models is virtual prototyping.
Sometimes the term physical modeling is used also for the process of building mathematical
models of physical systems in the computer if the structuring and synthesis process is the
same as when building real physical models.

1.4.1 Why Models


The use of models is an essential part of the decision-making process. These models
range from the mental models buried in the mind of the decision-maker and not necessarily
visible, to the explicit large scale models used to explore the consequences of specific
decisions or phenomena affecting outcomes of a given model. To some extent perceived
utility of the model will be influenced by the complexity of the model and it then follows
that the drive for increased utility and complexity in the model will lead to the situation
where the person making the decision is unable to understand the processes followed by
the model in producing its outcomes. The need to establish validity and the process of
model verification have been debated in the simulation area for many years, and with the
development of animated interfaces it is now possible to adopt more comprehensive processes
of validation and verification to be followed leading to higher levels of credibility for the
model. Simulation therefore could occupy a more prominent position in the tool-kit of
decision-makers as the animation interface and ease of model development continues to
advance over the next ten years. Development of simpler and more powerful interfaces,
often referred to as simulators, has led to the situation where simulation is no longer the
applicable copyright law.

technique of last resort but is a technique which is available to engineers, designers and
managers.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEMS CONCEPTS AND MODELING 15

Reality Model

Real world entity Base model Goals

Only study
behavior in
experimental

a-priori knowledge
context

Model Base
Within
System ‘S’ Context Base model

Experiment Simulate =
within Virtual experiment
context

validation
Experimental Simulation
observed data results

Modeling and simulation


process

Fig. 1.1 Relation in reality and model

In this section we would like to discuss simulation as the process of designing a


computer based model of a reference system, which may be real or proposed, and conducting
experiments with this model for the purpose of understanding the behavior of the reference
system and/or evaluating various strategies for the design or operation of the reference
system. The specific area of simulation which is the focus of this study is discrete-event
simulation (DES) which is the modeling of systems in which the state of variable changes
only at a discrete set of points of time. The relation in reality and the developed model
is explained in figure 1.1.

1.5 PRINCIPLES USED IN MODELING


Methods. Lack of adequate modeling methods is one of the most serious shortfalls
in using Modeling and Simulation. In order to maximize the potential of modeling and
simulation technologies for commercial manufacturing and defense acquisition, basic research
must be undertaken to improve understanding of modeling methods and characteristics,
including scalability, multi-resolution modeling, semantic consistency, modeling complexity,
fundamental limits of modeling and computation, and uncertainty. Scalability is the attribute
of a system’s architecture that pertains to the behavior and performance of the system
as the size, complexity, and interdependence of its elements or applications increase.
Difficulties in dealing with large-scale software systems are well documented. Techniques
applicable copyright law.

that work for small systems often fail markedly when the scale is increased significantly.
To be upwardly scalable, a system must assure consistency in both the functionality and
the quality of the services it provides as the number of its users increases indefinitely.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

16 MODELING AND SIMULATION CONCEPTS

To scale by a million, an application’s storage and processing capacity would have to be


able to grow by a factor of 1 million just by adding more resources.
Components. Traditional modeling and simulation have focused on micro level components
rather than on macro level integration of these components. However, with the advent
of large-scale systems such as extended enterprises and distributed mission training, it is
necessary to develop approaches for designing scalable Modeling and Simulation system
architectures, including process specifications, linguistic support, granularity, and levels
of abstraction to support system architecture design. This effort includes modularization,
interconnectivity, and integration platforms as well as the standardization of application
programs, automatic installation of modules, and verification. Metrics for such designs
include robustness, reliability, flexibility, and the ability of the system to adapt dynamically
to changing conditions when simulating large numbers of agents, determining an adequate
level of fidelity for individual agents’ behavior, validating agent-based models, and avoiding
ad hoc assumptions during model development.
Semantic Consistency. Semantic Consistency, also known as substantive interoperability,
refers to consistent phenomenological representations of modeling of real-world systems
and processes among interacting distributed simulations. For example, two combat simulations
must have consistent models of inter-visibility or they will be unable to interoperate meaningfully
in a distributed simulation. Research into semantic consistency and a general mathematical
language for expressing models are recommended. Dealing with complexity and errors
abstraction is the process of extracting a relatively sparse set of entities and relationships
from a complex reality to produce a valid simplification of that reality. Abstraction is a
general process; it includes simplification approaches such as aggregation, omission of variables
and interactions, linearization, replacing stochastic processes by deterministic ones (and
conversely), and changing the formalism in which models are expressed.
Complexity. The complexity of a model is measured in terms of the time and space
required to execute it as a simulation. The more detail included in a model, the greater the
resources required of the development team to build it and to execute it as a simulation once
it is built. Validity is preserved through appropriate morphism mappings at desired levels of
specification. Thus, abstraction methods, such as aggregation, will be framed in terms of
their ability to reduce the complexity of a model while retaining its validity relative to the
given modeling objectives inevitable resource constraints require working with models at
various levels of abstraction. The complexity of a model depends on the level of detail, which
in turn depends on the size/resolution product. The size/resolution product reflects the fact
that increasing the size, or number of components, and resolution, or number of states per
component, leads to increasing complexity. Since complexity depends on the size/resolution
product, complexity can be reduced by reducing the size of the model or its resolution or
both.
Several new approaches to modeling complexity are being developed. One of them is
the notion of coordinated families of simulations at different levels of resolution. This
approach presupposes the existence of effective ways to develop and correlate the underlying
abstractions. A second approach, exploratory analysis, attempts to overcome computational
applicable copyright law.

complexity by addressing the issue of optimization, or searching through large spaces of


alternatives for best solutions to a problem. This approach uses low-resolution models

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEMS CONCEPTS AND MODELING 17

with a wide scope intended to capture the main features of an overall system or scenario.
The approach seeks to exploit the reduction in the large space of alternatives that low-
resolution, or highly abstracted model structures, may provide. A third approach fundamentally
reconsiders the issue of optimization as a search for the best among many alternatives.
The fast, frugal and accurate (FFA) perspective on real-world intelligence provides a
framework for insight into this issue. FFA is taken from the domain of human decision-
making in which full optimization is associated with unbounded rationality. This perspective
recognizes that the real-world is a threatening environment in which knowledge is limited,
computational resources are bounded, and little time is available for sophisticated reasoning.
Simple building blocks that steer attention to informative cues, terminate search processing,
and make final decisions can be put together to form classes of heuristics that perform
at least as well as more complex algorithms.
Fundamental Limits of Modeling and Computation. In order to satisfy the
needs of simulation for increasingly complex systems and processes, an integration of the
statistics-oriented approach and simulation research must be emphasized by the academic
community and the computer-science-oriented approach in acquisition and manufacturing.
The statistics-oriented approach deals with prediction and management of uncertainty,
whereas the computer-science-oriented approach deals with interoperability, reusability,
integration, distributed operation, and human/machine interfaces. The computer-science-
oriented approach is necessary for the future operational success of defense acquisition
and commercial manufacturing, but as processes and systems become increasingly complex,
estimation and management of uncertainties will become increasingly important. Some
fundamental limitations in computation in dealing with complex systems must be recognized.
The performance of any future complex system will be unavoidably stated in probabilistic
terms. A suite of software and a collection of databases may be technically interoperable
and can be used to calculate system performance under a given set of operating environments,
but there is no way that these tools can estimate the percentage of time that the system
will perform satisfactorily under different circumstances, what the expected performance
will be under uncertainty, or what the confidence level of the estimate is.
Performance Estimate. In addition, in order to improve the system performance
estimate by adjusting or tuning various parameters in different phases of the acquisition
process, dimensionality, or combinatorial explosion, must be dealt with. The first fundamental
limitation in computation states that each system performance evaluation via simulation
is time consuming. The second limitation states that a very large number of such evaluations
may be necessary. These difficulties are multiplicative. Finally, there is a third limitation
is “No Free Lunch Theorem”. Without specific structural assumptions, there exists no
optimization or search algorithm that can perform better on the average than blind search
in dealing with the first and second limitation. These three limitations are fundamental
limits on computation in dealing with complex systems. No amount of theoretical, hardware,
or software advances can overcome them. Consequently, a strategic redirection is called
for in dealing with them.
Therefore, to deal with the large search spaces imposed by the second and third
applicable copyright law.

computational limitations, the structure of specific problems must be learned along the
way. A number of automated learning theories currently in trend in artificial intelligence

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

18 MODELING AND SIMULATION CONCEPTS

research, such as knowledge discovery, data mining, Bayesian networks, and Tabu search,
may be significant for developing modeling capabilities. Tabu search is a heuristic technique
for search in combinatorial optimization problems.
Errors. Errors in Distributed Simulations fix resources and a model complexity that
exceeds these resources, a trade-off must be made between size and resolution. If some
aspects of a system are represented very accurately, only a few components will be
representable. Alternatively, a comprehensive view of the entire system can be provided,
but only at a low resolution. Such resolution may introduce errors that may pose particular
problems in distributed simulations. In such complex, networked systems of models, owing
to low resolution each model will typically be in error to some degree. Therefore, it is
natural to expect that in a complex system of many linked models, even if individual
inaccuracies are small, such errors can accumulate, propagate, and reinforce each other,
rendering the behavior of the aggregate significantly different from the behavior of the
real system. Error propagation in distributed simulations plays an important role in
verification, validation, and accreditation, and therefore is an important area of research
that needs to be strengthened. In the current state of the art, it is possible to suggest that
such error propagation may, or may not be, a significant issue in distributed simulations.
On other hand, modeling errors in complex systems can be like noises that are more or
less statistically independent. The cumulative effect of many independent errors behaves
according to the central limit theorem and decrease with increasing complexity under
some reasonable assumptions. A simple case is the law of large numbers, which improves
accuracy by averaging many measurements. A second mitigating factor is the theory of
ordinal optimization, mentioned above. Research here has shown that for the purpose of
comparison (for example, which is better?), very crude models are quite sufficient.
Model Correctness. Model correctness is the fundamental requirement of ensuring
that the predictions of a simulation model can be relied upon. The correctness of simulation
requires the development of accurate and reliable models of real-world systems. A prerequisite
to this is an understanding of the real-world systems and objects to be modeled, their
contextual domains, and the phenomenology of their operations and interactions, all at a
level of detail sufficient to justify the model. Once the models have been implemented as
simulations, their correctness must be rigorously evaluated. Domain Knowledge Improved
understanding of the real-world basis for models is needed in the areas of phenomenology
of warfare, physics-based modeling, and human behavior modeling. Phenomenology of
Warfare the military domain is of special importance because it is the primary focus of
SBA and because it is the domain in which human lives are most likely to be risked on
the basis of decisions made using modeling and simulation.
Human Behavior Modeling. Computer-generated forces are often used in training
simulations to provide both opposing forces and supplemental friendly forces for human
participants in a simulation. They are also often used to generate all of the entities in
battlefield simulations being used for non-training purposes, such as analysis and experimentation.
Automated or semi-automated entities are created, and their behavior is controlled by the
computer system, perhaps assisted by a human operator, rather than by human participants
applicable copyright law.

in a simulator. These automated behaviors are produced by algorithms based on models


of human behavior. The reliability of the results depends on the validity of the behavior-

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEMS CONCEPTS AND MODELING 19

generation methods. While current behavior-generation methods are reasonably effective


at producing behavior that is in accordance with straightforward strategic policy, they fall
far short of producing realistically human behavior with all its unpredictability and sophistication.
Several studies have concluded that a need exists for improvement in human behavior
modeling.

1.6 MODEL VERIFICATION AND VALIDATION


A key area of the model development process in the simulation area is the development
of verification and validation stages in the process. Management scientists have very little
to say about how one goes about “verifying” a simulation model or the data generated that
the modeling process has the following five steps:
1. Systems Analysis: The study of a system in order to ascertain its salient
elements and to outline their interactions and behavior mechanisms;
2. System Synthesis: The construction of a complete, logical structure in order
to provide a reasonable symbolic mimicry, or model of the system’s elements
and interactions, including the determination and collection of data required to
support the model’s structure;
3. Verification: Verification is concerned with building the model right. It is
utilized in the comparison of the conceptual model to the computer representation
that implements that conception. Simulation models can be run interactively
or in batch mode. Interactive runs are of use in checking out (verifying) model’s
logic during model-building and in troubleshooting a model when execution
errors occur. Batch mode is then used to make production runs. Interactive
runs put a magnifying glass on a simulation model while it executes. The
modeler can follow the active entity step by step and display the current and
future events lists and the delay and user-managed lists as well as other
aspects of the model. These activities yield valuable insights into model behavior
for the modeler who knows the underlying concepts. Without such knowledge,
the modeler might not take full advantage of the interactive tools provided by
the software or, worse yet, might even avoid using the tools.
4. Validation: Validation is concerned with building the right model. It is utilized
to determine that a model is an accurate representation of the real system.
The validation is process of comparison of responses emanating from the verified
model with available information regarding the corresponding behavior of the
simulated system; and
5. Model Analysis: The process of contrasting of model responses under alternative
environmental specifications (or input conditions).
The general level of agreement on the definition of verification and validation should
not however be taken as evidence to suggest that this part of the model development
applicable copyright law.

process is either simple or straightforward.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

20 MODELING AND SIMULATION CONCEPTS

1.7 TYPES OF MODELS

1.7.1 Continuous and Discrete-time Models


Continuous-time Models
Continuous-time models are the models used for continuous time simulations. In these
cases, state or the variables of the system change with time. Continuous-time models are
created and recognized by the property ‘Ts’ = 0. You can create and analyze all the objects
as continuous-time models by setting ‘Ts’ equal to zero at the time of creation, by using the
following MATLAB statement:
m = idpoly(1, [0 2 1], 1, 1, [1 3 4], ‘Ts’, 0)
2s + 1
for the model y = u+e
s + 3s + 4
2

where all model characteristics are then computed and graphed for the continuous-time
representation. Time and frequency scales are determined based on the dynamics of the
system (the pole/zero locations). For simulation and prediction, the continuous-time models
are first converted to discrete time, using the sampling interval and inter sample behavior
of the data.

Estimating Continuous-time Models


The estimation routines support the estimation of continuous-time state-space models
in several different ways. The major reason for identifying continuous-time models is to
secure a particular structure of the continuous-time state-space matrices. This would
typically reflect a physical interpretation or some gray-box modeling work done, as for the
process models, described.

Transformations
Transformations between continuous-time and discrete-time model representations
are performed by c2d and d2c. Note that it is not sufficient just to assign a new value
of Ts to the model object. The corresponding uncertainty measure (the estimated covariance
matrix of the internal parameters) is also transformed in most cases. The syntax is :
modc = d2c(modd) for discrete to continuous
modd = c2d(mc,T) for continuous to discrete
The transformation c2d also offers an optional output argument that describes how
the initial state should be transformed.
If the discrete-time model has some pure time delays, the default command removes
them before forming the continuous-time model, and appends them using the property
InputDelay in model modc. This property is used to add appropriate phase lag and shift
the data whenever the model is used. The command D2C also offers an option to approximate
the dead time by a finite dimensional system. Note that the disturbance properties are
applicable copyright law.

translated by the somewhat questionable formula.


The covariance matrix is translated by the Gauss approximation formula using numerical

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEMS CONCEPTS AND MODELING 21

derivatives. Here is an example that compares the promise plots of an estimated model
and its continuous-time counterpart.
• m = armax(Data,[2 3 1 2]);
• mc = d2c(m); bode(m,mc)
The transformations between discrete and continuous time depend on the inter
sample behavior of the input. The formulas are different if the input is assumed to be
piecewise constant or piecewise linear between samples (‘zoh’ or ‘foh’). For estimated
discrete-time models, the input properties of the estimation data are used for this purpose,
by default. To override this, add an extra argument, as described in the reference pages
for c2d and d2c.

Discrete-time Model
Such models are used for discrete-time simulations. Discrete-time simulation is commonly
used by the operations research work to study large, complex systems which do not lend
themselves to a conventional analytic approach. A well-known example of discrete-time
simulations is inventory model simulation. Airports, telephone exchanges, production line,
stock of goods are some other examples of discrete-time models.
This kind of model setup allows us to directly assess the structural inter-dependencies
among the shocks to returns and the two different volatility components. The model
estimates suggest that the leverage effect, or asymmetry between returns and volatility,
works primarily through the continuous volatility component. The excellent fit of the
model makes it an ideal candidate for an easy-to-implement auxiliary model in the context
of indirect estimation of empirically more realistic continuous-time jump diffusion effectively
incorporating the relevant information in the high-frequency data.

1.7.2 Continuous and Discrete-event Models


System or models in which changes are predominantly discontinuous are Discrete
Simulation Models. Discrete-event simulation concerns the modeling of a system as it
evolves overtime by a representation in which state variables change instantaneously at
separate points in time. The amount of data that must be stored and manipulated for most
real-world systems dictates that discrete-event simulation is done on a digital computer.
Continuous simulation concerns the modeling overtime of a system by representation
in which the state variables change continuously with respect to time. Continuous simulation
models involve differential equations that give relationships of the rates for change of the
state variables with time. If the differential equations are particularly simple, they can be
solved analytically to give the values of the state variables for all values of time as a
function of the values of the state variable at time 0. For most continuous models analytic
solutions are not possible and numerical analysis techniques as Runge-Kutta integration
are used to integrate the differential equations numerically, given specific values for the
state variables at time 0.
applicable copyright law.

Discrete-event models use discrete-events as a set of circumstances that cause instantaneous


changes in one or more system state descriptions. Since some systems are neither completely

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

22 MODELING AND SIMULATION CONCEPTS

discrete nor completely continuous, the need may arise to construct a model with aspects
of both discrete-event and continuous simulation resulting in a combined discrete-continuous
simulation. The three fundamental types of interactions that can occur between discretely
changing and continuously changing state variables:
• A discrete-event may cause a discrete change in the value of continuous state
variables.
• A discrete-event may cause the relationship governing a continuous state variable
to change at a particular time.
A continuous state variable achieving a threshold value may cause a discrete-event
to occur or to be scheduled.

1.7.3 Deterministic and Stochastic Models


Deterministic models produce deterministic results. If a simulation model does not
contain any probabilistic or random components, it is called deterministic. In deterministic
models, the output is ‘determined’ once the set of input quantities and relationships in the
model have been specified. It takes a lot of compute time to evaluate what this output can
be. When a system is modeled with at least some random input components then it is
stochastic simulation model. The output produced by stochastic model is random. The outputs
only estimate the true characteristics of model. This is the main disadvantage of stochastic
simulation model. Stochastic or probabilistic models are subject to random effects:
• Typically, they have one or more random inputs e.g., arrival of customers,
service time etc.
• Outputs from stochastic models are “estimates” of the true characteristics of
the system
• Need to repeat experiments number of times
• Need to have confidence in the results.

1.7.4 Static and Dynamic Models


Static models—If the system state is independent of time. A static simulation model
is a representation of a system at a particular time. These models may be used to
represent a system in which time simply plays no role, for example, Monte Carlo Models.
Dynamic models—A model is called dynamic model if the system state changes
with time. A dynamic simulation model represents a system as it evolves overtime, for
example, Conveyor system in a factory.

1.7.5 Linear and Non-linear Models


• Linear model—The model in which output is a linear function of input parameters.
• Non-Linear Model—A model can be non-linear in its parameters, non-linear in
applicable copyright law.

its observed variables, or non-linear in both its parameters and variables. Non-

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEMS CONCEPTS AND MODELING 23

linear in the parameters means that the mathematical relationship between


the variables and parameters is not required to have a linear form. A linear
model is a special case of a non-linear model.

1.8 THE MODELING


The way of creating or developing a model is called modeling. Modeling means the
process of organizing knowledge about a given system. A model is a pattern, plan, representation,
or description designed to show the structure or workings of an object, system, or concept.
Problem Formulation: Problem formulation is concerned with:
• Identification of controllable and uncontrollable inputs.
• Identification of constraints on the decision variables.
• Definition of measure of system performance and an objective function.
• Development of a preliminary model structure to interrelate the inputs and
the measure of performance.
Data Collection and Analysis: Regardless of the method used to collect the data,
it is concerned with the decision of how much to collect be a trade-off between cost and
accuracy.
Simulation Model Development: Acquiring sufficient understanding of the system
to develop an appropriate conceptual, logical and then simulation model is one of the most
difficult tasks in simulation analysis.
Model Calibration: The process of parameter estimation for a model. Calibration
is a tuning of existing parameters and usually does not involve the introduction of new
ones, changing the model structure. In the context of optimization, calibration is an
optimization procedure involved in system identification or during experimental design.
Input and Output Analysis: Discrete-event simulation models typically have stochastic
components that mimic the probabilistic nature of the system under consideration. Successful
input modeling requires a close match between the input model and the true underlying
probabilistic mechanism associated with the system. The input data analysis is to model an
element (like arrival process, service times, etc.) in a discrete-event simulation given a data
set collected on the element of interest. This stage performs intensive error checking on
the input data, including external, policy, random and deterministic variables. System simulation
experiment is to learn about its behavior. Careful planning, or designing, of simulation
experiments is generally a great help, saving time and effort by providing efficient ways to
estimate the effects of changes in the model’s inputs on its outputs. Statistical experimental-
design methods are mostly used in the context of simulation experiments.
Sensitivity Estimation: For sensitivity analysis, users must be provided with affordable
applicable copyright law.

techniques if they are to understand which relationships are meaningful in complicated


models.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

24 MODELING AND SIMULATION CONCEPTS

Optimization: The traditional optimization techniques require gradient estimation.


As with sensitivity analysis, the current approach for optimization requires intensive
simulation to construct an approximate surface response function.

1.8.1 Stochastic Modeling


Stochastic means being or having a random variable. A stochastic model is a tool for
estimating probability distributions of potential outcomes by allowing for random variation
in one or more inputs overtime. The random variation is usually based on fluctuations
observed in historical data for a selected period using standard time-series techniques.
Distributions of potential outcomes are derived from a large number of simulations (stochastic
projections) which reflect the random variation in the input provided to the system.
A stochastic model can be used to set-up a projection model which looks at a single
policy, an entire portfolio or an entire company. But rather than setting investment
returns according to their most likely estimate, for example, the model uses random
variations to look at what investment conditions might be like.
Based on a set of random outcomes, the experience of the policy/portfolio/organization
is projected, and the outcome is noted. Then this is done again with a new set of random
variables. In fact, this process is repeated thousands of times. At the end, a distribution
of outcomes is available which shows not only what the most likely estimate, but what
ranges are reasonable too. Stochastic modeling builds volatility and variability (randomness)
into the simulation and therefore provides a more accurate representation of real life.

1.8.2 Stochastic Processes


A stochastic process is a probabilistic model of a system that evolves randomly in
time and space. Formally, a stochastic process is a collection of random variables {X(t),
t ∈ T} all defined on a common probability space. The X(t) is the state while time t is the
index that is a member of set T.
Examples are the delay {D(i), i = 1, 2, ...} of the ith customer and number of customers
{Q(t), t ≥ 0} in the queue at time t in an M/M/1 queue. In the first example, we have a
discrete-time, continuous state, while in the second example the state is discrete and time
is continuous.
The man made systems have mostly discrete state. Monte Carlo simulation deals
with discrete-time while in discrete even system simulation the time dimension is continuous.
Simulation Output Data and Stochastic Processes. To perform statistical analysis
of the simulation output we need to establish some conditions, e.g., output data must be
a covariance stationary process (e.g., the data collected over n simulation runs).
Stationary Process (strictly stationary). A stationary stochastic process is a
stochastic process with the property that the joint distribution all vectors of h dimension
applicable copyright law.

remain the same for any fixed h.


First Order Stationary. A stochastic process is a first order stationary if expected

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEMS CONCEPTS AND MODELING 25

of X(t) remains the same for all t. For example, in economic time series, a process is
first order stationary when we remove any kinds of trend by some mechanisms such as
differencing.
Second Order Stationary. A stochastic process is a second order stationary if it is
first order stationary and covariance between X(t) and X(s) is function of t’s only. Again,
a process is second order stationary when we stabilize also its variance by some kind of
transformations such as taking square root. Clearly, a stationary process is a second order
stationary, however the reverse may not hold. In simulation output statistical analysis we
are satisfied if the output is covariance stationary.
Covariance Stationary. A covariance stationary process is a stochastic process
{X(t), t ≤ T} having finite second moments, i.e., expected of [X(t)]2 be finite. Clearly, any
stationary process with finite second moment is covariance stationary. A stationary process
may have no finite moment whatsoever. Since a Gaussian process needs a mean and
covariance matrix only, it is stationary (strictly) if it is covariance stationary.
Two Contrasting Stationary Process. Consider the following two extreme stochastic
processes:
• A sequence Y0, Y1,....., of independent identically distributed, random-value
sequence is a stationary process, if its common distribution has a finite variance
then the process is covariance stationary.
• Let Z be a single random variable with known distribution function, and set
Z0 = Z1 = ....Zi. Note that in a realization of this process, the first element, Z0,
may be random but after that there is no randomness. The process {Zi, i = 0,
1, 2, ..} is stationary if Z has a finite variance.
Output data in simulation lies between these two types of process. Simulation outputs
are identical and mildly correlated. It depends on a queueing system how large is the
traffic intensity. An example could be the delay process of the customers in a queueing system.

1.9 SYSTEM ENGINEERING


Modeling and simulation is the field closely related with system engineering. Systems
engineering often involves the modeling or simulation of some aspects of the proposed
system in order to validate assumptions or explore theories. For example, highly complex
systems such as aircraft are usually modeled and simulated before flight. In this way the
initial aero-elastic engineering and control equations can be drafted and improved upon
before any physical system is ever constructed or developed. Since aircraft are often very
expensive, this reduces the expense and difficulty of debugging the controls and reduces
the risk of crashing real aircraft. Careful initial testing and flight envelope expansion are
typically still required to reach acceptable levels of safety and performance in advanced
aircraft.
applicable copyright law.

The role of the system engineer is especially important when systems must have
especially predictable and reliable behavior. For example, medical machinery, power plants,

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

26 MODELING AND SIMULATION CONCEPTS

and spacecraft usually consist of many individually engineered and manufactured parts, by
different companies. System engineering provides the assurance that normal operations,
including parts failures, will not provide a hazard for the user or anyone else in the
community. The application of systems engineering processes may also result in significant
cost savings, as well as providing a reasonable assurance of the eventual success of the
project.
Systems Engineering (SE) is an interdisciplinary approach and means for enabling
the realization and deployment of successful systems. It can be viewed as the application
of engineering techniques to the engineering of systems, as well as the application of a
systems approach to engineering efforts. Systems engineering integrates other disciplines
and specialty groups into a team effort, forming a structured development process that
proceeds from concept to production to operation and disposal. Systems engineering considers
both the business and the technical needs of all customers, with the goal of providing a
quality product that meets the user needs.
System development often requires contribution from diverse technical disciplines.
Each of these disciplines is normally focused on their own particular contribution to the
system (for example, jet engine designers would not be focused on the aircraft’s hydraulic
subsystem). System engineering’s advantage point is a holistic perspective of the system
and from this perspective integrates all of these technical efforts to ensure that their
various subsystems work with one another. By providing a systems view of the development
effort, System Engineering helps meld all the technical contributors into a unified team
effort, forming a structured development process that proceeds from concept to production
to operation and, in some cases, through to termination and disposal. System Engineering
is usually directly responsible for any engineering function that is not deemed sufficiently
necessary on a project to require a full-time, specialist engineer, although consultants
may be enlisted as needed.
Ideally, Systems Engineering considers both the business and the technical needs of
all customers with the goal of providing a quality product that meets the user needs.
However, the reality in any very large project is often that user needs exceed what the
sponsor is willing to pay for; and the schedule to satisfy those needs generally exceeds
what either of them is willing to live with. As a result, ‘satisfaction of all technical
requirements’ is subject to the usual constraints of cost, schedule, and producibility.
Taking an interdisciplinary approach to engineering systems is inherently complex,
since the behavior of and interaction among system components are not always well-
defined or understood. Defining and characterizing such systems and subsystems, and the
interactions among them, is the primary aim of systems engineering. On very large
programs, a systems architect may be designated to serve as an interface between the
user/sponsor and systems engineer.
There are several methods and tools that are frequently used by systems engineers:
applicable copyright law.

requirements capture, systems architecture and design, functional analysis, interface design
and specification, communications protocol design and specification, simulation and modeling,
verification and validation/acceptance testing, fault modeling.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEMS CONCEPTS AND MODELING 27

SUMMARY
Simulation is a discipline, not a software package; it requires detailed formulation of
the problem, careful translation or coding of the system logic into the simulation procedural
language (regardless of the interface type), and thorough testing of the resulting model
and results. There are at least two different skills required to be successful at simulation.
The first skill required is the ability to understand a complex system and its interrelationships.
The second skill required is the ability to translate this understanding into an appropriate
logical representation recognized by the simulation software.
Recently, industry in general has begun to accept that the engineering of systems,
both large and small, can lead to unpredictable behavior and the emergence of unforeseen
system characteristics or emergent properties. Decisions made at the beginning of a
project whose consequences are not clearly understood can have enormous implications
later in the life of a system, and it is the task of the modern systems engineer to explore
these issues and make critical decisions. There is no method which guarantees that
decisions made today will still be valid when a system goes into service years or decades
after it is first conceived but there are techniques to support the process of systems
engineering. Examples include the use of soft systems methodology, the Unified Modeling
Language etc., each of which are currently being explored, evaluated and developed to
support the engineering decision making process.

EXERCISE QUESTIONS
1. Explain the need of modeling and simulation.
2. In what kind of projects modeling and simulation is preferred?
3. Explain the fields where simulation and modeling is used very effectively.
4. Explain the difference between reality and the model in terms of modeling and simulation.
5. Explain the difference between simulation and experiment. Explain the parameters
used for experiments with a system.
6. Write short notes on:
(i) Natural System (ii) Artificial System
(iii) Hybrid System (iv) Model
7. What are different types of models? Give the difference between discrete and continuous
models.
8. Explain the difference between mental model and mathematical model.
9. Explain the difference between static and dynamic model.
10. What do you understand by model validation, verification and calibration?
11. What do you mean by stochastic process and stochastic modeling?
applicable copyright law.

12. Explain the principles used in modeling of a system.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

28 MODELING AND SIMULATION CONCEPTS

Chapter 2
SIMULATION CONCEPTS

2.1 INTRODUCTION
Simulation modeling is similar to other engineering disciplines. It requires training
and experience to become competent, and is not really as easy as some people might have
you believe. It is an art as well as a science. Simulation is one of the most powerful tools
available to decision-makers responsible for the design and operation of complex processes
and systems. It makes possible the study, analysis and evaluation of situations that would
not be otherwise possible. In an increasingly competitive world, simulation has become an
indispensable problem solving methodology for engineers, designers and managers. Simulation
is the imitation of the operation of a real-world process or system overtime. Simulation
involves the generation of an artificial history of the system, and the observation of that
artificial history to draw inferences concerning the operating characteristics of the real
system that is represented. Simulation is an indispensable problem-solving methodology
for the solution of many real-world problems. Simulation is used to describe and analyze
the behavior of a system. Both existing and conceptual systems can be modeled with simulation.
Recent advances in modeling and simulation technologies make them increasingly
appealing as a means of improving commercial manufacturing and defense acquisition.
However, in order for these technologies to support the desired applications in commercial
manufacturing and defense acquisition, additional research and development is needed. As
challenge, the organizations involved in simulation and modeling are often asked to
investigate emerging modeling and simulation technologies, efforts to develop them, and
identify gaps that would have to be filled in order to make these emerging technologies a
reality. The organizations rephrase this task and require determining those topics requiring
research and development to be effectively used in commercial manufacturing and defense
acquisition. The topics requiring research and development are identified by the committee
on the basis of the challenges in the real-world.
A framework for the modeling and simulation of hybrid analog/digital systems has
applicable copyright law.

long been needed. Today, the need to design mixed-signal chips to support the growth in
wireless devices and next-generation automotive electronics has brought this problem to

28

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 29

the foreground. Mixed-Signal Chips (MSCs) have been implemented as custom-Application-


Specific Integrated Circuits (ASlCs), but must now be mass-produced for use in wireless
technology. MSCs receive analog signals, process and manipulate them mainly in digital
form, and reconvert them back to analog form. The challenge for systems design is the
high level of functionality of an MSC.
It is useful to distinguish between two broad classes of simulations. The first is product
modeling or engineering simulations, which simulate the physics of products or systems
being designed with a high degree of detail and physical fidelity. The intent of these
simulations is to assist design engineers in understanding the physical performance of the
product or system as designed. They often simulate only one system or subsystem at a time
and run slower than read time. They can be loosely defined as using modeling and
simulation to determine how to build a system. The second class of simulations is performance
modeling or effectiveness simulations, which simulate products or systems that are assumed
to exist and operate as designed. The intent of these simulations is to determine how
effective the systems would be in use or what performance parameters the systems must
have in order to be effective in use. They often simulate scenarios involving many simulated
systems and run in real time or faster. They can be loosely defined as using modeling and
simulation to determine which system to build. The ability to link these two types of
simulations is necessary for achieving the goals of defense acquisition. The ability to reuse
engineering models and simulations in effectiveness simulations would save time and money.
Physics-based flight dynamics models use aerodynamics equations rather than look-
up tables to model the flight characteristics of a simulated aircraft. The physics of failure
and assessment of a potential system’s durability and operational availability is of special
interest. Such assessments would greatly benefit from accurate physical models that
support predictions of the modes and times of failure of physical systems. Several studies
have concluded the need for improvements in physics-based modeling. Physics-based modeling
is arguably more important for defense manufacturing and acquisition than for other
simulation applications such as training.

2.2 SIMULATION
Before we proceed further, it becomes necessary to define the term simulation in
more suitable forms. We define simulation as the process of designing a model of a real
system and conducting experiments with this model for the purpose of understanding the
behavior of the system and evaluating various strategies for the operation of the system.
Thus it is critical that the model be designed in such a way that the model behavior
mimics the response behavior of the real system to events that take place overtime. The
terms model and system are key components of our definition of simulation. By a model
we mean a representation of a group of objects or ideas in some form other than that of
the entity itself. By a system we mean a group or collection of interrelated elements that
cooperate to accomplish some stated objective. One of the real strengths of simulation is
applicable copyright law.

the fact that we can simulate systems that already exist as well as those that are capable
of being brought into existence, i.e., those in the preliminary or planning stage of development.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

30 MODELING AND SIMULATION CONCEPTS

Some other important definitions are:


Definition 1: Simulation is the use of system model that has the designed
characteristics of reality in order to produce the essence of
actual operation.
Definition 2: Simulation is representation of reality through the use of a
model or other device, which will react in the same manner as
reality under a given set of conditions.
Definition 3: A Simulation model may be defined as one which depicts the
working of a large scale system of men, machine, materials and
information operating over a period of time in a simulated
environment of the actual real- world conditions.
Definition 4: According to Churchman, Simulation is defined as,
“A simulates B” is true if and only if:
(a) A and B are formal systems;
(b) B is taken to be a real systems;
(c) A is taken to be an approximation to the real system; and
(d) The rule of validity in A are non-error-free, otherwise A will become the
real system.
Thus, simulation is the manipulation of a model in such a way that it operates on time
or space to compress it, thus enabling one to recognize the interactions that would not
otherwise be apparent because of their separation in time or space.
Simulation in general is to pretend that one deals with a real thing while really
working with an imitation. In operations research the imitation is a computer model of
the simulated reality. A flight simulator on a personal computer is also a computer model
of some aspects of the flight: it shows on the screen the controls and what the “pilot” is
supposed to see from the cockpit.
To fly a simulator is safer and cheaper than the real airplane. For precisely this
reason, models are used in industry commerce and military: it is very costly, dangerous
and often impossible to make experiments with real systems. Provided that models are
adequate descriptions of reality (they are valid), experimenting with them can save money,
suffering and even time.
Modeling and Simulation is a discipline for developing a level of understanding of
the interaction of the parts of a system, and of the system as a whole. The level of
understanding, which may be developed via this discipline, is seldom achievable via any
other discipline.

2.3 WHY GO FOR SIMULATION


At the most general level, simulation is considered as a form of cognition. Cognition
is the action or process of acquiring knowledge. There are three basic methods how to get
information (knowledge) of objective reality: Experiment, Analysis, and Simulation. Let us
take one practical example to demonstrate the nature of these three methods.
Experiment: Common example of experiment can be seen as, take stopwatches and
applicable copyright law.

measure the time every train spends in the railway station. Count the trains, at the end
sum all times and divide them by the number of trains. Experiment is always the most

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 31

accurate method that should be used whenever it is feasible. Unfortunately very often the
experiment is:
• Too dangerous (behavior of a nuclear reactor in critical situations, landing with
a plane with one jet off, etc.)
• Too expensive (all cases that cause a damage, long experiments studying throughput
of a data network using leased phone lines, etc.)
• Not possible at all if the system being investigated is not available (evaluation
of more possible alternatives in the design stage.)
Analysis: Common example of analysis can be seen as, use a formula of the Queuing
Theory to compute the average time spent in the system directly. To use a formula you
will have to assume certain queuing model, which means a considerable simplification of
the real system, and you will need some quantitative parameters.
Analysis (mostly mathematical) is typically based on strong assumptions that are
rarely true in practical life. Another possible drawback of analytical methods is too complicated
apparatus used and/or too time consuming computation. An example of this is analysis of
Queuing Networks. On the other hand, using formulae gives mostly fast results and it is
possible to check a large number of alternatives by simply inserting different values of
parameters to the formulae. Experimental methods are mostly much more time consuming.
Another problem of analysis is availability of necessary parameters. Their exact measuring
is also not necessarily feasible or it is impossible in the design stage. Using estimated data
or data taken from other similar systems decreases credibility of results.
Simulation: Simulations may be performed manually. Most often, however, the system
model is written either as a computer program or as some kind of input into simulator
software. A simulation generally refers to a computerized version of the model, which is
run overtime to study the implications of the defined interactions. Simulations are generally
iterative in their development. One develops a model, simulates it, learns from the
simulation, revises the model, and continues the iterations until an adequate level of
understanding is developed. Simulation is also an experimental method. Instead of experimenting
with the real system the experiments are performed with the simulation model (whose
design is thus the key point of simulation studies). Also simulation has many drawbacks.
Here are the most important ones:
• Too demanding creation of simulation models.
• Programming simulation models in general languages (like Pascal, Fortran) is
too difficult.
• There are efficient simulation languages but their mastering represents a big
initial investment not always justified.
• There are simulation-tools based typically on some graphical technique that
simplify or even automate creation of simulation models of certain class of
systems.
applicable copyright law.

• Only, limited knowledge of the system being simulated, and some quantitative
parameters must be known.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

32 MODELING AND SIMULATION CONCEPTS

These methods cannot be ranked because all of them have advantages and disadvantages.
They can be compared only in the context of certain particular case taking into account
various criteria.
Simulation could be much more flexible than analysis because simulation languages
support generation of random numbers with practically any distribution. In the above
example both random figures can be based on any distributions obtained experimentally.
Nevertheless any distribution needs either several parameters (if it is a theoretical one)
or directly the Distribution Function i.e., the distribution is obtained by measuring. There
can be also things in the system (typically in the design stage) that cannot be quantified
and often it is necessary to accept the fact that there might be aspects we are not aware
of at all, like to much time consuming computation. An example is analysis of large-scale
systems with many components working in parallel. Because application of real parallelism
is still not common, a program performed by a single processor simulates such systems.
Parallel activities are then performed one at a time. The result of this is the fact that
simulation could be much slower than the real time. In general 1 second of the model
time takes 10 minutes of the CPU time. This of course disables application of simulation
in real time control.
A general rule of thumb could be like that: “If the experiment is feasible, use it. It
is always the best method because all the aspects are taken into account. Even if other
methods were used during the design stage, experiment can serve as a final evaluation of
the system. If the experiment is not feasible try to find an appropriate analytical method.
If it is not available, simulation can be used.”
Simulation is not only the last option as it looks like in the above rule. Simulation
can contribute very much to understanding of the system being analyzed not only by
supplying answers to the questions that were originally given. Very often creation of the
simulation model is the first occasion where certain things are taken into account. Specification
of the simulated system can (and often it does) reveal errors or ambiguities in the system
design. So simulation can help very much by avoiding future very expensive updating of
the ready system. A simulation is an experiment performed on a model. A mathematical
simulation is a coded description of an experiment with a reference to the model to which
this experiment is to be applied. Simulation is imitation of the operation of a facility or
process, usually using a computer.

2.4 WHY IS SIMULATION IMPORTANT?


Simulation is the next best thing to observing a real system in operation since it
allows us to study the situation even though we are unable to experiment directly with
the real system, either because the system does not yet exist or because it is too difficult
or expensive to directly manipulate it. We consider simulation to include both the construction
of the model and the experimental use of the model for studying a problem. Thus, we can
think of simulation modeling as an experimental and applied methodology, which seeks to:
applicable copyright law.

• Describe the behavior of a system.


• Use the model to predict future behavior, i.e., the effects that will be produced
by changes in the system or in its method of operation.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 33

Except by experimenting with the real system, simulation is the only way available
for the analysis of arbitrary system behavior. Analytical techniques are just perfect, but
they usually require a set of simplifying assumptions to be made before they become
applicable. Reasons to use simulation:
• The physical system is not available.
• The experiment may be dangerous.
• The cost of experimentation is too high.
• Control variable, state variable and system parameter may be inaccessible.
• The time constants of the system are not compatible with those of experimenter.
• Suppression of disturbance.
• Suppression of second order effect.

2.5 WHEN TO USE SIMULATIONS?


Systems that change with time, such as a fuel filling center where vehicles come and
go and involve randomness are required to simulate. Nobody can guess at exactly which
time the next vehicle should arrive at the filling center, are good conditions for simulation.
Modeling complex dynamic systems theoretically need too many simplifications and the
emerging models may not be therefore valid. Simulation does not require so many simplifying
assumptions, making it the only tool even in absence of randomness. Simulations are
appropriate tool in following conditions:
• The knowledge gained in the designing of a model may be very helpful towards
suggesting improvements in the system under investigation.
• Simulation enables the study of, and experimentation with, the internal interaction
of the complex systems or subsystems.
• To study the effect of alterations to an existing system. Simulation compares
design alternatives for a system that does not exist.
• Informational, organizational, and environmental changes can be simulated,
and the effect of these changes on the models behavior can be observed.
• By changing simulation inputs and observing the results of output, valuable
insights may be obtained into which variable are most important and how
these variables interact.
• Simulation can be used as instructive device to support analytic solution methodologies.
• Simulation can be used to experiment with the new designs or policies prior
to implementation, so as to prepare for what may happen.
• Simulation can be used to verify analytical solution.
• Requirements can be determined by simulating different capabilities for a machine.
• Simulation can be used to study complex system, where analytic solutions are
applicable copyright law.

infeasible. Some modern systems are so complex that the interactions can be
organized only through simulation.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

34 MODELING AND SIMULATION CONCEPTS

A simulation is not appropriate in following conditions:


• If model assumptions are simple such that mathematical methods can be used to
obtain exact answers (analytical solutions), or a common sense can be used to
solve it.
• Simulation should not be used if the problem can be solved analytically.
• Simulation should not be used if it is easier to perform direct experiments.
• Simulation should not be used if the cost exceeds the savings.
• Simulation should not be used if the resources and time are not available.
• Simulation takes data, sometimes a large amount of data. If no data is available,
not even estimates, simulation is not advised.
• Simulation should not be used if there is no ability to verify and validate the
model.
• Simulation should not be used if the persons involved in simulation have unreasonable
expectations.
• Simulation should not be used if the system behavior is too complex or cannot
be defined.

2.6 HOW TO SIMULATE ?


System simulation is done to see its real life effect before its development. When the
decision is made for simulation a proper study of the system is must. In approaching a
system study, it is essential to consider first what mathematical techniques might be
applied to drive analytical solution. It is matter of judgment to decide whether the degree
of analysis is sufficient for simulation. When the decision is made for simulation in order
to use a more realistic system, it is still important to limit the amount the detail in the
model to the minimum level necessary. The step by step nature of the simulation technique
means that the amount of computation increases very rapidly as the amount of detail
increases.
Suppose we are interested in a vehicle fuel filling center. We may describe the
behavior of this system graphically by plotting the number of vehicles in the filling center
as the state of the system. Every time a vehicle arrives the graph increases by one unit
while a departing vehicle causes the graph to drop one unit. This graph, could be obtained
from observation of a real station, but could also be artificially constructed. Such artificial
construction and the analysis of the resulting sample path (or more sample paths in more
complex cases) consist of the simulation.

2.6.1 Final Experimental Design


If we have developed the model, verified its correctness, and validated its adequacy,
we again need to consider the final strategic and tactical plans for the execution of the
applicable copyright law.

experiments. We must update project constraints on time (schedule) and costs to reflect
current conditions. Even though we have exercised careful planning and budget control

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 35

from the beginning of the project, we must now take a hard, realistic look at what
resources remain and how best to use them. We will also have learned more about the
system in the process of designing, building, verifying and validating the model which we
will want to incorporate into the final plans. The design of a computer simulation experiment
is essentially a plan for purchasing a quantity of information that costs more or less
depending upon how it was acquired. Design profoundly affects the effective use of experimental
resources because:
• The design of the experiments largely determines the form of statistical analysis
that can be applied to the data.
• The success of the experiments in answering the desired questions is largely
a function of choosing the right design.
Simulation experiments are expensive both in terms of the analyst’s time and labor
and in some cases, in terms of computer time. We must therefore carefully plan and
design not only the model but also its use.

2.6.2 Experimentation and Analysis


Next we come to the actual running of the experiments and the analysis of the
results. We now have to deal with issues such as how long to run the model (i.e., sample
size), what to do about starting conditions, whether the output data are correlated, and
what statistical tests are valid on the data. Before addressing these concerns, we must
first ascertain whether the real system is terminating or non-terminating because this
characteristic determines the running and analysis methods to be used. In a terminating
system, the simulation ends when a critical event occurs. For example, a bank opens in
the morning empty and idle. At the end of the day it is once again empty and idle. Another
example would be a duel where one or both participants are killed or the weapons are
empty. In other words, a system is considered to be terminating if the events driving the
system naturally cease at some point in time. In a non-terminating system, no such
critical event occurs and the system continues indefinitely (e.g., a telephone exchange or
a hospital). A second system characteristic of interest is whether the system is stationary
or non-stationary. A system is stationary if the distribution of its response variable (and
hence it is mean and variance) does not change overtime. With such systems we are
generally concerned with finding the steady state conditions, i.e., the value which is the
limit of the response variable if the length of the simulation went to infinity without
termination. Whether the system is terminating or non-terminating, we must decide how
long to run the simulation model i.e., we must determine sample size. But first we must
precisely define what constitutes a single sample. There are several possibilities:
1. Each transaction considered a separate sample. For example, turn-around time
for each job or total time in the system for each customer.
2. A complete run of the model. This may entail considering the mean or average
value of the response variable for the entire run as being a datum point.
Multiple runs are referred to as replication.
applicable copyright law.

3. A fixed time period in terms of simulated time. Thus a simulation may be run
for n time periods, where a time period is an hour or a day or a month.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

36 MODELING AND SIMULATION CONCEPTS

4. Transactions aggregated into groups of fixed size. For example, we might take
the time in the system for each 10 jobs flowing through and then use the mean
time of the group as a single datum point. This is usually referred to as
batching.
If the system is a non-terminating, steady-state system we must be concerned with
starting conditions, i.e., the status of the system when we begin to gather statistics or
data. If we have an empty and idle system i.e., no customers present, we may not have
typical steady state conditions. Therefore, we must either wait until the system reaches
steady-state before we begin to gather data (warm-up period), or we must start with more
realistic starting conditions. Both of these approaches require that we be able to identify
when the system has reached steady-state.
Finally, most statistical tests require that the data points in the sample be independent
i.e., not correlated. Since many of the systems we model are queueing networks, they do
not meet this condition because they are auto-correlated. Therefore, very often we must
do something to assure that the data points are independent before we can proceed with
the analysis.

2.6.3 Implementation and Documentation


At this point we have completed all the steps for the design, programming and
running of the model as well as the analysis of the results. The final two elements that
must be included in any simulation study are implementation and documentation. No
simulation study can be considered successfully completed until its results have been
understood, accepted and used. It is remarkable how often modelers will spend a great
deal of time trying to find the most elegant and efficient ways to model a system and then
throw together a report to the sponsor or user at the last minute. If the results are not
used, the project was a failure. If the results are not clearly, concisely and convincingly
presented, they will not be used. The presentation of the results of the study is a critical
and important part of the study and must be as carefully planned as any other part of the
project. Among the issues to be addressed in the documentation of the model and study
are:
• Choosing an appropriate vocabulary (no technical jargon).
• Length and format of both written and verbal reports (short and concise).
• Timeliness.
• Must address the issues that the sponsor or user consider important.

2.6.4 Paths to Failure


Not all simulation studies are unqualified successes. In fact, unfortunately, too many
fail to deliver as promised. When we look at the reasons that projects fail, we find that
it is usually traceable to the same reasons over and over. Most failures occur on early
projects i.e., the first or second project undertaken by an organization. Many inexperienced
applicable copyright law.

modelers bite off more than they can chew. This is not surprising since in most cases they
have learned the science but not the art of simulation. This is why it is advisable to begin

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 37

with small projects that are not of critical significance to the parent organization. Almost
all other failures can be traced to one of the following:
• Failure to define a clear and achievable goal.
• Inadequate planning and underestimating the resources needed.
• Inadequate user participation.
• Writing code too soon before the system is really understood.
• Inappropriate level of included detail (usually too much).
• Wrong mix of team skills.
• Lack of trust, confidence and backing by management.

2.6.5 Paths to Success


Just as we can learn from studying projects that fail, we can also learn from those
that. Obviously the first thing we want to do is avoid the errors of those who fail. Thus
we want to:
• Have clearly defined and achievable goals.
• Be sure we have adequate resources available to successfully complete the
project on time.
• Have management’s support and have it known to those who must cooperate
with us in supplying information and data.
• Assure that we have all the necessary skills required available for the duration
of the project.
• Be sure that there are adequate communication channels to the sponsor and
end users.
• Have a clear understanding with the sponsor and end users as to the scope and
goals of the project as well as schedules.
• Have good documentation of all planning and modeling efforts.

2.7 BENEFITS AND PITFALLS IN SIMULATIONS


Simulation has a number of advantages over analytical or mathematical models for
analyzing systems. First of all, the basic concept of simulation is easy to comprehend and
hence often easier to justify to management or customers than some of the analytical
models. In addition, a simulation model may be more credible because its behavior has
been compared to that of the real system or because it requires fewer simplifying assumptions
and hence captures more of the true characteristics of the system under study.
The basic concept of simulation is easy to comprehend and hence often easier to
justify to management or customers than some of the analytical models. In addition, a
simulation model may be more credible because its behavior has been compared to that
applicable copyright law.

of the real system or because it requires fewer simplifying assumptions and hence captures
more of the true characteristics of the system under study. Every concept in itself has its

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

38 MODELING AND SIMULATION CONCEPTS

advantages and disadvantages. Sometimes developing a complete system without simulating


its behavior may be a risky task. If the system is not feasible then there is need to design
the system again with different parameters. This could play an important role and save
money to be wasted with wrong design. Here are some benefits and pitfalls of simulation:
• We can test new designs, layouts, etc., without committing resources to their
implementation.
• We can test new designs, layouts, etc., without committing resources to their
implementation.
• It can be used to explore new staffing policies, operating procedures, decision
rules, organizational structures, information flows, etc., without disrupting the
ongoing operations.
• Simulation allows us to identify bottlenecks in information, material and product
flows and test options for increasing the flow rates.
• Simulation allows us to test hypothesis about how or why certain phenomena
occur in the system.
• Simulation can be used to explore new staffing policies, operating procedures,
decision rules, organizational structures, information flows, etc., without disrupting
the ongoing operations.
• Simulation allows us to identify bottlenecks in information, material and product
flows and test options for increasing the flow rates.
• Simulation allows us to test hypothesis about how or why certain phenomena
occur in the system.
• New policies, operating procedures, decision rules, flow of information, etc.,
can be explored without disrupting ongoing operations of the real system.
• New hardware design, transportation system, physical layout, etc., can be
tested without committing resources for their acquisition.
• Time can be expanded or compressed allowing for a slowdown or speedup of
the phenomenon under investigation.
• Simulation allows us to control time. Thus we can operate the system for
several months or years of experience in a matter of seconds allowing us to
quickly look at long time horizons or we can slow down phenomena for study.
• Simulation allows us to gain insights into how a modeled system actually
works and understanding of which variables are most important to performance.
• Simulation’s great strength is its ability to let us experiment with new and
unfamiliar situations and to answer “ what if ” questions.
• Simulation modeling is an art that requires specialized training and therefore
skill levels of practitioners vary widely. The utility of the study depends upon
the quality of the model and the skill of the modeler.
• Gathering highly reliable input data can be time consuming and the resulting
applicable copyright law.

data is sometimes highly questionable. Simulation cannot compensate for inadequate


data or poor management decisions.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 39

• Simulation models are input-output models, i.e., they yield the probable output
of a system for a given input.
Even though simulation has many strengths and advantages, it is not without drawbacks.
Among these are:
• Simulation modeling is an art that requires specialized training and therefore
skill levels of practitioners vary widely. The utility of the study depends upon
the quality of the model and the skill of the modeler.
• Gathering highly reliable input data can be time consuming and the resulting
data is sometimes highly questionable. Simulation cannot compensate for inadequate
data or poor management decisions.
• Simulation models are input-output models, i.e., they yield the probable output
of a system for a given input. They are therefore “run” rather than solved.
They do not yield an optimal solution; rather they serve as a tool for analysis
of the behavior of a system under conditions specified by the experimenter.

2.8 SIMULATION AND ANALYTICAL METHODS


Extensive development has been made out in both the fields ever since the beginning
of quantitative science. Development of computing machines is evolved as substitute for
labor of human computers. Computers lower cost of approximations as compared to analytical
results. This can even lead to simply throwing it on the computer even when analytical
results are obtainable; even, indeed, when analytical results are well-known in the literature.
Comparisons. In approaching a system study, it is essential to consider what mathematical
techniques might be applied to derive analytical solutions. Mathematical techniques require
that the models should be expressed in some particular format. The system must be
approximated or abstracted in order to derive a model that fits the format of a mathematical
technique. It is the matter of judgment to decide whether the degree of abstraction
required to apply analytical methods is too difficult. To make this judgment consider all
questions to be answered in system study and the level to which the accuracy of answers
need to be known.

Table 2.1 Comparison between Analytical and Simulation methods

Analytical Methods Simulation Methods

• Analytical Methods produce general — Simulation methods give specific solutions.


solutions.
• In analytical method, all the conditions — Each execution of a simulation tells only
involved to solve a problem are conside- whether a particular set of conditions is
red. successful or not.
• Mathematical solution is preferable, — Many simulation runs may be needed to
when solution being sought is some find a maximum, and still undecided
applicable copyright law.

maximizing condition. whether it is a local or global maximum.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

40 MODELING AND SIMULATION CONCEPTS

• Analytical method produces solutions — To consider all conditions, the simulation


in a single run. process has to be repeated with many
different conditions.
• Many analytical results occur in the — Simulation is used to obtain results directly
form of complex series that still req- from a model with specific values.
uire extensive evaluation.
• Range of problems to be solved mathe- — Simulation is a powerful extension of
matically is limited. mathematical solutions.
• Analytical model of a system is fixed. — Simulation model of the desired system
changes as analyst modeling of the system
changes.

• Analytical methods employ the dedica- — Simulation models employ numerical


ted reasoning of mathematics to solve methods; models are run rather than
the model. solved.

• Analytical methods are expensive and — Simulation gives results in few minutes
time consuming. at a very low cost.

• Analytical model remains same. — Simulation model varies with experience


of the analyst.

The step-by-step nature of the simulation technique means that the amount of computation
increases very rapidly as the amount of details increases. The best way of using simulation
is an extension of mathematical solution. This can be achieved at the cost of too much
simplification. Simple limitations on the system can easily be removed by simulation.
When a solution of the problem is known, then also simulation provides a quick and more
convenient way of deriving results.

2.9 BASIC NATURE OF SIMULATION


The simulation techniques make no specific attempt to isolate the relationships
between any particular variable, instead it explore the way in which all variables of the
model change with time. For a better simulation, the relationship among the variable
must be derived from the observations. Following are the main points regarding the
nature of simulation:
Simulation imitates the operations of a facility or process, usually via computer:
• What system is being simulated?
• To study system, often make assumptions/approximations, both logical and
mathematical operations, about how it works.
These assumptions form a model of the system to be simulated if model structure
applicable copyright law.

is simple enough, we can use mathematical methods to get exact information on questions
of interest i.e., analytical solution.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 41

But most complex systems require models that are also complex (to be valid) it must
be studied via simulation i.e., evaluate model numerically and collect data to estimate
model characteristics.
Example: Manufacturing Company considering extending its plant:
• Build it and see if it works out?
• Simulate current, expanded operations i.e., we can also investigate many other
issues along the way, quickly and cheaply.
Some (not all) application areas:
• Designing and analyzing manufacturing systems.
• Evaluating military weapons systems or their logistics requirements.
• Determining hardware requirements or protocols for communications networks.
• Determining hardware and software requirements for a computer system.
• Designing and operating transportation systems such as airports, freeways, ports,
and subways.
• Evaluating designs for service organizations such as call centers, hospitals, fast
food restaurants, and post offices.
• Reengineering of business processes.
• Determining ordering policies for an inventory system.
• Analyzing financial or economic systems.
Surveys of use of Operations Research/Modeling Simulation techniques:
• Simulation consistently ranked as one of the three most important techniques.
• Simulation was second only to the broad category of “mathematical programming”.
Impediments to acceptance, use of simulation:
• Models of large systems are usually very complex.
• But now we have better modeling software i.e., more general, flexible, but still
(relatively) easy to use.
• Can consume a lot of computer time.
• But now have faster, bigger, cheaper hardware to allow for much better studies
than just a few years ago and this trend will continue.
• However, simulation will also continue to push the envelope on computing power
in that we ask more and more of our simulation models.
• Impression that simulation is “just programming”.
• There is a lot more to a simulation study than just coding a model in some
software and running it to get the answer.
applicable copyright law.

• Require careful design and analysis of simulation models i.e., simulation


methodology.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

42 MODELING AND SIMULATION CONCEPTS

2.10 THE SIMULATION PROCESS


The essence or purpose of simulation modeling is to help the ultimate decision-
maker to solve a problem. Therefore, to learn to be a good simulation modeler, one must
merge good problem-solving techniques with good software engineering practice. We can
identify the following steps, which should be present in any simulation study:
1. Problem Definition. Clearly defining the goals of the study so that we know
the purpose, i.e., why are we studying this problem and what questions do we
hope to answer?
2. Project Planning. It is assurance about sufficient and appropriate personnel,
management support, computer hardware, and software resources to do the
job.
3. System Definition. Determining the boundaries and restrictions to be used
in defining the system (or process) and investigating how the system works.
4. Conceptual Model Formulation. It is developing a preliminary model either
graphically (e.g., block diagram or process flow chart), or in pseudo-code to
define the components, descriptive variables, and interactions (logic) that constitute
the system.
5. Preliminary Experimental Design. Selecting the measures of effectiveness
to be used, the factors to be varied, and the levels of those factors to be
investigated, i.e., what data need to be gathered from the model, in what form,
and to what extent.
6. Input Data Preparation. Identifying and collecting the input data needed by
the model.
7. Model Translation. It is formulation of the model in an appropriate simulation
language.
8. Verification and Validation. Confirming that the model operates the way
the analyst intended (debugging) and that the output of the model is believable
and representative of the output of the real system.
9. Final Experimental Design. Designing an experiment that will yield the
desired information and determining how each of the test runs specified in the
experimental design is to be executed.
10. Experimentation. Executing the simulation to generate the desired data and
to perform sensitivity analysis is experimentation.
11. Analysis and Interpretation. Drawing inferences from the data generated
by the simulation runs.
12. Implementation and Documentation. It is the process of reporting the
applicable copyright law.

results, putting the results to use, recording the findings, and documenting the
model and its use.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or
applicable copyright law.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

44 MODELING AND SIMULATION CONCEPTS

to the analyst in vague and imprecise terms, such as costs are too high or, “too many jobs
are late.” We must consider the sponsor’s problem description as a set of symptoms
requiring diagnosis. The usual flow of events will be:
Diagnosis of symptoms ⇒ Problem definition ⇒ System definition ⇒ Model formulation.
It is important to remember that we do not model a system just for the sake of
modeling it. We always model to solve a specific problem. Among the questions to be
answered at the beginning of the study are:
• What is the goal of the study i.e., what is the question to be answered or
decision to be made?
• What information do we need to make a decision?
• What are the precise criteria we will use to make the decision?
• Who will make the decision?
• Who will be affected by the decision?
• How long do we have to provide an answer?
Once we have those answers we can begin to plan the project in detail. An important
aspect of the planning phase is to assure that certain critical factors have been considered.
Among these are:
• Do we have management support and has its support for the project been
made known to all concerned parties?
• Do we have a competent project manager and team members with the necessary
skills and knowledge available for sufficient time to successfully complete the
project?
• Do we have sufficient time, computer hardware and software available to do
the job?
• Have we established adequate communication channels so that sufficient information
is available on project objectives, status, changes in user or client needs etc.,
to keep everyone (team members, management, and clients) fully informed as
the project progresses?

2.10.2 Steps in a Simulation Study


Figure 2.2 shows a set of steps to guide a model builder in a thorough and sound
simulation study. The main steps are as following:
1. Problem Formulation. Every simulation study begins with a statement of
the problem. If the statement is provided by those that have the problem
(client), the simulation analyst must take extreme care to insure that the
problem is clearly understood. If a problem statement is prepared by the
simulation analyst, it is important that the client understand and agree with
the formulation. It is suggested that a set of assumptions be prepared by the
simulation analyst and agreed to by the client. Even with all of these precautions,
applicable copyright law.

it is possible that the problem will need to be reformulated as the simulation


study progresses.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 45

2. Setting of Objectives and Overall Project Plan. Another way to state this
step is prepare a proposal. This step should be accomplished regardless of
location of the analyst and client, viz., as an external or internal consultant.
The objectives indicate the questions that are to be answered by the simulation
study. The project plan should include a statement of the various scenarios
that will be investigated. The plans for the study should be indicated in terms
of time, which will be required, personnel that will be used, hardware and
software requirements if the client wants to run the model and conduct the
analysis, stages in the investigation, output at each stage, cost of the study and
billing procedures, if any.
3. Model Conceptualization. The real-world system under investigation is abstracted
by a conceptual model, a series of mathematical and logical relationships concerning
the components and the structure of the system. It is recommended that
modeling begin simply and that the model grow until a model of appropriate
complexity has been developed. For example, consider the model of a manufacturing
and material handling system. The basic model with the arrivals, queues and
servers is constructed. Then, add the failures and shift schedules. Next, add
the material-handling capabilities. Finally, add the special features. Constructing
an unduly complex model will add to the cost of the study and the time for its
completion without increasing the quality of the output. Maintaining client
involvement will enhance the quality of the resulting model and increase the
client’s confidence in its use.
4. Data Collection. Shortly after the proposal is accepted a schedule of data
requirements should be submitted to the client. In the best of circumstances,
the client has been collecting the kind of data needed in the format required,
and can submit these data to the simulation analyst in electronic format.
Oftentimes, the client indicates that the required data are indeed available.
However, when the data are delivered they are found to be quite different than
anticipated. When the study commenced, the data delivered were the average
talk time of the reservationist for each of the years. Individual values were
needed, not summary measures. Model building and data collection are shown
as contemporaneous in figure 2.2. This is to indicate that the simulation analyst
can readily construct the model while the data collection is progressing.
5. Model Translation. The conceptual model constructed in Step 3 is coded into
a computer recognizable form, an operational model.
6. Verification. Verification concerns the operational model. These models are
orders of magnitude smaller than real models (say 50 lines of computer code
versus 2,000 lines of computer code). It is highly advisable that verification
take place as a continuing process. It is ill advised for the simulation analyst
to wait until the entire model is complete to begin the verification process.
applicable copyright law.

Also, use of an interactive run controller, or debugger, is highly encouraged as


an aid to the verification process.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

46 MODELING AND SIMULATION CONCEPTS

Problem Formulation
1

Setting of objectives and overall project plan


2

3 4
Model building Data collection

Coding 5

No

Verified? 6

Yes
No 7 No
Validated?

Yes
Experimental design 8

9 Production runs and analysis

Yes Yes

More runs?
10
No

Document program
11 and report results

12 Implementation

Fig. 2.2 Steps in a simulation study

7. Validation. Validation is the determination that the conceptual model is an


accurate representation of the real system. Can the model be substituted for
applicable copyright law.

the real system for the purposes of experimentation? If there is an existing


system, call it the base system, then an ideal way to validate the model is to

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 47

compare its output to that of the base system. Unfortunately, there is not
always a base system. There are many methods for performing validation.
8. Experimental Design. For each scenario that is to be simulated, decisions
need to be made concerning the length of the simulation run, the number of
runs (or say replications), and the manner of initialization, as required.
9. Production Runs and Analysis. Production runs, and their subsequent analysis,
are used to estimate measures of performance for the scenarios that are being
simulated.
10. More Runs? Based on the analysis of runs that have been completed, the
simulation analyst determines if additional runs are needed and if any additional
scenarios need to be simulated.
11. Documentation and Reporting. Documentation is necessary for numerous
reasons. If the simulation model is going to be used again by the same or
different analysts, it may be necessary to understand how the simulation model
operates. This will enable confidence in the simulation model so that the client
can make decisions based on the analysis. Also, if the model is to be modified,
this can be greatly facilitated by adequate documentation. The result of all the
analysis should be reported clearly and concisely. This will enable the client to
review the final formulation, the alternatives that were addressed, the criterion
by which the alternative systems were compared, the results of the experiments,
and analyst recommendations, if any.
12. Implementation. The simulation analyst acts as a reporter rather than an
advocate. The report prepared in step 11 stands on its merits, and is just
additional information that the client uses to make a decision. If the client has
been involved throughout the study period, and the simulation analyst has
followed all of the steps rigorously, then the likelihood of a successful implementation
is increased.

2.11 TYPES OF SYSTEM SIMULATION


Continuous system and discrete system simulation are two main types of system
simulation on the basis of continuous and discrete systems.

2.11.1 Continuous System Simulation


Let us first discuss, what are continuous events?
Continuous Events. In Continuous events the state variables change continuously
as a function of time, for example airplane flight; the state variables like position, velocity
change continuously. The distributed lag model is continuous event model and the simulation
of such model is continuous system simulation. This model describes how the attribute
of the system are related to each other in the form of linear algebraic equations. In
applicable copyright law.

general, in continuous system, the relationships describe the rates at which the attributes
change, so that the model contains differential equations.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

48 MODELING AND SIMULATION CONCEPTS

Continuous System Simulation. Continuous system simulation typically solves


sets of differential equations numerically overtime, may involve stochastic elements. Some
specialized software available for continuous system simulation. Some discrete-event simulation
software can also formulate continuous simulation as well.
Consider the pair of first order ordinary differential equations known as the Lotka-
Volterra predator-prey model.
y1′′ = (1 – alpha*y2)*y1
y2′′ = (–1 + beta*y1)*y2
The functions y1 and y2 measure the sizes of the prey and predator populations
respectively. The quadratic cross term accounts for the interactions between the species.
Note that the prey population increases when there are no predators, but the predator
population decreases when there are no prey. To simulate a system, create a function (or
say MATLAB file) that returns a column vector of state derivatives, given state and time
values. For this example, we have created a file called LOTKA.M.
type lotka
function yp = lotka(t, y)
%LOTKA Lotka-Volterra predator-prey model. It was developed by Lotka (in 1925)
and Volterra (in 1926), independently.
yp = diag([1 - .01*y(2), -1 + .02*y(1)])*y;
To simulate the differential equation defined in LOTKA over the interval
0 < t < 15, invoke ODE23 (Command in Matlab). Use the default relative accuracy of 1e-3
(0.1 percent).
Time history Phase plane Plot

ode23
400 400
ode45

350 350

300 300

250 250

200 200

150 150

100 100

50 50

0 0
0 5 10 15 20 0 5 10 15 20
Fig. 2.3 Time history and phase plane plot
applicable copyright law.

% Define initial conditions.


t0 = 0;

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 49

tfinal = 15;
y0 = [20 20]’;
% Simulate the differential equation.
tfinal = tfinal*(1+eps);
[t,y] = ode23(‘lotka’,[t0 tfinal],y0);
%Plot the result of the simulation two different ways.
subplot(1,2,1)
plot(t,y)
title(‘Time history’)
subplot(1,2,2)
plot(y(:,1),y(:,2))
title(‘Phase plane plot’)
Now simulate LOTKA using ODE45 (Matlab Command), instead of ODE23. ODE45
takes longer at each step, but also takes larger steps. Nevertheless, the output of ODE45
is smooth because by default the solver uses a continuous extension formula to produce
output at 4 equally spaced time points in the span of each step taken. The plot compares
this result against the previous.
[T,Y] = ode45(‘lotka’,[t0 tfinal],y0);
subplot(1,1,1)
title(‘Phase plane plot’)
plot(y(:,1),y(:,2),’-’,Y(:,1),Y(:,2),’-’);
legend(‘ode23’,‘ode45’)

Phase Plane Plot

350 ode23
ode45
300

250

200

150

100

50

0
0 20 40 60 80 100 120 140 160
applicable copyright law.

Fig. 2.4 Simulate using ode45 instead of ode23

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

50 MODELING AND SIMULATION CONCEPTS

2.11.2 Discrete System Simulation


Let us discuss first, what are discrete-events?
Discrete-event. Between two consecutive events, nothing happens i.e., the graph is
horizontal. When the number of events is finite, we call the events “discrete-events.” In
some systems the state changes all the time, not just at the time of some discrete-events.
For example, the water level in a reservoir with given in and outflows may change all the
time. In such cases “continuous simulation” is more appropriate, although discrete-event
simulation can serve as an approximation.
A discrete-event simulation is one in which the state of a model changes at only a
discrete, but possibly random, set of simulated time points. Two or more traffic units often
have to be manipulated at one and the same time point. Such simultaneous movement
of traffic at a time point is achieved by manipulating units of traffic serially at that time
point. This often leads to logical complexities in discrete-event simulation because it
raises questions about the order in which two or more units of traffic are to be manipulated
at one time point.
Discrete System Simulation. Discrete-event simulation models typically have stochastic
components that mimic the probabilistic nature of the system under consideration. Successful
input modeling requires a close match between the input model and the true underlying
probabilistic mechanism associated with the system. Discrete simulation deals with systems
whose dynamics can be considered as a sequence of events at discrete time points. The
key point of a discrete simulation language is the way it controls the proper sequencing
of activities in the model. This is also the way a user must view the world when using
the language and a base for classification of discrete simulation languages.
The discrete-event simulation formalism fits the general structure of deterministic,
causal systems in classical systems theory. Discrete-event simulation allows for the description
of system behavior at two levels. At the lowest level, an atomic discrete-event simulation
describes the autonomous behavior of a discrete-event system as a sequence of deterministic
transitions between sequential states as well as how it reacts to external input (events)
and how it generates output (events). At the higher level, a coupled discrete-event simulation
describes a system as a network of coupled components. The components can be atomic
discrete-event simulation models or coupled discrete-event simulation in their own right.
The connections denote how components influence each other. In particular, output events
of one component can become, via a network connection, input events of another component.
It is shown in how the discrete-event simulation formalism is closed under coupling: for
each coupled discrete-event simulation, a resultant atomic discrete-event simulation can
be constructed. As such, any discrete-event simulation model, be it atomic or coupled can
be replaced by an equivalent atomic discrete-event simulation. The construction procedure
of a resultant atomic discrete-event simulation is also the basis for the implementation
of an abstract simulator or solver capable of simulating any discrete-event simulation
model. As a coupled discrete-event simulation may have coupled discrete-event simulation
components, hierarchical modeling is supported.
applicable copyright law.

Discrete-event systems are dynamic systems, which evolve in time by the occurrence
of events at possibly irregular time intervals. Discrete-event systems abound in real-world

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 51

applications. Examples include traffic systems, flexible manufacturing systems, computer-


communications systems, production lines, coherent lifetime systems, and flow networks.
Most of these systems can be modeled in terms of discrete events whose occurrence
causes the system to change from one state to another. In designing, analyzing and
operating such complex systems, one is interested not only in performance evaluation but
also in sensitivity analysis and optimization.
A typical stochastic system has a large number of control parameters that can have
a significant impact on performance of the system. To establish a basic knowledge of the
behavior of a system under variation of input parameter values and to estimate the
relative importance of the input parameters, sensitivity analysis applies small changes to
the nominal values of input parameters. For systems simulation, variations of the input
parameter values cannot be made infinitely small. The sensitivity of the performance
measure with respect to an input parameter is therefore defined as (partial) derivative.
A discrete-event simulation is one, which employs a next-event technique to control
the behavior of the model. Many applications of discrete simulation involve queuing
systems of one kind or another. The queuing structure may be obvious as in a queue of
jobs waiting to be processed on a batch computer or in a stack of aircraft waiting for
landing space at an airport.
As another example, consider customer waiting in a queue in the bank to get service,
at grocery store, at red light crossing etc. In the simplest case, the queue would operate
with a first-in first-out (FIFO) discipline. The main features of discrete system simulation
are as following:
• Study of complex systems.
• Computation of physical times that would occur in real time in a physical
system.
• Implementation of sequential simulators.
• Implementation of manufacturing systems.
• Events are processed in time stamp order.
• Unprocessed events are stored in pending event list.
The major limitations in discrete system simulations are:
• A conflict due to simultaneous internal and external events is resolved.
• By ignoring the internal event. It should be possible to explicitly specify behavior
in case of conflicts.
• There is limited potential for parallel implementation.

2.11.3 Real-time Simulation


The general process by which a mathematical model of an engineering system is
constructed, involves understanding of physical of chemical laws. This includes a number
applicable copyright law.

of experiments of measurements to derive the different coefficients of the model. This can
be particularly time consuming if the model is not being simplified by assuming linearity.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

52 MODELING AND SIMULATION CONCEPTS

Detailing of system experiments or measurements and preliminary work could be avoided


if an actual device can be used, rather than constructing a model. Real-time simulation
uses this approach.
In Real-time simulation, actual devices are used in conjunctions with either digital
or hybrid computer to provide simulation of the parts of the system that do not exist or
that cannot conveniently be used in an experiment. These actual devices used in experiment
should be the part of the desired system. Real-time simulation involves interaction with
human being to avoid designing of human model.
Real-time simulation requires computers that can operate in real-time. These computers
must be able to respond immediately to signals sent from the physical devices and sent
out signals at specific points in time. Real-time simulation is used in many areas such as
in aerospace industry. Simulators, provide human beings with a substitute for some environment
or situation. Best example of simulators is used in training astronauts. They are suspended
in spring harnesses that reduce their apparent weight to that which occurs on the moon
surface. Since the main purpose of such devices is to duplicate some sort of sensory
stimulus, they cannot properly be classified as computers.
The figure 2.5 shows the variation of real-time simulation from analytical solutions.

Real-time Simulation
Faster than
Real-time
Real-time
Virtual Time

Analytical

Slower than Real-time

Wall Clock Time

Fig. 2.5 Real-time simulations Vs. Analytical solution

2.11.4 Hybrid Simulation


Hybrid Computer is combination of traditional analog-computer elements, giving
smooth, continuous outputs, and elements carrying out some non-linear, digital operations
as storing values, switching, and performing logical operations. Integration of analog
computer capabilities and special-purposes or specially constructed devices is hybrid computer.
applicable copyright law.

Hybrid computers may be used to simulate systems that are mainly continuous but
have some digital element also. Hybrid computers are also useful when a system that can

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 53

be adequately represented by an analog computer model is the subject of a repetitive


study. Hybrid computer can be arranged to carry out large portion of the study without
human intervention.
For most of system studies, it is clear that model built can be either continuous or
discrete. This factor determines whether analog or digital computers are used for system
simulation. This is the time when we have combined discrete-continuous simulation and
so we have to combine analog and digital computers to provide hybrid simulation. The
arrangement of hybrid simulation depends upon the requirements of the application.
One computer may be simulating the system being studied, whereas the other provides
a simulation of the environment in which the system to operate. Simulated system is an
interconnection of continuous and discrete subsystems. This system can be modeled best
by linkage of an analog computer and a digital computer.
Hybrid simulation has become easier due to the availability of minicomputers, which
has lowered the cost and allows dedicated computers for an application. High-speed converters
are needed to transform signals from one from of representation to the other. Hybrid
simulation is used for the linkage of functionally distinct analog and digital computers
done for the purpose of simulation.

2.11.5 Simulation of Stochastic Processes


In simulation of stochastic processes, we model a particular system by studying the
flow of entities that move through that system. Entities can be customers, job orders,
particular parts, information packets, etc. An entity can be any object that enters the
system, moves through a series of processes, and then leaves the system. These entities
can have individual characteristics which we will call attributes. An attribute is associated
with the specific, individual entity. Attributes might be such things as name, priority, due
date, required CPU time, account number etc. As the entity flows through the system, it
will be processed by a series of resources. Resources are anything that the entity needs
in order to be processed. For example, resources might be workers, material handling
equipment, special tools, a hospital bed, access to the CPU, a machine, waiting or storage
space, etc. Resources may be fixed in one location (e.g., a heavy machine, bank teller,
hospital bed) or moving about the system (e.g., a forklift, repairman, doctor). A simulation
model is therefore a computer program which represents the logic of the system as
entities with attributes arrive, join queues to await the assignment of required resources,
are processed by the resources, released and exit the system. In addition to the logic of
how an entity flows through the system, the computer program keeps track of and
advances time, as well as keeping track of resource utilization, time spent in queues, time
in the system (processing time), and other desired statistics. Much of what happens in the
system is probabilistic or stochastic in nature. For example the time between arrivals, the
time for a resource to process the entity, the time to travel from one part of the system
to another and whether a part passes inspection or not, are usually all random variables.
It is these types of data for input to the model that are difficult to obtain.
applicable copyright law.

To perform statistical analysis of the simulation output we need to establish some


conditions, e.g., output data must be a covariance stationary process (e.g., the data collected
over n simulation runs).

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

54 MODELING AND SIMULATION CONCEPTS

Stationary Process (strictly stationary): A stationary stochastic process is a


stochastic process {X(t), t ∈ T} with the property that the joint distribution all vectors of
h dimension remain the same for any fixed h.
First Order Stationary: A stochastic process is a first order stationary if expected
of X(t) remains same for all t.
Second Order Stationary: A stochastic process is a second order stationary if it is
first order stationary and covariance between X(t) and X(s) is function of t’s only.

2.11.6 Social Simulation


Social scientists have always constructed models of social phenomena. Simulation is
an important method for modeling social and economic processes. There are different
types of computer simulation and their application to social scientific problems. Faster
hardware and improved software have made building complex simulations easier. Computer
simulation methods can be effective for the development of theories as well as for prediction.
For example, macroeconomic models have been used to simulate future changes in the
economy; and simulations have been used in psychology to study cognitive mechanisms.
As a general approach in the field, a world is specified with much computational
detail. Then the world is simulated to reveal some of the non-trivial implications of the
world. When these non-trivial implications are made known in world, apparently it constitutes
some added values.

2.11.7 Web-based Simulation


Web-based simulation is quickly emerging as an area of significant interest for both
the simulation researchers and simulation practitioners. This interest in web-based simulation
is a natural outgrowth of the proliferation of the World Wide Web and its attendant
technologies, e.g., HTML, HTTP, CGI, etc. Also the surging popularity of, and reliance
upon, computer simulation as a problem solving and decision support systems tools.
The appearance of the network-friendly programming language, Java, and of distributed
object technologies like the Common Object Request Broker Architecture (CORBA) and the
Object Linking and Embedding/Component Object Model (OLE/COM) have had particularly
acute effects on the state of simulation practice.
Currently, the researchers in the field of web-based simulation are interested in
dealing with topics such as methodologies for web-based model development, collaborative
model development over the Internet, Java-based modeling and simulation, distributed
modeling and simulation using web technologies, and new applications.

2.11.8 Parallel and Distributed Simulation


The increasing size of the systems and designs requires more efficient simulation
strategies to accelerate the simulation process. Parallel and distributed simulation approaches
seem to be a promising approach in this direction. Major topics under such simulations are:
applicable copyright law.

• Synchronization, scheduling, memory management, randomized and reactive/


adaptive algorithms, partitioning and load balancing.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 55

• Synchronization in multi-user distributed simulation, virtual reality environments,


and interoperability.
• System modeling for parallel simulation, specification, re-use of models/code,
and keeping parallel existing simulations.
• Language and implementation issues, models of parallel simulation, execution
environments, and libraries.
• Theoretical and empirical studies, prediction and analysis, cost models, benchmarks,
and comparative studies.
• Computer architectures, telecommunication networks, VLSI, manufacturing,
dynamic systems, and biological/social systems.
• Web based distributed simulation such as multimedia and real-time applications,
fault tolerance, implementation issues, use of Java, and CORBA.

2.11.9 Object-oriented Simulation


Object-Oriented Simulation (OOS) can be considered as a special case of Object Oriented
Programming (OOP). Some principles of OOP like existence of a varying number of
instances of interfering objects have been in standard use in simulation environment for
a long time, often using other terminology. The Simula language is the first true object-
oriented language. Being more than 38 years old, it still has most (and all important)
mechanisms and principles of OOP. Some things like classes, inheritance, virtual methods,
etc., have been defined in Simula long time before; they were rediscovered by the Object
Oriented Programming boom in recent years.
Object-oriented simulation offers excellent tools for treating models of complex dynamic
systems. First of all, we must decide when the system is really complex. Obviously, a
system described by a huge set of equations is not necessarily complex. We can solve on
a computer set of thousands of simultaneous differential equations, but this does not
mean that the model we solve is complex. On the other hand, a system may result to be
complex even if the equations are apparently simple, but the system components have
very distinct dynamic behavior or if they are of different kind. We say that a dynamic
system is complex, if it has multiple components that reveal different dynamic properties.
This may occur, for example, when all system components are continuous with concentrated
parameters, but the model includes very fast and very slow parts.
Other example is a system where discrete parts interact with continuous sub models
of different speed and different kind, for example, an electronic circuit that contains
integrated circuits as well as electro-mechanical parts such as relays and motors. In other
words, the model complexity has little to do with the model size. Using object-oriented
approach we can simulate complex systems creating objects that simulate system sub
models and run concurrently. The idea is to launch a set of objects and to coordinate them
by other object that only connects the sub models and controls a general (global) interaction
rules. Thus, a sub model of very different kind can run and interact in the same simulation
applicable copyright law.

program; some of them with integration step thousands of times smaller than others and
some of them being discrete or combined.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

56 MODELING AND SIMULATION CONCEPTS

2.11.10 On-line Simulation


Internet together with Java and JavaScript offers incredible possibilities in problem
solving. Instead of time consuming downloading and installation of software packages, it
is possible to open directly various solvers, especially for problems that are not frequent
and that do not require time consuming computation. Such simulations are available on
Internet, for example, Silk, SLX, STARDIS, RT-LAB, JSIM, etc. In the near future it will
be more and more difficult to draw a line between web simulation and traditional simulation.
Web simulation must allow the simulation and interaction of distributed entities. Not all
of the tools are ready for this, but they somehow aim in that direction.

2.11.11 Simulation-based Optimization Techniques


Discrete-event simulation is the primary analysis tool for designing complex systems.
Simulation, however, must be linked with optimization techniques to be effectively used
for systems design. In this we present several optimization techniques involving both
continuous and discrete controllable input parameters subject to a variety of constraints.
The aim is to determine the techniques most promising for a given simulation model.
Many man-made systems are modeled as Discrete Event Systems (DES); examples
are computer systems, PERT networks, manufacturing systems, nuclear systems, and
traffic transportation systems. Discrete Event Systems evolve with the occurrence of
discrete events, such as the arrival of a job or the completion of a task, in contrast with
continuously variable dynamic processes such as aerospace vehicles, which are primarily
governed by differential equations. Owing to the complex dynamics resulting from stochastic
interactions of such discrete-events overtime, the performance analysis and optimization
of discrete-event systems can be difficult tasks. At the same time, since such systems are
becoming more widespread as a result of modern technological advances, it is important
to have tools for analyzing and optimizing the parameters of these systems.
Analyzing complex Discrete Event Systems often requires computer simulation. In
these systems, the objective function may not be expressible as an explicit function of the
input parameters; rather, it involves some performance measures of the system whose
values can be found only by running the simulation model or by observing the actual
system. On the other hand, due to the increasingly large size and inherent complexity of
most man-made systems, purely analytical means are often insufficient for optimization.
In these cases, one must resort to simulation, with its chief advantage being its generality,
and its primary disadvantage being its cost in terms of time and money. Even though, in
principle, some systems are analytically tractable, the analytical effort required to evaluate
the solution may be so formidable that computer simulation becomes attractive. While the
price for computing resources continues to dramatically decrease, one nevertheless can
still obtain only a statistical estimate as opposed to an exact solution. Practically, this is
quite sufficient.
These man-made Discrete Event Systems are costly, and therefore it is important to
operate them as efficiently as possible. The high cost makes it necessary to find more
efficient means of conducting simulation and optimizing its output. We consider optimizing
applicable copyright law.

an objective function with respect to a set of continuous and/or discrete controllable


parameters subject to some constraints.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 57

End
Begin / Input Data Simulator Output Data

Optimizer

Fig. 2.6 An optimizer support system

2.12 GENERATION OF RANDOM NUMBERS


What we call a Random Number Generator (RNG) is actually a program that produces,
a deterministic and periodic sequence of numbers, once its initial state is chosen. In
generating sequences of random numbers we wish to duplicate, in effect, a game in which
a fair wheel of fortune is spun and the outcome of the game is recorded after each
spinning. If the periphery of the wheel of fortune is divided into m equal intervals which
are indexed with the integers from 1 to m, this game produces independent random
integers which are uniformly distributed in 1 to m range.
There are basically two ways of obtaining sequences of random numbers for a simulation
experiment. The first way is simply to read the random numbers from a list of such
numbers which has already been compiled by somebody else. For example, a table with
1 million random digits was published in 1955 by the Rand Corporation. Such tables of
random numbers have been recorded on magnetic tape and can thus be read quickly by
a digital computer.
The second way (the most common) is to have the computer itself generate a sequence
of random numbers. This is accomplished by having the computer execute a short program
every time a new random number is needed. This computer program essentially uses the
last random number produced, say the (n – 1)st in the sequence, to produce the next
random number, say the nth in the sequence. The specific method employed can be any
one of the congruential methods.
For instance, the mixed congruential method uses the expression
xn = axn-1 + c (modulo m) ...(2.1)
where xn and xn-1 are the nth and (n – 1)st random numbers in the sequence, respectively,
and a, c, and m are suitably chosen positive integers with a < m and c < m. The indication
“modulo m” means that xn is the remainder of the division of the quantity axn-1 + c by the
number m. For example, if a = 5, xn-1 = 7, c = 3, and m = 16, we have axn-1 + c = 38 and
applicable copyright law.

xn= 38 (modulo 16) = 6.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

58 MODELING AND SIMULATION CONCEPTS

How many different numbers can we obtain through equation (2.1)? Obviously, at most,
m, that is all the numbers between 0 and m - 1. For example, with a = 5, c = 3, x = 7, and
m = 16, we obtain x1 = 6 (as we just saw) and then x2 = 1, x3 = 8, x4 = 11, x5 = 10,
x6 = 5, x7 = 12, x8 = 15, x9 = 14, x10 = 91, x11 = 01, x12 = 3, x13 = 2, x14 = 13, and x15 = 4, in
all the 16 different numbers in the range from 0 to 15. What is x16 in this sequence? We have
a·x15 + c = 23 and x16 = 23 (modulo m) = 7. Thus, the earlier sequence will now be repeated
once again with x17 = 6, x18 = 1, and so on.
The example above illustrates two interesting points. First, any sequence of random
numbers produced through equation (2.1) is cyclical. Each cycle consists of a necessarily
finite number of distinct numbers (at most m). After a cycle has been completed, a new cycle
identical to the previous one begins. (In our example each cycle consists of 16 distinct
numbers.) The finiteness of the cycles will obviously cause problems in a simulation if the
length of a cycle is small: a succession of identical short cycles of numbers definitely does
not behave as a sequence of independent random numbers (we have xn+t where τ is the
length of the cycle). However, if m is a very large number and a and c are chosen with
sufficient care to make the length of each cycle comparable to the size of m, the finiteness
of the cycles is of no practical significance. Consider the case when m is chosen to be
equal to 2b, where b is the number of bits in a binary computer word. This is the choice
of m made in computer-based simulations, since 2b is the total number of integers that
can be expressed in binary form with the number of bits available. When b = 32, we have
m = 232 distinct numbers. With a cycle length in this order of magnitude, it is an entirely
academic matter that the same sequence of numbers will be repeated at some future point.
The second observation concerns the meaning of the word random in the case of
sequences produced through equation (2.1). Obviously, if we know a, c, and m we can
predict perfectly the complete sequence that will follow any initial number x0. For this
reason, the initial number x0 used to produce some sequence of numbers is called the seed
of this sequence. For the same reason, the sequences of numbers produced through
equation (2.1) (as well as through other congruential methods) are also called pseudo-
random numbers. This, however, is also of academic importance as long as the sequences
of numbers produced through equation (2.1) qualify (through passing the appropriate
statistical tests) as independent samples from a discrete, uniform probability distribution,
that is, as long as the successive numbers appear to an observer to be drawn from a game
similar to the spinning wheel game that we described earlier.
In fact, the property of reproducibility for the sequences generated through equation
(2.1) is in itself a most desirable one. For, when we wish to perform a simulation experiment
under “identical conditions” with some earlier experiment, all we have to do is provide the
same seed, x0, used in the earlier experiment to obtain the same sequence of random (or
pseudo-random) phenomena as before.
We have yet to say how the constant positive integers a and c in equation (2.1) are
applicable copyright law.

chosen. An unfortunate choice of a and c will unavoidably lead to short cycles of numbers
(which are usually anything but uniformly distributed) even for a large m. The branch of

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 59

mathematics called number theory provides the guidelines for a good choice of a and c.
For instance, in the case of digital computers, whereas we have mentioned, we use m =
2b, it can be shown that a should be chosen such that it is equal to 1 in modulo 4
arithmetic (i.e., a = 1, 5, 9, 13 .... ) and that c should be an odd number. The choice of x0,
the seed, is immaterial in this case as far as the length of the cycle is concerned.
The desirable properties of any method for producing sequences of random numbers
in a digital computer are:
1. The numbers should appear to be statistically independent of each other (although,
strictly speaking, they are perfectly correlated).
2. The numbers should be uniformly distributed over some range.
3. The sequence of numbers should not be self-repeating for any desired length.
4. The random numbers should be producible at very high speed.
5. The method should place minimal requirements on the memory of the computer.
6. Any sequence of random numbers obtained during a given simulation experiment
should be reproducible.
The congruential method that we have just described is typical of the techniques
used to generate random numbers and possesses all of the properties listed above.
In a practical sense, the important fact is that any modern computer system is
preprogrammed to produce sequences of random numbers that possess-at least as all six
close approximation of the desirable properties mentioned above. Typically, these numbers
are produced by just calling an appropriately named function or subroutine in the computer
repertoire (typical names for these mini programs include RAND, RANDU, etc.). All that
is required of the programmer is to provide a seed to begin the sequence. The computer
subsequently provides automatically the input (i.e., the number xn-1 in the mixed congruential.
method) needed to produce the next number, xn, in the sequence.
The random numbers produced through these preprogrammed methods are usually
presented in the form of numbers uniformly distributed between 0.0 and 1.0. Obviously,
the 0 to 1 interval is thus subdivided so finely that, for all practical purposes, it can be
assumed that the computer produces statistically independent samples from the continuous
uniform probability density function shown on figure 2.7. This, too, will be our assumption
from here on, and we shall use the expression independent uniformly distributed over
[0, 1] random numbers.
Classical uniform random number generators have some major defects, such as,
short period length and lack of higher dimension uniformity. However, nowadays there is
a class of rather complex generators, which is as efficient as the classical generators while
enjoy the property of a much longer period and of higher dimension uniformity. Computer
programs that generate random numbers use an algorithm. That means if you know the
algorithm and the seed values you can predict what numbers will result. Because you can
applicable copyright law.

predict the numbers they are not truly random they are pseudorandom. For statistical
purposes good pseudorandom numbers generators are good enough.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

60 MODELING AND SIMULATION CONCEPTS

The following figure shows the graph of random variable x with the uniform probability
density function over [0, 1].

fX (x)

0 1 x

Fig. 2.7 The random variable X with the uniform PDF on [0,1]

real function random()


/* This program returns a pseudo-random numbers with rectangular distribution
between 0 and 1. The cycle length is 6.95E+12. IX, IY and IZ should be set to integer
values between 1 and 30000 before the first entry. Integer arithmetic up to 30323 is
required. */
integer ix, iy, iz
common /randc/ ix, iy, iz
ix = 171 * mod(ix, 177) - 2 * (ix / 177)
iy = 172 * mod(iy, 176) - 35 * (iy / 176)
iz = 170 * mod(iz, 178) - 63 * (iz / 178)
if (ix .lt. 0) ix = ix + 30269
if (iy .lt. 0) iy = iy + 30307
if (iz .lt. 0) iz = iz + 30323
/* If integer arithmetic up to 5212632 is available, the preceding 6 statements may
be replaced by:
ix = mod(171 * ix, 30269)
iy = mod(172 * iy, 30307)
iz = mod(170 * iz, 30323) */
random = mod(float(ix) / 30269. + float(iy) / 30307. + float(iz)
/ 30323., 1.0)
return
end
applicable copyright law.

real function uniform()


/*Generate uniformly distributed random numbers using the 32-bit generator. The
cycle length is claimed to be 2.30584E+18 Seeds can be set by calling the routine set_uniform.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 61

integer*4 z, k, s1, s2
common /unif_seeds/ s1, s2
save /unif_seeds/
k = s1 / 53668
s1 = 40014 * (s1 - k * 53668) - k * 12211

if (s1 .lt. 0) s1 = s1 + 2147483563


k = s2 / 52774
s2 = 40692 * (s2 - k * 52774) - k * 3791
if (s2 .lt. 0) s2 = s2 + 2147483399
z = s1 - s2
if (z .lt. 1) z = z + 2147483562
uniform = z / 2147483563.
return
end
subroutine set_uniform(seed1, seed2)
/* Setting of seeds for the uniform random number generator. */
integer*4 s1, s2, seed1, seed2
common /unif_seeds/ s1, s2
save /unif_seeds/
s1 = seed1
s2 = seed2
return
end

2.12.1 Generation of Uniformly Distributed Random Numbers


A FORTRAN code is given below for a generator of uniform random numbers on
[0,1]. Given method is multiplicative linear congruential generator suitable for a 16-bit
platform. It combines three simple generators. It is constructed for more efficient use by
providing for a sequence of such numbers, LEN in total, to be returned in a single call.
A set of three non-zero integer seeds can be supplied, failing which a default set is
employed. If supplied, these three seeds, in order, should lie in the ranges [1,32362],
[1,31726] and [1,31656] respectively.
/* This is the code for portable random number generator for 16-bit computer. It
generates a sequence of LEN pseudo-random numbers, returned in variable RVEC. */
SUBROUTINE RANECU (RVEC, LEN)
applicable copyright law.

DIMENSION RVEC(*)
SAVE ISEED1, ISEED2, ISEED3

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

62 MODELING AND SIMULATION CONCEPTS

DATA ISEED1, ISEED2, ISEED3/1234, 5678, 9876/


/* Default values, used if none supplied via an ENTRY call at RECUIN */
DO 100 I = 1, LEN
K=ISEED1/206
ISEED1 = 157 * (ISEED1 - K * 206) - K * 21
IF(ISEED1.LT.0) ISEED1=ISEED1+32363
K=ISEED2/217
ISEED2 = 146 * (ISEED2 - K*217) - K* 45
IF(ISEED2.LT.O) ISEED2=ISEED2+31727
K=ISEED3/222
ISEED3 = 142 * (ISEED3 - K *222) - K * 133
IF(ISEED3.LT.0) ISEED3=ISEED3+31657
IZ=ISEED1-ISEED2
IF(IZ.GT.706)IZ = Z - 32362
IZ = 1Z+ISEED3
IF(IZ.LT.1)IZ = 1Z + 32362
RVEC(I)=REAL(IZ) * 3.0899E - 5
100 CONTINUE
RETURN
ENTRY RECUIN(IS1, IS2, IS3)
ISEED1=IS1
ISEED2=IS2
ISEED3=IS3
RETURN
ENTRY RECUUT(IS1,IS2,IS3)
IS1=ISEED1
IS2=ISEED2
IS3=ISEED3
RETURN
END

2.12.2 Generation of Non-uniformly Distributed Random Numbers


So far we have seen how we can use random number generators to produce numbers
applicable copyright law.

in uniform distributions, either discrete, or continuous. However, given a uniform distribution


of random numbers in the range [0, 1], we can use easily use this as starting point for

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

  
f ( x) x      

 




    


 
 


   
    

  
      


 
applicable copyright law.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

64 MODELING AND SIMULATION CONCEPTS

h(x)

f(x)

Fig. 2.8 Curve for Von Neumann’s method

Assuming the required distribution f(x) is known over some range [a, b] and that one
can find a second constant function h(x) = m (parallel line to x axis) such that M > f(x)
over the whole range. Then one can generate the distribution of random numbers in the
f(x) distribution using the following steps:
(1) Generate a random number, u, from a uniform distribution in the range [a, b]
(2) Generate a random number, v, from a uniform distribution in the range [0, M]
(3) If v < f(u) we have a hit and we accept the random number u else we have a
miss and we reject the number and go back to step 1.
For example, to generate a random values of in the range of 0 to 5 with a probability
distribution of f ( x) = x 2

25

f(x)

0
0 x 5
applicable copyright law.

Fig. 2.9 Probability distribution of f ( x) = x 2

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 65

Using Von Neumann’s Method we can generate a single random number using a
do-while-loop in C language:
do {
x = 5.0 * (double)rand()/RAND_MAX ;
prob = 25.0*(double)rand()/RAND_MAX;
}
while ( prob > x*x );

Here we first generate a value of x from a uniform distribution. Then a second


random number from [0, 25] is used to accept or reject an event, by comparing this
probability with the value of x2.

2.13 MONTE CARLO SIMULATION


Monte Carlo simulation allows using the most convenient distributions to communicate
opinions about the randomness in measurements. For example, a measurement process
employing N repetitions of a measurement can be handled explicitly as repeated measurements
drawn from a Gaussian, or as a single value drawn from a shifted and scaled Student-t
distribution. The former approach may facilitate communication with those who are unfamiliar
with the proper use of student distributions and who would not really understand the
latter approach. The process of Monte Carlo simulation circumvents many complexities of
the combination of uncertainty distributions, and only requires combination of the values
from the simulated measurements.
It is a simulation in which random statistical sampling techniques are employed such
that the result determines estimates for unknown values. Monte Carlo computation (method
or technique) was originated during World War II by Ulam and Von Neumann at the Los
Alamos Scientific Laboratory. When this approach was applied to problems related to the
development of the atomic bombs. In order to design nuclear shields, it was required to
know how far neutrons would travel through various materials. The problem was:
(a) Too difficult to solve analytically.
(b) Too hazardous.
(c) Too time consuming to solve experimentally.
Due to above reasons, the experiment was simulated on high-speed computer using
random numbers. This technique was called Monte Carlo technique based on a gambling-
like principle.
Monte Carlo applications are sometimes classified as being simulation and vice versa,
presumably because so many simulations involve use of random numbers. Simulation and
applicable copyright law.

Monte Carlo are both numerical computational techniques. Simulation applies to dynamic
models whereas Monte Carlo technique applies to static models.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

66 MODELING AND SIMULATION CONCEPTS

Deterministic Problems through Random Numbers


Consider a quadrant of a unit circle (see figure 2.10).

1 C

y (x, y)

0 x 1
A B

Fig. 2.10 Monte Carlo Evaluation of π

All the points satisfying the equation (2.9) lies in this quadrant
x2 + y2 ≤ 1 where x, y ≥ 0 ...(2.9)
Equation (2.9) can be rewritten as

...(2.10)
y
On generating a pair of uniform random number r 1 and r 2 and in the range
(0, 1). The pair (r1, r2) is acceptable if equation (2.3) becomes else the pair is rejected.
Another pair of uniform random number is generated and tested. Clearly, the entire
rejected points lie above the curve and those accepted pair lie below the curve.

2
r2 ≤ 1 − r1 ...(2.11)

If we generate a large number of random pairs (N) and compute the ratio of the
number of pairs accepted (n) to those generated, and if N points are used and n of them
fall under the curve, than approximately
π/2 π/2 π/2
n f ( x) dx f ( x) dx
N
= ∫0
Area of rec tan gle ABCD
= ∫0
1×1
= ∫
0
f (x) dx ...(2.12)

The accuracy improves as the number N increase limit 0 to π/2 as curve is starting
from x-axis and ending at y-axis. When it is decided that sufficient points have been taken,
n
the value of the integral is estimated by multiplying by the area of rectangle ABCD.
N
The ratio will approach the area under the curve, which is π/4. Thus by using random
number a completely deterministic problem is solved, called Monte Carlo technique. In
applicable copyright law.

this example area under the curve was evaluated through rejection technique.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 67

2.13.1 Monte Carlo Methods


The random number generator picks a new random number every time it is called.
The numbers are not really random. Actually the numbers are determined by some rule
one after another, but they have good statistical properties and can be used for integration
and to simulate randomness. The numbers are uniformly distributed integers that fall
between 0 and RAND_MAX which is 2147483648 in this system. To get a random number
that is uniformly distributed between zero and one, we compute
double x;
. . .
x = rand () / 2147483648.0;
Program to compute Pi. Here we use the Monte Carlo method to compute the
area of the part inside the unit circle relative to the area of the unit square. The value
of π is four times this fraction.
/* Monte Carlo Pi montecarlopi.c */
# include <stdio.h>
# include <stdlib.h>
# include <math.h>
# include <time.h>
int main ( void )
{
double x, y, p, s=0.0, ranmaxpo;
int i, j, k, n = 1000000;
ranmaxpo = 1.0 + RAND_MAX;

srand ( (unsigned int)time ( NULL ) ); /* seed for rand is time */


printf ( “ n\t\t\t\tMonte Carlo Pi MCP - pi\n” );
for ( k=1; k<= 10; k++ )
{
j=0;
for ( i=1; i <= n; i=i+1 )
{
x = rand () / ranmaxpo;
y = rand () / ranmaxpo;
if ( x * x + y * y <= 1 )
j++;
applicable copyright law.

}
p = 4.0 * j / n;

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

68 MODELING AND SIMULATION CONCEPTS

s = s + p;
printf ( “%4d The approximate for pi is %21.15f %21.15f\n”, k, p, p-M_PI);
}
p = s / 10.0;
printf ( “ Average approximate for pi is %21.15f %21.15f\n”, p,
p-M_PI );
printf ( “ pi = %21.15f \n”, M_PI );
return EXIT_SUCCESS;
}

Monte-Carlo method for calculating pi

/* Source code montecarlo.c */


#include <stdio.h>
#include <stdlib.h>
#define RANDOM_MAX 2147483648
int main() {
int i=0, j=0;
float x, y;
while(1) {
x = (double)random()/(double)RANDOM_MAX;
y = (double)random()/(double)RANDOM_MAX;
if ((x*x + y*y) < 1)
j++;
i++;
if (i%1000000 == 1)
printf(“%f\n”,4*(float)j/(float)i);
}
}

Monte Carlo Method for the integral of f(x). Here is a program that uses the Monte
Carlo method to compute the integral of a function. We compute the area that is both
under the curve 0 ≤ y ≤ f(x) and in the box a ≤ x ≤ b and 0 ≤ y ≤ c .
/* For Monte Carlo integral, we assume that the function is given between
a <= x <= b We compute the area of the { (x,y) : a <= x <= b and 0 <= y <= min(c,f(x)) }
by counting the relative number of random points in the rectangle [a,b]x[0,c] that fall in
applicable copyright law.

the set. mo_ca_int.c */

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 69

# include <stdio.h>
# include <stdlib.h>
# include <math.h>
double f( double x );
int main ( void )
{
double a, b, c, d, x, y, p, q, r, sum=0.0, ans, ranmaxpo;
int i, j, k, m=15, n=2000000;
ranmaxpo = 1.0 + RAND_MAX;
printf ( “ Enter the left, right and upper bounds : ”);
scanf ( “%lf %lf %lf”, &a, &b, &c );
a = fabs ( a );
b = fabs ( b );
c = fabs ( c );
if ( b < a )
{
d = a;
a = b;
c = d;
}
printf ( “\n Monte Carlo Integration of min(f(x),%f) over %f <= x <= %f\n”, c,
a, b);

d = pow( c, 1.0 / 3.0 );


if ( d >= b)
ans = ( b * b + a * a) * ( b * b - a * a ) / 4.0;
else if ( d <= a )
{
ans = c * ( b - a );
printf(“ Note that here f(x) > %f for %f < x <= %f\n”, c, a, b );
}
else
{
applicable copyright law.

ans = ( d * d + a * a ) * ( d * d - a * a ) / 4.0 + ( b - d ) * c;
printf(“ Note that here f(x) > %f for %f < x <= %f\n”, c, d, b );

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

70 MODELING AND SIMULATION CONCEPTS

}
printf( “\n\t n\t Approximate the integral\t\tError\n”);
for(k=1;k<= m; k++)
{
j = 0;
q = c / ranmaxpo;
r = ( b - a ) / ranmaxpo;
for ( i = 1; i <= n; i = i+1 )
{
x = a + r * rand ();
y = q * rand ();
if ( f(x) > y )
j++;
}
p = ( b - a ) * c * j / n;
printf ( “%12d%22.15f%22.15f\n”, k, p, p - ans );
sum = sum + p;
}
p = sum / m;
printf ( “Average int =%21.15f%22.15f\n”, p, ans - p );
printf ( “Actual int = %21.15f”, ans );
printf ( “ Number of points is %ld\n”, (long int)n * (long int)m );
return EXIT_SUCCESS;
}
double f( double x )
{
return x * x * x;
}

2.13.2 Random Number Generation through Hill-Wichmann Algorithm


The source code for implementing the Hill-Wichmann algorithm is given below, with
comments (indicated by “ ‘ ”) for explanation. This is a very short and powerful algorithm
applicable copyright law.

which relies on integer arithmetic to generate a very long stream (6.95E+12) of pseudo-
random numbers uniformly distributed in the interval between 0 and 1.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 71

Public Static Function randHW() As Double


‘ User VBA function implements the Hill-Wichmann random number generator
‘ Pseudo-Random Number Generator.
‘ C IX, IY, IZ SHOULD BE SET TO INTEGER VALUES BETWEEN 1 AND 30000
‘ C BEFORE FIRST ENTRY (THIS IS THE ‘SEEDING’ PROCEDURE)
‘ IX = MOD(171 * IX, 30269)
‘ IY = MOD(172 * IY, 30307)
‘ IZ = MOD(170 * IZ, 30323)
‘ RANDOM = AMOD(FLOAT(IX)/30269# + FLOAT(IY)/30307# + FLOAT(IZ)/30323#, 1#)
‘Note: the FORTRAN function AMOD(A,P) = A - (INT(A / P) * P)
‘ VBA Mod function rounds non-integer values of A,P FIRST, so this cannot be
used in the last line.
Dim ix As Long, iy As Long, iz As Long
Dim sx As Single, sy As Single, sz As Single
Dim sum As Single
Dim seeded As Boolean ‘initialized to ‘False’
If seeded = False Then
ix = 123 ‘ use fixed initial seeds
iy = 234
iz = 345
‘ iz = CLng(30000.*Time + 1.) ‘ use random seed (1 <= iz <= 30001)
‘ based on the current time
seeded = True ‘ don’t re-seed every time!
End If
‘ the guts of the linear congruential algorithm is only three lines long
ix = 171 * ix Mod 30269
iy = 172 * iy Mod 30307
iz = 170 * iz Mod 30323
‘ convert the integer values to single precision reals for arithmetic
sx = CSng(ix) / 30269! ‘ ! ensures denominator is single precision real
sy = CSng(iy) / 30307!
sz = CSng(iz) / 30323!
sum = sx + sy + sz
‘ take the fractional part of the sum as the random number
randHW = sum - Int(sum)
applicable copyright law.

‘ some cleaning here to be sure we stay ‘inside the lines’

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

72 MODELING AND SIMULATION CONCEPTS

If randHW <= 0# Then randHW = 0.0000003


If randHW >= 1# Then randHW = 1# - 0.0000003
End Function
Another common method for generating high-quality random numbers drawn from
a standard Gaussian relies on a simple mathematical transformation originally conceived
by Box and Muller. Below is a VBA function that uses the Box-Muller method to transform
uniformly distributed random numbers on the interval (0,1), created using the Hill-Wichmann
algorithm discussed above and shown, into random numbers drawn from a standard Gaussian
distribution, centered on zero and with unit standard deviation.

Public Function randBM()


‘ User function to transform uniform random numbers from randHW (x,y)
‘ into standard normal variates (r1, r2) using the Box-Muller transformation
Dim x As Double, y As Double, s As Double, r1 As Double, r2 As Double
Const TWO_PI As Double = 2# * 3.14159265358979
x = randHW() ‘ generate two uniform random numbers, x and y
y = randHW()
s = Sqr(-2# * Log(x)) ‘ transform to normal random numbers, r1 and r2
r1 = s * Cos(TWO_PI * y)
r2 = s * Sin(TWO_PI * y)
randBM = r1 ‘ return the cosine term; throw away the sine term
End Function

2.14 PENDULUM SIMULATION

2.14.1 Mathematical Presentation


The pendulum is modeled as a point mass at the end of a massless rod. We define
the following variables:
• θ = angle of pendulum (0=vertical)
• R = length of rod
• T = tension in rod
• m = mass of pendulum
• g = gravitational constant.
We will derive the equation of motion for the pendulum using the rotational analog
of Newton’s second law for motion about a fixed axis, which is τ = Iα where
• τ = net torque
applicable copyright law.

• I = rotational inertia
• α = θ "= angular acceleration.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 73

The rotational inertia about the pivot is I = mR2. Torque can be calculated as the
vector cross product of the position vector and the force. The magnitude of the torque due
to gravity works out to be τ = –Rmgsinq. So we have–R mgsinq = mR2 α which simplifies to
q’’ = – g/R sinq
This is the equation of motion for the pendulum.

C Language Implementation
/* pendulum.c Mimic ODE simulation for the one link pendulum */

#include <stdio.h>
#include <math.h>

#define LENGTH (1.0f) // length of pendulum


#define WIDTH (0.1f) // width of pendulum
#define MASS (1.0f) // mass of link
#define G (9.81f)
#define TIMESTEP 0.01

/* Score parameters */
#define VISCOUS_FRICTION 0.1
#define STATE_PENALTY 0.1

/* servo gains */
double k = 5.0;
double b = 1.0;

// moment of inertia of pendulum around joint.


double I_joint = MASS*(LENGTH*LENGTH + WIDTH*WIDTH)/12 +
MASS*LENGTH*LENGTH/4;
double time = 0.0; // keep track of how much time has passed.
double score = 0; // keep track of the score so far.
FILE *data_file = NULL;

main()
{
applicable copyright law.

double angle_desired = M_PI;


double angle = 0;

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

74 MODELING AND SIMULATION CONCEPTS

double angular_velocity = 0;
double new_angular_velocity = 0;
double angular_acceleration = 0;
double torque = 0;
double total_torque = 0;
double score = 0;
int count = 0;

data_file = fopen( “data”, “w” );


if ( data_file == NULL )
{
fprintf( stderr, “Cannot open data file.\n” );
exit( -1 );
}

for( ; ; )
{
torque = -k*( angle - angle_desired ) - b*angular_velocity;
total_torque = torque - VISCOUS_FRICTION*angular_velocity
- MASS*G*LENGTH*0.5*sin(angle);
angular_acceleration = total_torque/I_joint;
new_angular_velocity = angular_velocity + angular_acceleration* TIMESTEP;
angle += (new_angular_velocity + angular_velocity)*TIMESTEP/2;
angular_velocity = new_angular_velocity;
time += TIMESTEP;
score += torque*torque*TIMESTEP + STATE_PENALTY*TIMESTEP* (angle -
angle_desired)* (angle - angle_desired);

if ( time < 3.0 )


{
fprintf( data_file, “%g %g %g %g %g\n”, time, angle, angular_velocity, torque, score );
}
applicable copyright law.

else

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 75

{
fclose( data_file );
exit( -1 );
}

// Printing output data


count++;
if ( (count % 100) == 0 )
{
printf( “%g %g %g %g %g\n”, time, angle, angular_velocity, torque, score );
}
}
}

2.15 DISTRIBUTED LAG MODELS


When the model is large or more complex then the record keeping becomes troublesome.
Then it becomes important, the use of computer and a suitable programming language for
simulation. There are some applications of simulation, which are using simple techniques
but can be applied without difficulty, even for large models. If all the events occur synchronously,
at fixed intervals of time, then the computation remains simple. Distributed lag models
are the models which have the following properties:
(a) Changing only at fixed intervals of time.
(b) Basing current values of the variables on other current values and values that
occurred in previous intervals.
These are used extensively in econometric studies where the uniform steps correspond
to a time interval, such as a month or a year, over which some economic data are
collected. These models consist of linear, algebraic equations. They represent a continuous
system, but one in which the data in only available at fixed points in time.
Any variable that appears in the form of the current value and one or more previous
intervals is called lagged variable. Its value in the previous interval in denoted by attaching
the suffix-n to the variable, where n indicates the interval. 1 denotes the previous interval,
2 denotes the one prior to that and so on.
In distributed lag model an initial set of values is given for all variables and values
of the variables at the end of one interval can be derived. Taking these values as the new
values of the lagged variables, the values can be derived at the end of second interval and
so on. Distributed log models are conceptually simple and they can be computed by hand
or run extensively on computers. The value of computers is its more conventional data-
applicable copyright law.

processing capability.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

76 MODELING AND SIMULATION CONCEPTS

2.16 COBWEB MODELS


The cobweb model explains why prices in certain markets are subject to periodical
fluctuations. It is an economic model of cyclic supply and demand in which there is a lag
between responses of producers to a change of price. The basic model of supply and
demand, the price adjusts so that quantity supplied and the quantities demanded are
equal. The precise mechanism that achieves this equilibrium is not always unambiguous.
The cobweb model shows how achieving supply and demand equilibrium might be so
automatic if, as seems reasonable the supplier’s set the price and the consumer react with
a quantity demanded. For some scopes of the demand and supply changes, the equilibrium
can be unstable. The cobweb model is a classical demonstration that dynamic behavior by
economic agents might not converge to a stable equilibrium with supply equal to demand.
This application provides two ways to graph the outcome and let you experiment with the
key parameter that determines whether the outcome is stable or not.
The cycle continues to repeat in one of three ways, if the slopes when drawn so that
supply was steeper than demand (on price axis), the fluctuation would get wider and wider
and fluctuations may become more and more drastic and so a plot of the equilibriums in
each period overtime would look like an outward spiral (divergent). Alternatively, fluctuation
may become less and less drastic and so a plot of the equilibrium in each period overtime
would look like an inward spiral (convergent). Fluctuations may also remain constant
(stable), and so a plot of equilibriums would produce a simple, this scenario is unlikely in
the short to medium term. In either of the first two scenarios, the combination of the
spiral and the supply and demand curves often look like a cobweb hence the name of the
theory.

y
Express
20.0
Price

0 Quantity Express Demand x

Fig. 2.11 Supply and Demand Curve

The inventory-based price model relaxes the assumption that supply must be equal
to demand to consider how maintaining an inventory might moderate the possible instability.
applicable copyright law.

For example, Retail stores, very often buy an inventory, set a price, and then wait to see
what demand might be.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 77

The inventory base-pricing model illustrates that the cobweb might or might not be
a realistic challenge to supply and demand equilibrium. Introducing an inventory buffering
the difference between supply and demand and letting prices respond to the level of
inventory can be sufficient to eliminate the instability observed for the basic cobweb
model. There are two ways to present the cobweb models:
(a) The Traditional Cobweb Model: This shows the cobweb by alternating between
supply and demand.
(b) The Simultaneous Cobweb Model: This determines supply and demand jointly.

y
4.0

0.0 x

Fig. 2.12 Cobweb of Supply and Demand

One criticism of this model is its assumption that producers are extremely short
sighted, they are fundamentally unable to judge market conditions of learn from their
pricing mistakes that results in surplus or shortfall cycles. This assumption is seen to be
unrealistic.

2.17 OVERVIEW OF MODEL EXECUTION


(1) Experiments, Replications, and Runs. A simulation project is composed of
experiments. Experiments are differentiated by the use of alternatives in a model’s logic
and/or data. An alternate part sequencing rule might be tried, for example, or the quantity
of various machines might be varied.
Each experiment consists of one or more replications (trials). A replication is a
simulation that uses the experiment’s model logic and data but a different set of random
numbers, and so produces different statistical results that can then be analyzed across a
set of replications. A replication involves initializing the model, running it until a run-
ending condition is met, and reporting results. This “running it” phase is called a run.
(2) Inside a Run. During a run the simulation clock (an internally managed, stored
applicable copyright law.

data value) tracks the passage of simulated time (as distinct from wall-clock time). The
clock advances in discrete steps (typically of unequal size) during the run. After all possible

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

78 MODELING AND SIMULATION CONCEPTS

actions have been taken at a given simulated time; the clock is advanced to the time of
the next earliest event. Then the appropriate actions are carried out at this new simulated
time, etc.
The execution of a run thus takes the form of a two-phase loop: “carry out all
possible actions at the current simulated time,” followed by “advance the simulated clock,”
repeated over and over again until a run-ending condition comes about. The two phases
are here respectively called the Entity Movement Phase (EMP) and the Clock Update
Phase.

2.18 APPLICATION AREAS OF SIMULATION

2.18.1 Simulation in Healthcare


Simulation is an extremely useful tool for modeling uncertainty, which is a major
characteristic of illness and, hence, makes simulation so attractive for modeling healthcare
systems. In addition, simulation enables the modeling of complex systems with lots of
interacting parts, which is another common feature of healthcare systems. Given the
many potential applications of simulation in healthcare, it might be useful to categorize
these applications, to help identify the problems amenable to solution by simulation.
Healthcare applications tend to fall into two major categories: (1) “analytic” decisions with
uncertain components; and (2) comparison of alternative systems for determining resource
or scheduling requirements. To focus the discussion of these two types of applications,
certain types of simulation models are excluded. The categorization includes stochastic
simulation models and excludes deterministic models. Stochastic models contain probabilistic
(i.e., random) components, while deterministic models do not. Only stochastic models are
included in this discussion, because these types of models generally provide more accurate
and informative representations of healthcare systems, given the random nature of illness
and its response to treatment. However, the term “simulation” in the broadest sense
refers to the operation of a model of a system, and there are many mathematical models
of systems that do not include stochastic components. Therefore, readers will see many
articles in the healthcare literature in which the term “simulation” is used when it refers
to a deterministic model. The categorization also excludes applications for which continuous
simulation is used. This type of simulation involves modeling of a system in which the
input variables change continuously with respect to time, and these changes are typically
defined by differential equations. Continuous simulation is frequently used for modeling
biological processes and pharmacokinetic applications, but has also been used for epidemiologic
models of disease progression. Continuous simulation models are not included here, since
the focus of the discussion is on the application of simulation for improving the organization
and delivery of care.
The simulation steps play an important role in a simulation study. The major steps
include: (1) problem formulation; (2) setting of objectives and overall project plan;
(3) model building; (4) data collection; (5) coding; (6) verification; (7) validation; (8) experimental
applicable copyright law.

design; (9) production runs and analysis; (10) repeat of step (9) if necessary; (11) documentation
of program and reporting of results; and (12) implementation of proposed system. (Steps

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 79

3 and 4 take place concurrently.) The following paragraphs present recommendations for
accomplishing some of these steps when developing simulation models. The recommen-
dations are probably applicable to all types of simulation models, not just those in healthcare;
but they are based on experience with healthcare projects.

2.18.2 Simulation in Airport Design


Airport design is, by far, the largest practice area for Transsolutions. This is a unique
area, with many differences from typical simulation in manufacturing or logistics. Passengers
and bags arrive at the airport by the planeload. At the busiest airports the arrivals and
departures are coordinated, so that several flights arrive within a short time. Then, after
a short time on the ground the aircraft all depart again. A large number of passengers
move through the facility during the peak period between the flight arrivals and the
departures. After that, the facility will be empty until the next bank of arriving flights.
The terminal facilities must be sized to handle these waves of passengers throughout the
day. Space within the terminal building is at a premium. Most travelers are aware of the
ticket counters, gate lounges, corridors and shops in the public areas. Hidden behind the
scenes are the various offices, control rooms, and break areas for the airport and airline
employees. The baggage system and various maintenance functions take up most of the
space on the ramp level below the passenger areas. The usual question asked by the
architects is: “will the facility, as designed, satisfy the needs of the tenant airlines?” This
involves comparing the “performance” of the facility to minimum acceptable standards. A
typical example is that all passengers connecting from an arriving flight to a departing
flight must be able to reach their departure gate within 30 minutes of arrival. Another
example all baggage must be delivered to the claim area within 20 minutes of the flight
arrival. There may be many other performance requirements, depending on the size and
scope of the project.
Airspace/Airfield Capacity. Aircraft are required to maintain separation between
other aircraft. As aircraft approach an airport they are funneled closer together with
many routes converging into common links. Simulation is useful to evaluate the capacity
of the link node network and to evaluate alternative link node structures that could
improve capacity. Additionally, ground movements of aircraft represent another link node
network. Arriving aircraft move from runways to taxiways to taxi-lanes and eventually to
their gates. Aircraft may need to hold on the airfield before reaching to their gate due to
general ramp congestion or due to gate unavailability. Departing aircraft follow the reverse
process and also usually wait in a departure queue before accessing the runway for take-
off. The movement of the aircraft must be carefully planned since many taxi-lanes and
taxiways are bidirectional and can only accommodate aircraft movement in one direction
at a time. Additionally, aircraft need to be able to stop or park at designated areas on the
airfield so that they do not impede the movements of other aircraft. Simulation is frequently
used in airfield analyses to determine the benefit (capacity improvements or delay reduction)
of adding new runways, taxiways, and taxi-lanes, as well as evaluating how alternative
gate allocation strategies impact airfield capacity.
applicable copyright law.

Ramp Operations. Ramp operations are generally much more complicated than
most people realize. There are many different functions working in coordination with each

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

80 MODELING AND SIMULATION CONCEPTS

other to ensure the efficient utilization of aircraft. Services performed on aircraft include
fueling, catering, lavatory cleaning, baggage loading and unloading, cargo loading and
unloading. The vehicles performing these services all compete for usage of the same
roadways.
Cargo Handling. Airports are large centers for cargo distribution. In addition to
planning the pick-up and deliver goods from aircraft, most large airports have main cargo
buildings where cargo sortation is performed.
Baggage Handling. Each airline and airport must be able to get a passengers’ bag
from either the curb or the Airport Ticket Office (ATO) to the departing aircraft. At
smaller airports, bag handling is often performed manually, after a bag is delivered to the
ramp side of the terminal via a conveyor belt. Larger airports utilize very complex
sortation systems to route bags to specific piers or circulating make-up devices. A bag
system may also incorporate security screening, early bag storage, and manual encode
stations (to identify and manually re-direct bags with missing or unreadable bag tags.) The
bag system must ensure that all bags handled throughout the airport can be delivered to
their destination gates in time to reach the departing flight. Three technologies dominate
airline baggage handling today: conventional conveyor, tilt-tray, and automated guided
vehicles.
Passenger Flow. Passenger flow is described in three component sections: general
circulation, automated people mover systems, and Federal Inspection Services.
General Circulation. Airport facilities should ensure that passengers experience an acceptable
level of service while in the facility. This includes factors such as not having to wait too long
in queue at a ticket counter or gate, not having to walk extremely long distances in the
terminal, not being crammed into elevators, hallways, or waiting areas where there is little
or no ability to circulate. Most importantly all passengers should be able to comfortably
reach their gate by either walking or using a moving walkway or airport train. Simulation
is frequently used to predict passenger connection times, to determine expected occupancy
levels at various locations throughout an airport terminal, or to determine how long passengers
will wait at various points throughout the terminal.
Automated People Mover Systems. Most large airports have a light rail system that
will connect passengers between terminal buildings. For these systems additional design
issues must be considered such as transport time, capacity and station location.
Federal Inspection Services. Passengers arriving to an airport coming from a destination
outside of the US and its territories are required to be screened through Immigration, US
Customs, and US Agriculture. These facilities must also be properly sized to ensure that
all of the passengers using the facility are processed in time to meet connecting flights.
Problem Identification. The first step in any study is to determine a few basic
requirements: the system to be studied, the objective of the study, and the timeline for
the results. This is never as straightforward as it seems. In some cases the problem
identification takes place before a notice to proceed has been given.
Data Collection/Data Analysis/Assumptions Development. Large-scale simulations
applicable copyright law.

require a lot of data. Invariably, the information gathering for the model is the longest
part of the project. It is typical for the data collection and analysis to take one third to

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 81

one half of the total project, even more time than the model development. In some cases
the required information is readily available, in some form, from existing records provided
by the client. The analyst must make the decision whether the available data is sufficient
or whether field observations will be necessary. Other parameters may be taken from
standard references.
Simulation Design, Development, and Validation. This is probably the most
straightforward step in the study. It may be technically challenging, but it is the one step
that is probably the easiest to control. Design generally does not start until after the
assumptions document has been completed. In reality, there is almost always down during
the data collection phase when we start designing the model. There is a risk associated
with doing this since anything developed prior to the client acceptance of the assumptions
document may be wasted if the assumptions are changed or amended.
Initial Experimentation. Initially, there is need to run some experiment. The
initial design of the model generally reflects the baseline scenario. Baseline results should
be generated and validated. Project timeline pressures invariably influence or limit the
number of replications that can be made.

2.18.3 Validation
Validation is the process off ensuring that the model (with some degree of confidence)
represents the true system. Two types of validation are commonly used:
1. If the process being studied already exists, and historical performance data is
available, then statistical methods should be used. In most cases simple hypothesis
testing techniques can be used to perform the validation.
2. If the process is currently not already in operation then a “Face Validation”
needs to be performed. “Face Validation” is the process of reviewing results by
experts to determine the reasonableness of the results.
Analysis of Results. After all of the experiments be sure to carefully analyze all
of the results. The results from one experiment usually help you determine if other
scenarios should also be evaluated.
Develop Report and Present Results. There are many references for the various
statistical methods used in the analysis. It is important to provide the results to the client
in a format that they will understand. As a general rule architects like information
graphically while operations people are more comfortable with numbers in tables. Two
types of reports are frequently generated: An Executive Summary (which just focuses on
the major results), and a comprehensive summary of the findings from all of the experiments
performed. Simulation is not particularly good at providing this type of information, so the
analyst should learn to track the results to determine the causes. A statement that the
worst case delivery time is 45 minutes is not very informative. Stating that this was
caused by the simultaneous unloading of four aircraft on two adjacent belts is much
stronger. This second statement explains the unexpected result and suggests possible
corrections. Extreme results without explanation are more likely to generate suspicion of
applicable copyright law.

the model than of the system being studied. The simulation results represent one of
these, operational performance. Cost and projected timeline are other quantifiable factors.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

82 MODELING AND SIMULATION CONCEPTS

Less quantifiable factors, such as confidence in the supplier, are also considerations. It is
rarely necessary to determine whether one alternative is statistically better than another
is when the simulation analysis shows that two alternatives are close.

2.19 OTHER APPLICATION AREAS


Following are the other major areas where continuous and discrete simulations are
widely used:
• Design and performance evaluation of computer systems—Determining hardware
requirements or protocols for communications networks, Studying CPU Scheduling
algorithms, Evaluation of Web caching policies.
• Design and analysis of manufacturing systems—Operation of a production line.
• Evaluating designs for service organizations—Study call centers, fast food restaurants,
hospitals, and post offices.
• Evaluating military weapons systems or their logistics requirements.
• Designing and operating transportation systems such as airports, freeways,
ports, and subways.
• Analyzing financial or economic systems.
• Manufacturing applications.

SUMMARY

A large volume of literature on the theory and success stories has been built-up on this
subject during the past decade. On the other hand, it is known from work on numerical
analysis, that numerical methods can introduce instabilities that greatly magnify errors
even if the underlying models are stable. To obviate error-induced instabilities, criteria that
enable choice of time-step size and other controllable factors are well-known for non-distributed
simulations. However, the major difference between distributed simulations and their non-
distributed counterparts is that control and data are encoded in time stamped messages that
travel from one computer to another over a (bandwidth limited) network. Traditional analyses
in the design of numerical methods consider trade-offs between accuracy and speed of computation.
However, since distributed messaging requires that continuous quantities be coded into discrete
packets and sent discontinuously, it is more appropriate to consider discrete event simulation
as a natural means to consider accuracy or bandwidth trade-offs. Recent work has shown
that significant reductions of message bandwidth demands (number and size of messages)
with controllable error and local computation costs are possible. Finally, the issue of numerical
stability in complex simulation is related to the problem of sample path continuity with
respect to parameter and timing perturbation.
Modeling Simulation and Optimization (MSO) is mature enough to play an important
applicable copyright law.

role in the Product Development Process (PDP) in industry. MSO keeps its role as a tool
for analysis but can be much more important for synthesis especially in the preliminary

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SIMULATION CONCEPTS 83

design phase. Thus MSO changes the way engineering is performed and where engineers
become more involved in the synthesis phase.
In most cases of simulation optimization, we only need to know the order or be able
to locate the top one percent of the design. It is not necessary to know the performance
value accurately. Approximate simulation models are quite adequate for the former purpose.
Once the top one percent has been located with high probability, we can abundant our
attention and computing budget on this much smaller subset.

EXERCISE QUESTIONS
1. Why do we go for simulation? Why is simulation important?
2. When do we use simulations? What must we know before simulation?
3. Explain the benefits and pitfalls in simulations.
4. Explain the differences between simulation and analytical methods.
5. Explain the basic nature of simulation.
6. What are important types of system simulation? Explain continuous system simulation.
7. Write short notes on
(i) Discrete System Simulation
(ii) Hybrid Simulation
(iii) Real-time Simulation
(iv) Object-oriented Simulation
(v) Social Simulation
(vi) On-line Simulation
8. Explain web-based simulation and distributed simulation in detail.
9. What do you mean by random numbers? What is the importance of random numbers?
Write a high level language program to generate random numbers.
10. Explain the Monte-Carlo method for generating random numbers.
11. Explain the generation of uniformly distributed random numbers.
12. Explain the purpose of generation of non-uniformly distributed random numbers.
13. How random numbers can be used in deterministic problems?
14. Explain the distributed lag models in detail with the help of suitable diagram.
15. Explain cobweb models. In what types of simulation applications it can be used?
16. Explain application areas of system simulation. How simulation can be used in airport
design?
17. What do you understand by optimization of modeling simulation?
18. Explain the role of modeling and simulation in product development process?
applicable copyright law.

19. What do you mean by simulation model execution?

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

84 MODELING AND SIMULATION CONCEPTS

Chapter 3
SYSTEM SIMULATION

3.1 INTRODUCTION
Building complex software systems usually begins with addressing the system’s architecture.
Without a firm impression of how the major components of a software system interact,
there is little possibility that the system will perform effectively. One would like to know
early in the development cycle that such attributes as reliability, reusability, maintainability,
portability, performance, and modifiability are some acceptable level. There are complex
dependencies among these attributes. For example, in improving performance, reusability
might be sacrificed, or in improving portability, maintainability might require increased
effort. Making tradeoffs in this multi-dimensional space is not easy, but if they are not
made at a high level of design abstraction, there is little chance that they can be dealt
with once coding begins. Simulation is a tool that can be used to examine some of these
architectural tradeoff issues. Simulation can provide early insights, for example with
timing, resource usage and bottlenecking, and also into usability. In addition, one can
rapidly gain insights into the implications of design changes, by running simulations by
varying independent parameters.
Computer simulation was developed hand-in-hand with the rapid growth of the computer,
following its first large-scale deployment during the World War II to model the process of
nuclear detonation. It was a simulation of twelve hard spheres using Monte Carlo method.
Computer simulation is often used as an accessory to, or substitution for, modeling systems
for which simple closed form analytic solutions are not possible. There are many different
types of computer simulation; the common feature they all share is the attempt to generate
a sample of representative scenarios for a model in which a complete enumeration of all
possible states of the model would be prohibitive or impossible. Computer models were
initially used as a supplement for other arguments, but their uses later became rather
widespread.
A computer simulation or a computer model is a computer program that attempts to
applicable copyright law.

simulate an abstract model of a particular system. Computer simulations have become a


useful part of mathematical modeling of many natural systems in computational physics,

84

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEM SIMULATION 85

chemistry and biology, psychology, and social science and in the process of engineering
new technology, to gain insight into the operation of those systems. Traditionally, the
formal modeling of systems has been via a mathematical model, which attempts to find
analytical solutions to problems which enable the prediction of the behavior of the system
from a set of parameters and initial conditions. Computer simulations build on, and are
a useful adjunct to purely mathematical models in science, technology and entertainment.
Another area where simulation makes considerable sense is in the economic analysis
of product lines. In particular, because product line development involves changes in
product composition and production, software size measures such as lines of code are not
good predictors of productivity improvements. To estimate, track and compare total costs
of different assets, adaptation of other cost modeling techniques, particularly activity-
based costing to asset-based software production is needed. As mentioned above, some
simulation tools incorporate activity-based costing such that, as entities flow through the
simulated process, the cost associated with the processing of each entity at each stage can
be accumulated. In this way detailed cost predictions can be made with respect to different
product line strategies.
The reliability and the trust people put in computer simulations depends on the
validity of the simulation model, therefore verification and validation are crucial part in
the development of computer simulations. A detailed discussion on verification and validation
of simulation experiments is given in chapter 6. Another important aspect of computer
simulations is that of reproducibility of the results, meaning that a simulation model
should not provide a different answer for each execution. Although this might seem
obvious, this is a special point of attention in stochastic simulations, where random
numbers should actually be semi-random numbers. An exception to reproducibility is
human in the loop simulations such as flight simulations and computer games.
Computer graphics can be used to display the results of a computer simulation.
Animations can be used to experience a simulation in real-time e.g., in training simulations.
In some cases animations may also be useful in faster than real-time or even slower than
real-time modes. For example, faster than real-time animations could be useful in visualizing
the build-up of queues in the simulation of human’s evacuating a building. Furthermore,
simulation results are often aggregated into static images using various ways of scientific
visualization. In debugging, simulating a program execution under test can detect far
more errors than the hardware itself can detect and, at the same time, log useful debugging
information such as instruction trace, memory alterations and instruction counts. This
technique can also detect buffer overflow and similar hard to detect errors as well as
produce performance information and tuning data.
Simulation can be applied in many critical areas and enables one to address issues
before these issues become problems. Simulation is more than just a technology, as it
forces one think in global terms, about system behavior, and about the fact that systems
are more than the sum of their components. Simulation can provide insights into the
designs of, for example, processes, architectures, or product lines before significant time
and cost has been invested, and can be of great benefit in support of training. Simulation
is being increasingly emphasized in the department of defense community, where there
applicable copyright law.

is documented evidence that its impact on costs, quality and schedule is non-trivial. The
software engineering community needs to take a stronger role in exploiting the technology.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

86 MODELING AND SIMULATION CONCEPTS

At an applied level, simulation can support project costing, planning, tracking, and
prediction. In a competitive world, accurate prediction provides a significant advantage. If
cost estimates are too high, bids are lost, if too low, organizations find themselves in the
red. In this context, simulation can provide not only estimates of cost, but also estimates
of cost uncertainty. Simulation is a powerful tool to aid activity-based costing, and can
incrementally accumulate costs to a very fine degree of resolution. In addition, it can
assess the uncertainty of costs based on the interacting uncertainties of independent
variables.
A simulation can only be executed if it is supplied with numerical drivers, and this
forces the developer to identify points in the model where these drivers are needed. For
example, the model may have to know what percentage of design documents pass review
and what percentage must be returned for further work. There are many approaches in
simulation. Some simulations are based on the need to visualize the airflow across a wing
section, while others, such as in combat or flight training, have a need for a virtual reality
component. However, the types of simulations we focus in this chapter to use symbolic
networks of linked elements that model processes or products. For example, we can
model entities flowing through an organization consisting of departments, or model information
flowing between a set of integrated software tools. Techniques such as discrete event
simulation and systems dynamics are often used here.
Simulation can allow managers to make more accurate predictions about both the
schedule and the accumulated costs associated with a project. This approach is inherently
more accurate than costing models based on fits to historical data, since it accounts for
the dynamics of the specific process. With regard to schedule, simulation can account for
dependencies between tasks, finite capacity resources, and delays resulting from probable
rework loops. Some simulation tools also allow one to compute the accumulation of costs
on an activity-dependent basis. These features are useful for generating proposal that is
more accurate in cost and schedule are thus more likely to keep a company in business.

3.2 SIMULATION OF PURE-PURSUIT PROBLEM


A fighter aircraft observes an enemy bomber and flies directly toward it. The main
aim of fighter aircraft is to catch the bomber and destroy it. The bomber (or say the
target) continues flying (along a specified curve) so that the fighter aircraft (the pursuer)
has to change its direction to keep pointed towards the target. Here we determine the
course of attack of the fighter and how long it would take for the catch of the bomber.
If the target flies along a straight line, the problem can be solved directly with analytic
techniques, but the case if the path of the target fly is curved than the problem is much
more difficult and normally cannot be solved directly. Simulation is used to solve this
problem. Some assumptions for simulation are following:
1. The target and the pursuer are flying in the same horizontal plane. When the
fighter first sights the bomber, and both stay in that plane. This makes the
pursuit model two-dimensional.
applicable copyright law.

2. The fighter’s speed VF is constant (say 20 kilometers/minute).


3. The target’s path is specified.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEM SIMULATION 87

4. After a fixed time span ∆t, the fighter changes its direction in order to point
itself toward the bomber.
We are considering a rectangular coordinate system in which the two aircrafts are
flying. Distances in graph are given in kilometers and the time in minutes. We start
measuring the time when the fighter first sees the bomber.

80

60
Aircraft (pursuer)
North
40

20
Bomber at (80, 0) East
0
20 40 60 80 100

Fig. 3.1 Position of pursuer and target at time zero

We represent the path of the bomber by two arrays XB(t) and YB(t) respectively.
Likewise, we shall represent the path of the fighter by two arrays XF(t) and YF(t) respectively.
Our aim is to compute the positions of the pursuer i.e., XF(t) and YF(t) for t = 1, 2, 3,
. . ., or until the fighter catches the bomber. Assuming that once the fighter is within 10
kilometers of the bomber, the fighter shoots down its target by firing a missile and the
pursuit is over.
In case if the target is not caught up within 10 minutes, the pursuit is abandoned
and the target is considered escaped. From the time t = 0 till the target is shot down, the
attack course is determined as follows:
The distance D(t) at a given time t between the target and the pursuer is given by

D(t) = YB(t) − YF (t) 2 + ( XB(t) − XF (t) 2 ...(3.1)

The angle θ of the line from the fighter to the target at a given time t is determined
by
YB(t) − YF (t)
sinθ = ...(3.2)
D(t)
XB(t) − XF (t)
cosθ =
D(t)
...(3.3)
Using this value of the position of the fighter at time (t + 1) is determined by
XF(t + 1) = XF (t) + VF cosθ ...(3.4)
applicable copyright law.

YF (t + 1) = YF (t) + VF sinθ ...(3.5)

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

88 MODELING AND SIMULATION CONCEPTS

With these new coordinates of the pursuer, its distance from the target is again
calculated using equation (3.1). If this distance is 10 kilometers or less the pursuit is over,
otherwise θ is recomputed, and the process continues. The simple strategy of pursuer
redirecting him toward the target at fixed intervals of time, while the target goes on its
predetermined path without making any effort to evade the pursuer, is called pure pursuit.
Although in many situations, the strategy used by the pursuer is more sophisticated, this
basic approach can be used for any pursuit problems as long as we know the path the
pursuer takes and the rule by which the pursuer redirects him.

3.3 EXPONENTIAL GROWTH MODEL


Growth means a rate of change. Consequently, mathematical models describing growth
involves differential equations. For example, the growth of population model, if the growth
rate coefficient is k, then the rate at which the population grows is k times the current
size of the population, is given by
x t = kx ...(3.6)
if x = x0 at t = 0
xt is a first order differential equation whose solution is the exponential function. The
solution is
x = x 0 e kt ...(3.7)
where e is mathematical constant with approximate value 2.71.
If we plot a graph for x with various values of k and initial values of 1, the graph
looks like as shown in figure 3.2. From the graph, it can be noted that the population
grows indefinitely, for all positive values of k. It can be seen that the population grows
faster with greater values of k.

k = 0.25
k = 0.5 k = 0.20
B
4
k = 0.15

3
k = 0.10

A
2

0
applicable copyright law.

0 2 4 6 8 10

Fig. 3.2 The exponential growth curves.

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEM SIMULATION 89

Assume that k = 0.2, x = 2, and x0 = 1


We have the equation (3.7) as
2 = 1 × e0.21
2 = e0.21
log 2 = 0.2t
0.693
= 3.46.
t =
0.2
Let k = 0.2, x = 4, and x0 = 1, then we have equation (3.7) as
4 = e0.2t
log 4 = 0.2t
log 4
= 6.93.
t =
0.2
On picking the point x = 2 at the curve for k = 0.2, the corresponding slope at the
point ‘A’ has value 3.46. At point ‘B’, whose x has become two times i.e., x = 4, the slope
has become twice as great as at ‘A’ i.e., 6.93. As the slope is measured as the first order
differential coefficient, the growth rate is directly proportional to the current level.
Another way of describing the exponential function is by plotting the logarithms of
data against the time and testing whether any particular data represents exponential
growth. If the data appears to fall on a straight line, then the growth rate coefficients.
It is observed that the logarithm of the variable increases linearly with time. These data
can be plotted on semi-logarithmic graph paper where the horizontal lines are placed at
logarithmic intervals. Plotting data on such paper is equivalent to taking the logarithm
of the data and then plotting on normal linear graph paper. The growth rate coefficient
can be estimated by picking two points of the straight line that best fits the data, and then
taking the natural logarithm of the ratio of the values. Let the point are x1 and x2 at t1
and t2 times and t2 > t1, the result is calculated as:
x2
In = (t2 − t1 )k ...(3.8)
x1
For this equation it is possible to derive the value of k when base 10 logarithm are
taken for equation (3.8), the corresponding result becomes

x2
log = 0.434 (t2 − t1 ) k ...(3.9)
x1
Sometimes the coefficient k is expressed in the form of T, as

1
k = ...(3.10)
T
The inverse relationship between k, the growth rate coefficient, and T, the time
constant, means that a large coefficient is associated with a small time constant and,
applicable copyright law.

therefore, a more rapid rate of increase. The solution for the exponential growth model
equation (3.7), takes the form

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

90 MODELING AND SIMULATION CONCEPTS

x = x0 et/T ...(3.11)
The constant T is said to be a time constant as it provides a measure of how rapidly
the variable x grows. If t = T than equation (3.11) becomes
x = ex 0 ...(3.12)
i.e., the variable is exactly e times its initial value x0

3.3.1 Exponential Decay Model


Exponential decay mode is interpreted as a negative growth model. This is a model
in which a variable decays from some initial value x0, at a rate proportional to the current
value. The equation for this model is
x = – kx ...(3.13)
If t = 0 than x = x0 ...(3.14)
This is a first-order differential equation whose solution is the exponential function.
The solution is
x = x0 e–kt ...(3.15)
where e is the mathematical constant with approximate value 2.72.
If we plot a graph for x with various values of k and an initial value of 1, the graph
is shown in figure 3.3.

1.0

0.8
k = 0.05

0.6

k = 0.1
0.4
x

0.2 k = 0.20

k = 0.5
k = 1.0
0 2 4 6 8 10

Time

Fig. 3.3 Exponential decay cures

Equation (3.10) in the exponential growth model shows the relation between k and
applicable copyright law.

T. The characteristic of the model is that the level x is divided by a constant factor for

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929
Copyright © 2017. Laxmi Publications Pvt Ltd. All rights reserved. May not be reproduced in any form without permission from the publisher, except fair uses permitted under U.S. or

SYSTEM SIMULATION 91

a given interval of time. In the interval of T time units, the level is divided by e. As
e = 2.72, the level is reduced by a factor of 0.37. Each successive interval of T reduces
the level by the same factor. For example, radioactive material decays. There is nothing
significant about the value of e, but comparing values of T for different models measures
the relative times they will take to decay by a given fraction.

3.3.2 Modified Exponential Growth Models


The exponential growth model assumes that the rate of growth is proportional to the
existing level. This model states an unlimited growth. The exponential growth model
cannot be applied to the market model. The market model describes how man items of
a product can be sold but there is a limit to the market, if replacement sales are ignored.
A more realistic assumption for a general market model is that the growth rate is
proportional to the number of people who have not yet bought the product. Let, the
market is limited to some maximum value X, the number of people who might buy the
product. Let x be the number of people who buy the product then the number of people
who have not purchased the product is (X – x).
The equation of this model can be written as
x = k (X – x) ...(3.16)
where k is the coefficient of proportionality.
If t = 0 than x = 0 ...(3.17)
This is first-order differential equation whose solution is the exponential function.
The solution is
x = X (1 – e–kt) ...(3.18)
-kt
x = X (1 – e )
1.0
k = 0.5 k = 0.25

0.8 k = 0.1

k = 0.05
0.6

0.4
x/X

0.2

0.0 5 10 15 20 25
applicable copyright law.

Time t

Fig. 3.4 Modified exponential curves

EBSCO Publishing : eBook Collection (EBSCOhost) - printed on 8/12/2023 9:54 PM via UNIVERSIDAD NACIONAL DE COLOMBIA
AN: 2248541 ; Rajendra Kumar, Anil Kumar Kapil, Vikesh Kumar, Chandra Shekhar Yadav.; MODELING AND SIMULATION CONCEPTS
Account: s1229929

You might also like