Location via proxy:   [ UP ]  
[Report a bug]   [Manage cookies]                

CMP 472 Merged

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

CMP 472 Modelling and

Simulation
Dr. S. A. Arekete
CMP 472 – MODELLING & SIMULATION
• Study of complex dynamic systems in relation to performance,
reliability, etc. Examples of simulation models used in the phase
of complex projects. Simulation models as approximations to
complex systems. Techniques for capturing essential properties
of the complex in the model. Behavior studies and test-runs of
simulation models. Analyzing the statistical properties of metrics
such as system response time and throughout. Course will
involve a major project to create a simulation model of a real-
world system. Simulation and Monte Carlo Methods: Uniform
random number generators, bootstrap methods. Use of MAPLE,
MATLAB, or MATHEMATICA.
Work Plan for the Course
Week 1: Course overview and outline; Complex Systems and its features
Week 2: Modelling; Why computer modelling? Type of Models
Week 3: Functions, Sequences and Dynamic systems;
Week 4: Dynamic Systems Model 1; Modelling change with difference equations
Week 5: Dynamic Systems Model 2; Approximating change with difference equations
Week 6: Dynamic Systems Model 3; Solutions to dynamic systems
Test 1
Week 7: Simulation Models; Models in Excel; Choosing samples for uncertain variables
Week 8: Probability distributions for Simulation
Week 9: Behaviour studies and test runs of simulation models
Week 10: Analysis of Simulation Reports
Mid-term Test
Week 11: Monte Carlo Simulation
Week 12: Bootstrapping
Revision
Recommended Textbooks
1. Modelling and Simulation - Exploring Dynamic System
Behaviour (Third Edition) by Louis G. Birta & Gilbert Arbez
(Springer)
2. Introduction to the Modeling and Analysis of Complex Systems
by Hiroki Sayama Published by Open SUNY Textbooks, Milne
Library State University of New York at Geneseo Geneseo, NY
14454
The Heart of Modelling and Simulation

Modelling and simulation should be viewed as a problem-solving tool.


We undertake this course within the framework of a modelling and simulation
project. This project framework embraces two key notions:
First, there is the notion of a ‘system context’, i.e. there is a system that has been
identified for investigation, and
Second, there is a problem relating to the identified system that needs to be solved.
Evaluating a set of solution options to a stated problem within the context of a
dynamic system that is being studied is the goal of the modelling and simulation
project.
We use the term ‘system’ in its broadest possible sense; it could, for example,
include the notions of a process or a phenomenon.
Furthermore, the physical existence of the system is not a prerequisite; the system in
question may simply be a concept, idea or proposal. What is a prerequisite, however,
is the requirement that the system in question exhibit ‘behaviour over time’––in
other words, that it be a dynamic system.
The Heart of Modelling and Simulation..

Systems, or more specifically dynamic systems, are one of the


most pervasive notions of our contemporary world.
Broadly speaking, a dynamic system is a collection of interacting
entities that produce some form of behaviour that can be
observed over an interval of time. There are, for example, physical
systems such as transportation systems, power-generating
systems, manufacturing systems and data communications
systems. On the other hand, in a less tangible form, we have
healthcare systems, social systems and economic systems.
The Heart of Modelling and Simulation..

Systems are inherently complex, and tools such as modelling and


simulation are needed to provide the means for gaining insight
into aspects of their behaviour. Such insight may simply serve to
provide the intellectual satisfaction of deeper understanding or,
on the other hand, may be motivated by a variety of more
practical and specific reasons such as providing a basis for
decisions relating to the control, management, acquisition or
transformation of the system under investigation (the SUI).
The Heart of Modelling and Simulation..

The defining feature of the modelling and simulation approach is that it


is founded on a computer-based experimental investigation that utilizes
an appropriate model for the SUI. The model is a representation or
abstraction of the system.
The use of models (in particular, mathematical models) as a basis for
analysis and reasoning is well established in disciplines such as
engineering and science. It is the emergence and widespread
availability of computing power that has made possible the new
dimension of experimentation with complex models and, hence, the
emergence of the modelling and simulation discipline. Furthermore,
the models in question need not be constrained by the requirement of
yielding to classical mathematical formalism in the sense generally
associated with the models in science and engineering.
The Heart of Modelling and Simulation..

It must be emphasized, furthermore, that there is an intimate


connection between the model that is ‘appropriate’ for the study and
the nature of the problem that is to be solved.
The important corollary here is that there rarely exists a ‘universal’
model that will support all modelling and simulation projects that have
a common system context. This is especially true when the system has
some reasonable level of complexity. Consider, for example, the
difference in the nature of a model for an airliner first in the case where
the model is intended for use in evaluating aerodynamic properties
versus the case where it is simply a revenue-generating object within a
business plan.
Identification of the most appropriate model for the project is possibly
the most challenging aspect of the modelling and simulation approach
to problem-solving.
The Heart of Modelling and Simulation..

The phrase ‘modelling and simulation’ does have a generally


accepted meaning and implies two distinct activities. The
modelling activity creates an object (i.e. a model) that is
subsequently used as a vehicle for experimentation. This
experimentation with the model is the simulation activity, and the
experimentation is carried out by a computer program.
Defining Simulation
• Simulation is the imitation of the operation of a real-world process or
system over time.
• Simulation involves the generation of artificial history of a system and
drawing inferences from it.
• The behaviour of a system as it evolves over time is studied by
developing a simulation model.
• This model takes the form of a set of assumptions concerning the
operation of the system.
• The model takes a set of expressed assumptions:
• Mathematical, logical
• Symbolic relationships between entities.
When Simulation is the Appropriate Tool
• Simulation enables the study of and experimentation with the
internal interactions of a complex system, or of a subsystem
within a complex system.
• Informational, organisational and environmental changes can be
simulated and the effect of those alternations on the model’s
behaviour can be observed.
• The knowledge gained in designing a simulation model can be of
great value toward suggesting improvement in the system under
investigation.
When Simulation is the Appropriate Tool..
• By changing simulation inputs and observing the resulting
outputs, valuable insights may be obtained into which variables
are most important and how variables interact.
• Simulation can be used as a device to reinforce analytic solution
methodologies.
• Simulation can be used to experiment with new designs or
policies prior to implementation, so as to prepare for what may
happen.
When Simulation is the Appropriate Tool..
• Simulation can be used to verify analytic solutions.
• Simulation models designed for training, allow learning without
the cost and disruption of on-the-job learning.
• Animation shows a system in simulation operation so that the
plan can be visualised.
• The modern system (factory, water fabrication plant, service
organisation, etc.) is so complex that the interactions can be
treated only through simulation.
When Simulation is not Appropriate
• When the problem can be solved by common sense.
• When the problem can be solved analytically.
• If it is easier to perform direct experiments.
• If costs exceed savings.
• If resource or time are not available.
• If system behaviour is too complex.
• If no data is available about the system, not even estimates.
Role of Modelling and Simulation
There is a wide range of possible reasons for undertaking a
modelling and simulation study. Some of the most common are
listed below (the order is alphabetical and hence should not be
interpreted as a reflection of importance):
1. Comparison of control policy options; 7. Performance evaluation;
2. Education and training; 8. Prototyping and concept evaluation;
3. Engineering design; 9. Risk/safety assessment;
4. Evaluation of decision or action 10. Sensitivity analysis;
alternatives; 11. Support for acquisition/procurement
5. Evaluation of strategies for decisions;
transformation or change; 12. Uncertainty reduction in decision-
6. Forecasting; making.
Systems and System Environment
• A System is defined as a group of objects that are joined
together in some regular interaction towards the
accomplishment of some purpose.
• In other words, a system is a group of components or objects
that are combined together or join together and that are all
working towards the same purpose or goal.
Systems and System Environment
• Example: A automobile factory: Machines, component parts and
workers operate jointly along the assembly line.
• A system is often affected by changes occurring outside the
system: called system environment.
• Factory: Arrival orders
• Effect of supply on demand: relationship between factory output
and arrival (activity of system)
• Banks: Arrival of customers.
Components of System
• Entity: An entity is an object of interest in a system.
• Examples: In a factory system, departments, orders, parts, products are
the entities.
• Attributes: An attribute denotes the property of an entity.
• Example: Quantities for each order, type of part, number of machines in
a department are attributes of factory system.
• Activity: Any process causing changes in a system is called an
activity.
Components of System..
• State of the System: The state of the system is defined as the
collection of variables necessary to describe a system at any
time, relative to the objective of study. In order words, state of
the system means a description of all the entities, attributes and
activities as they exist at one point in time
• Event: An event is defined as an instantaneous occurrence that
may change the state of the system.
• Endogenous System: The term endogenous is used to describe
the activities and events occurring within the system.
• Example: Drawing cash in a bank.
Components of System..
• Exogenous System: The term exogenous is used to describe
activities and events in the environment that affect the system.
• Example: Arrival of customers.
• Closed System: A system for which there is no exogenous activity
and event is said to be a closed system.
• Example: Water in an insulated flask.
• Open System: A system for which there is exogeneous activity
and event is said to be an open system.
• Example: Bank System.
Example of a System and its Components
Discrete System
• A discrete system is one in
which the state variables
change only a discrete set
of points in time.
• Example: Bank – the
number of customer’s
changes only when a
customer arrives or when
the service provided a
customer is completed.
Control System
• A continuous system is one
in which the state variables
change continuously over
time.
• Example: Head of water
behind the dam.
Models of a System
• A model is defined as a representation of the system for the
purposes of studying the system.
• The various types of models are:
• Mathematical or Physical Model
• Static Model
• Dynamic Model
• Deterministic Model
• Stochastic Model
• Discrete Model
Models of a System..
• Mathematical Model: Uses symbolic notation and the mathematical
equations to represent a system
• Static Model: Represents a system at a particular point in time and also
known as Monte-Carlo Simulation
• Dynamic Model: Represent systems as they change over time. Example:
Simulation of a bank.
• Deterministic Model: Contains no random variables. They have a
known set of inputs which will result in a unique set of outputs.
Example: Arrival of patients to the Dentist at the scheduled
appointment time.
Models of a System..
• Mathematical Model: Uses symbolic notation and the mathematical
Stochastic Model: Has one or more random variables as inputs.
Random inputs leads to random outputs. Example: Simulation of a bank
involves random inter-arrival and service times.
• Discrete Model: Modelling of systems in which the state variable
changes only at a discrete set of points in time.
• The simulation models are analysed by numerical rather than by
analytical methods.
What is a Model?
• A model is a representation of an object, a
system, or an idea in some form other than
that of the entity itself.
(Shannon)

Introduction 28
Types of Models
Physical
(Scale models, prototype plants,…)
Mathematical
(Analytical queueing models, linear programs,
simulation)

Introduction 29
What is Simulation?
A Simulation of a system is the operation of a model, which is a
representation of that system.
The model is amenable to manipulation which would be
impossible, too expensive, or too impractical to perform on the
system which it portrays.
The operation of the model can be studied, and, from this,
properties concerning the behavior of the actual system can be
inferred.

Introduction 30
CMP 472 Modelling and
Simulation
Dr. S. A. Arekete
CMP 472 – MODELLING & SIMULATION
• Study of complex dynamic systems in relation to performance,
reliability, etc. Examples of simulation models used in the phase
of complex projects. Simulation models as approximations to
complex systems. Techniques for capturing essential properties
of the complex in the model. Behavior studies and test-runs of
simulation models. Analyzing the statistical properties of metrics
such as system response time and throughout. Course will
involve a major project to create a simulation model of a real-
world system. Simulation and Monte Carlo Methods: Uniform
random number generators, bootstrap methods. Use of MAPLE,
MATLAB, or MATHEMATICA.
Work Plan for the Course
Week 1: Course overview and outline; Complex Systems and its features
Week 2: Modelling; Why computer modelling? Type of Models
Week 3: Functions, Sequences and Dynamic systems;
Week 4: Dynamic Systems Model 1; Modelling change with difference equations
Week 5: Dynamic Systems Model 2; Approximating change with difference equations
Week 6: Dynamic Systems Model 3; Solutions to dynamic systems
Test 1
Week 7: Simulation Models; Models in Excel; Choosing samples for uncertain variables
Week 8: Probability distributions for Simulation
Week 9: Behaviour studies and test runs of simulation models
Week 10: Analysis of Simulation Reports
Mid-term Test
Week 11: Monte Carlo Simulation
Week 12: Bootstrapping
Revision
Recommended Textbooks
1. Modelling and Simulation - Exploring Dynamic System
Behaviour (Third Edition) by Louis G. Birta & Gilbert Arbez
(Springer)
2. Introduction to the Modeling and Analysis of Complex Systems
by Hiroki Sayama Published by Open SUNY Textbooks, Milne
Library State University of New York at Geneseo Geneseo, NY
14454
Complex System

Complex systems are networks made of a number of components


that interact with each other, typically in a nonlinear fashion.
Complex systems may arise and evolve through self-organization,
such that they are neither completely regular nor completely
random, permitting the development of emergent behaviour at
macroscopic scales.
Complex System..
• These properties can be found in diverse real-world systems.
• Examples:
• Gene regulatory networks within a cell,
• Physiological systems of an organism,
• Brains and other neural systems,
• Food webs,
• The global climate,
• Stock markets,
• The Internet,
• Social media,
• National and international economies,
• And even human cultures and civilizations.
Complex System..

• Herbert Simon’s famous definition of complex system in his 1962


paper [1] is given thus:
• “A complex system is a system made up of a large number of
parts that interact in a nonsimple way.”
Complex System..

• Complex systems is a new approach to science that studies how


relationships between parts give rise to the collective behaviours
of a system and how the system interacts and forms
relationships with its environment.
• Complex systems usually require complex models, which is
difficult to code from scratch in general-purpose language.
Complex System..

Complex systems is chiefly concerned with the behaviours and


properties of systems. A system, broadly defined, is a set of entities
that, through their interactions, relationships, or dependencies,
form a unified whole. It is always defined in terms of its boundary,
which determines the entities that are or are not part of the
system. Entities lying outside the system then become part of the
system's environment.
Complex System..

A system can exhibit properties that produce behaviours which are


distinct from the properties and behaviours of its parts; these
system-wide or global properties and behaviours are
characteristics of how the system interacts with or appears to its
environment, or of how its parts behave (say, in response to
external stimuli) by virtue of being within the system. The notion of
behaviour implies that the study of systems is also concerned with
processes that take place over time (or, in mathematics, some
other phase space parameterization). Because of their broad,
interdisciplinary applicability, systems concepts play a central role
in complex systems.
Complex System..

As a field of study, complex systems is a subset of systems theory.


General systems theory focuses similarly on the collective
behaviours of interacting entities, but it studies a much broader
class of systems, including non-complex systems where traditional
reductionist approaches may remain viable. Indeed, systems
theory seeks to explore and describe all classes of systems, and the
invention of categories that are useful to researchers across widely
varying fields is one of systems theory's main objectives.
Complex System..

• As it relates to complex systems, systems theory contributes an


emphasis on the way relationships and dependencies between a
system's parts can determine system-wide properties.
• It also contributes the interdisciplinary perspective of the study
of complex systems: the notion that shared properties link
systems across disciplines, justifying the pursuit of modelling
approaches applicable to complex systems wherever they
appear.
• Specific concepts important to complex systems, such as
emergence, feedback loops, and adaptation, also originate in
systems theory.
Complex System..

• To better understand what complex systems are, it might help to


know what they are not.
• One example of systems that are not complex is a collection of
independent components, such as an ideal gas (as discussed in
thermodynamics) and random coin tosses (as discussed in
probability theory).
• This class of systems was called “problems of disorganized
complexity” by American mathematician and systems scientist
Warren Weaver [2].
Complex System..
• Conventional statistics works perfectly when handling such independent
entities.
• Another example, which is at the other extreme, is a collection of strongly
coupled components, such as rigid bodies (as discussed in classical
mechanics) and fixed coin tosses (I’m not sure which discipline studies this).
• Weaver called this class of systems “problems of simplicity” [2].
• In this class, the components of a system are tightly coupled to each other
with only a few or no degrees of freedom left within the system, so one can
describe the collection as a single entity with a small number of variables.
• There are very well-developed theories and tools available to handle either
case. Unfortunately, however, most real-world systems are somewhere in
between.
Complex System Science
• Complex systems science is a rapidly growing scientific research
area that fills the huge gap between the two traditional views
that consider systems made of either completely independent or
completely coupled components.
• This is the gap where what Weaver called “problems of
organized complexity” exist [2].
• Complex systems science develops conceptual, mathematical,
and computational tools to describe systems made of
interdependent components.
• It studies the structural and dynamical properties of various systems to
obtain general, cross-disciplinary implications and applications.
Complex System Science
• Complex systems science has
multiple historical roots and
topical clusters of concepts,
as illustrated in Fig. 1.1.
• There are two core concepts
that go across almost all
subareas of complex systems:
emergence and self-
organization.
Complex System Science..

Emergence
• The idea of emergence was originally discussed in philosophy more than a
century ago.
• There are many natural phenomena where some property of a system
observed at macroscopic scales simply can’t be reduced to microscopic
physical rules that drive the system’s behavior.
• For example, you can easily tell that a dog wagging its tail is alive, but it is
extremely difficult to explain what kind of microscopic physical/chemical
processes going on in its body are making this organism “alive.”
• Another typical example is your consciousness. You know you are
conscious, but it is hard to describe what kind of neurophysiological
processes make you a “conscious” entity.
• Those macroscopic properties (livingness, consciousness) are called
emergent properties of the systems.
Complex System Science..

Emergence..
• There are a number of different definitions for the concept of
emergence in complex systems science. However, the one thing
that is common in most of the proposed definitions is that the
emergence is about the system’s properties at different scales.
• If you observe a property at a macroscopic scale that is
fundamentally different from what you would naturally expect
from microscopic rules, then you are witnessing emergence.
• More concisely, emergence is a nontrivial relationship between
the system’s properties at different scales.
Complex System Science..

Emergence..
• This definition was proposed by complex systems scientist
Yaneer Bar-Yam [4]:
• Emergence is a nontrivial relationship between the properties
of a system at microscopic and macroscopic scales.
Macroscopic properties are called emergent when it is hard to
explain them simply from microscopic properties.
Complex System Science..

Self-Organization
• Another key idea of complex systems science is self-organization,
which is sometimes confused with emergence.
• Some researchers even use these terms almost interchangeably.
• One clear distinction, though, is that, while emergence is about
scale, self-organization is about time (in addition to scale).
• That is, you call something self-organizing when you observe
that the system spontaneously organizes itself to produce a
nontrivial macroscopic structure and/or behaviour (or “order,” if
you will) as time progresses.
Complex System Science..

Self-Organization..
• In other words, self-organization is a dynamical process that looks as
if it were going against the second law of thermodynamics (which
states that entropy of a closed system increases monotonically over
time).
• Many physical, biological, and social systems show self-organizing
behaviour, which could appear mysterious when people were not
aware of the possibility of self-organization.
• Of course, these systems are not truly going against the law of
thermodynamics, because they are open systems that are driven by
energy flow coming from and going to the outside of the system.
• In a sense, the idea of self-organization gives a dynamical explanation
for emergent properties of complex systems.
Complexity
• Systems exhibit complexity when difficulties with modeling them
are prevalent.
• This means their behaviours cannot be understood apart from
the very properties that make them difficult to model, and they
are governed entirely, or almost entirely, by the behaviors those
properties produce.
• Any modeling approach that ignores such difficulties or
characterizes them as noise, then, will necessarily produce
models that are neither accurate nor useful.
Complexity..
• As yet no fully general theory of complex systems has emerged
for addressing these problems, so researchers must solve them
in domain-specific contexts.
• Researchers in complex systems address these problems by
viewing the chief task of modeling to be capturing, rather than
reducing, the complexity of their respective systems of interest.
Complexity..

Networks
• The interacting components of a complex system form a
network, which is a collection of discrete objects and
relationships between them, usually depicted as a graph of
vertices connected by edges.
• Networks can describe the relationships between individuals
within an organization, between logic gates in a circuit, between
genes in gene regulatory networks, or between any other set of
related entities.
Complexity..

Networks
• Networks often describe the sources of complexity in complex
systems. Studying complex systems as networks therefore enables
many useful applications of graph theory and network science.
• Some complex systems, for example, are also complex networks,
which have properties such as power-law degree distributions that
readily lend themselves to emergent or chaotic behaviour.
• The fact that the number of edges in a complete graph grows
quadratically in the number of vertices sheds additional light on the
source of complexity in large networks: as a network grows, the
number of relationships between entities quickly dwarfs the number
of entities in the network.
Complexity..

Features
• Complex systems may have the following features:
1. Cascading failures: Due to the strong coupling between
components in complex systems, a failure in one or more
components can lead to cascading failures which may have
catastrophic consequences on the functioning of the system.
Localized attack may lead to cascading failures in spatial networks.
2. Complex systems may be open: Complex systems are usually
open systems — that is, they exist in a thermodynamic
gradient and dissipate energy. In other words, complex systems
are frequently far from energetic equilibrium: but despite this
flux, there may be pattern stability.
Complexity..

Features
3. Complex systems may have a memory: The history of a complex
system may be important. Because complex systems are dynamical
systems they change over time, and prior states may have an
influence on present states. More formally, complex systems often
exhibit spontaneous failures and recovery as well as hysteresis.
Interacting systems may have complex hysteresis of many
transitions.
4. Complex systems may be nested: The components of a complex
system may themselves be complex systems. For example, an
economy is made up of organisations, which are made up of
people, which are made up of cells - all of which are complex
systems.

.
Complexity..

Features..
5. Dynamic network of multiplicity: As well as coupling rules, the dynamic
network of a complex system is important. Small-world or scale-free networks
which have many local interactions and a smaller number of inter-area
connections are often employed. Natural complex systems often exhibit such
topologies. In the human cortex for example, we see dense local connectivity
and a few very long axon projections between regions inside the cortex and to
other brain regions.
6. May produce emergent phenomena: Complex systems may exhibit behaviours
that are emergent, which is to say that while the results may be sufficiently
determined by the activity of the systems' basic constituents, they may have
properties that can only be studied at a higher level. For example, the termites
in a mound have physiology, biochemistry and biological development that are
at one level of analysis, but their social behaviour and mound building is a
property that emerges from the collection of termites and needs to be analysed
at a different level.
Complexity..

Features..
7. Relationships are non-linear: In practical terms, this means a
small perturbation may cause a large effect (see butterfly
effect), a proportional effect, or even no effect at all. In linear
systems, effect is always directly proportional to cause.
8. Relationships contain feedback loops: Both negative
(damping) and positive (amplifying) feedback are always found
in complex systems. The effects of an element's behaviour are
fed back in such a way that the element itself is altered.
CMP 472 Modelling and
Simulation
Dr. S. A. Arekete
Modelling; Type of Models;
Why computer modelling?
Modelling

• Modeling is the act of representing a real-world phenomenon by


a model whereby we define a model as any representation –
physical or abstract – of a real thing (object), event or
circumstance.
• Many definitions of a model can be found in the literature. One
that we feel is especially noteworthy was suggested by Shannon
[23]: ‘A model is a representation of an object, system or idea in
some form other than itself’.
Modelling..
Physical Models
• Although outside the scope of our considerations, it is important
to recognize a particular and distinctive class of models called
physical models.
• Physical models provide the basis for experimentation activity
within an environment that mimics the physical environment in
which the problem originates.
• An example here is the use of scale models of aircraft or ships within a
wind tunnel to evaluate aerodynamic properties.
• Another is the use of ‘crash-test dummies’ in the evaluation of
automobile safety characteristics.
Modelling..
Physical Models..
• A noteworthy feature of physical models is that they can, at least
in principle, provide the means for the direct acquisition of
relevant experimental data.
• However, the necessary instrumentation may be exceedingly
difficult to implement.
Modelling..
Static and Dynamic Models
• A fundamental dichotomy among models can be formulated on
the basis of the role of time; more specifically, we note that
some models are dynamic while others are static.
• A linear programming model for establishing the best operating
point for some enterprise under a prescribed set of conditions is
a static model because there is no notion of time dependence
embedded in such a model formulation.
Modelling..

• Likewise, the use of tax software to establish the amount of


income tax payable by an individual to the government can be
regarded as the process of developing a (static) model of one
aspect of that individual’s financial affairs for the particular
taxation year in question.

Grosspay * 0.05 : if GrossPay  $2,000


Grosspay * 0.075 : if GrossPay  $3,000
Tax _ payable 
Grosspay * 0.085 : if GrossPay  $4,500
Grosspay * 0.05 : if GrossPay  $4,500
Modelling..

• A dynamic model usually incorporates the notion of ‘evolution


over time’.
• The difference between static and dynamic models can be
likened to the difference between viewing a photograph and
viewing a video clip.
Simplification and Assumptions in
Models
• An important attribute of any model is the collection of
simplifications and assumptions that are incorporated into its
formulation.
• These two notions are used with a variety of meanings in the
modelling and simulation literature (in fact, they are sometimes used
together as in ‘simplifying assumptions’).
• A simplification can be regarded as a choice among alternative ways
of dealing with an aspect of the SUI and is focused on reducing
complexity.
• An assumption is an unsubstantiated choice to fill a ‘knowledge gap’
that is preventing progress at either the modelling or the simulation
phases of the project.
Simplification in Models
• Making the most appropriate simplification choices can be one of the
most difficult aspects of model development.
• It is a non-trivial but essential task and has been the topic of
considerable research.
• Simplification is sometimes associated with abstraction or granularity
assessment.
• The underlying issue is identifying the correct balance between
complexity and credibility, where credibility must always be
interpreted in the context of the goal of the project.
• An example would be the deliberate decision not to include the various rest
breaks taken by the members of the maintenance team in a manufacturing
system model.
Simplification in Models..
• The development of any model is simply a matter of making the
correct selection of simplifications from among the available
options (which are often substantial size).
• Also, one might reasonably ask the question: when has a model
become ‘over-simplified’?
• The most straightforward answer is simply: when it fails the
validation criteria that have been formulated.
Assumptions in Models
• A degree of information/knowledge deficiency is generally present in any
model development activity.
• This gives rise to two distinct outcomes based on the modeller’s awareness.
• When the modeller is aware of the deficiency but nevertheless needs to
move forward with the model development, then an assumption is made
about the missing (or imperfect) information.
• Typical examples here can be found in the often assumed stochastic data
models that are common requirements in Discrete Event Dynamic System
(DEDS) models (in particular, in those circumstances where the SUI does not
yet exist) or in the values of physical parameters such as the friction
coefficient that impacts the flow of water in a river bed.
• A discrete event dynamic system is a system that evolves over time in accordance with
the abrupt occurrence, at possibly unknown irregular intervals, of events that may or
may not have a physical nature.
Assumptions in Models..
• In the absence of awareness about knowledge deficiency, there
is potential for serious shortcomings in the modelling process.
• One can only hope that such omission(s) from the model’s
formulation will become apparent during validation efforts or
that the omitted detail will have no consequence upon the
conclusions drawn from the study.
Simplification and Assumptions Limit
Models
• The simplifications and assumptions embedded in a model place
boundaries around its domain of applicability and hence upon its
relevance not only to the project for which it is being developed
but also to any other project for which its reuse is being
considered.
• They are rarely transparent.
• It is, therefore, of paramount importance to ensure, via the
documentation for the project, that all users of the model are
aware of its limitations as reflected in the simplifications and
assumptions that underlie its development.
The Observation Interval
• A modelling and simulation project has two main constituents.
• The most fundamental is the underlying ‘system context’,
namely, the dynamic system whose behaviour is to be
investigated (i.e. the SUI).
• The second essential constituent is the goal for the project; this
has a significant impact on the manner in which the model is
formulated and the experiments carried out with it.
The Observation Interval..
• A subordinate, but important, third constituent is the
observation interval which is the interval of (simulated) time
over which the behaviour of the SUI is of interest.
• Often, the specification of this interval, which we denote by Io, is
clearly apparent in the statement of the project goal.
• There are, however, many important circumstances where this
does not occur simply because of the nature of the output data
requirements.
• It is, however, essential that information about the observation
interval be properly documented.
The Observation Interval..
• The starting point of this interval (its left boundary) almost
always has an explicitly specified value.
• The endpoint (the right boundary) may likewise be explicitly
specified, but it is not uncommon for the right boundary to only
be implicitly specified.
• Examples of explicit specification of the right boundary may
include:
• The case where a service facility (e.g. a grocery store) closes at a
prescribed time (say 9:00 p.m.)
• Similarly, a study of the morning peak-period traffic in an urban area
may be required, by definition, to terminate at 10:00 a.m.
The Observation Interval..
• The starting point of this interval (its left boundary) almost
always has an explicitly specified value.
• The endpoint (the right boundary) may likewise be explicitly
specified, but it is not uncommon for the right boundary to only
be implicitly specified.
• Examples of explicit specification of the right boundary may
include:
• The case where a service facility (e.g. a grocery store) closes at a
prescribed time (say 9:00 p.m.)
• Similarly, a study of the morning peak-period traffic in an urban area
may be required, by definition, to terminate at 10:00 a.m.
The Observation Interval..
• Consider, on the other hand, a study of a manufacturing facility that is
intended to end when 5,000 items have been produced.
• Here the right-hand boundary of the observation interval is known
only implicitly.
• Likewise, consider a study of the performance of a dragster. Here a
simulation experiment ends when the dragster crosses the finish line
of the racing track, but the value of time when this occurs is clearly
not known when the experiment begins.
• In both these examples, the right boundary of the observation
interval is implicitly determined by conditions defined on the
variables of the model.
The Observation Interval..
• Another case of implicit determination occurs when the right-hand
boundary is dependent on some integrity condition on the data that
is being generated by the model’s execution.
• The most typical such situation occurs when there is a need to wait
for the dissipation of undesired transient effects.
• Data collection cannot begin until this occurs.
• As a result, what might be called the ‘data collection interval’ has an
uncertain beginning.
• The situation is further complicated by the fact that the duration of
the data collection interval (once it begins) is likewise uncertain
because of the difficulty in predicting when sufficient data of suitable
‘statistical quality’ has been accumulated.
The Observation Interval..
CMP 472 Modelling and
Simulation
Dr. S. A. Arekete
Monte Carlo Simulation
• Monte Carlo is a classical simulation technique.
• It is a particular application of a general method, which is
applicable in both deterministic and probabilistic settings.
Monte Carlo Simulation
• Central to Monte Carlo is a computational procedure in which a
performance measure is estimated using samples drawn
randomly from a population with appropriate statistical
properties.
• The selection of samples, in turn, requires an appropriate random
number generator (RNG).
• Ideally, the generated “random” sequences are a completely faithful
software counterpart of the non-determinism underlying the actual
process.
Monte Carlo Simulation..
• The term Monte Carlo method is generally used to refer to any
simulation techniques related to the use of random numbers.
• Examples are:
• Monte Carlo simulation, Monte Carlo integration, importance sampling,
genetic algorithms, simulated annealing, the Hasting–Metropolis
algorithm, percolation, random walk, and ballistic deposition, just to
name a few.
Monte Carlo Simulation..
• Of these methods, Monte Carlo simulation is perhaps the most
common and well-understood class of numerical methods for
computer simulations and experiments.
• Monte Carlo simulation generates random inputs (in reference
to a known distribution) and uses the inputs to determine a
numerical value of performance measure.
Monte Carlo Simulation..
• The essential part of the Monte Carlo simulation is a procedure
for generating a pseudo random number R that is distributed
uniformly over the interval 0<R<1.
• Such a procedure is applied repeatedly within the Monte Carlo
simulation to produce a sequence of independently generated
random numbers.
Characteristics of Monte Carlo Simulations

• The input of the simulation is a distribution (based on some


theoretical model of reality, or one built empirically from
observations) over the set of inputs.
• Based on this distribution, the Monte Carlo simulation samples
an instance of the inputs and runs the simulation for this specific
instance.
• The previous step of selecting inputs and running the simulation
is performed many times, and the results of these multiple
simulations are then aggregated in a numerically meaningful
manner.
Characteristics of Monte Carlo Simulations..

• The three features common to all Monte Carlo simulations are:


1. A known distribution over the set of system inputs.
2. Random sampling of inputs based on the distribution specified in
feature 1, and simulation of the system under the selected inputs.
3. Numerical aggregation of experimental data collected from multiple
simulations conducted according to feature 2.
• Numerical experiments of Monte Carlo simulation lead us to run
the simulation on many sampled inputs before we can infer the
values of the system performance measures of interest.
The Monte Carlo Algorithm
• The Monte Carlo algorithm is based on the so-called law of large
numbers.
• This mathematical result of probability theory asserts that if one
generates a large number N of samples x1, x2, . . . , xN from a
space X, and compute a function f of each of the samples, f(x1),
f(x2), . . . , f(xN), then the mean of these values will approximate
the mean value of f on the set X.
• That is, as N tends to |X|, we see that the following holds:
Car Charging Example
Car Charging Example

• As we move to a more complicated example, that of a charging


car station, the concepts we have seen will carry over:
• The notion of choosing a two-dimensional (2-D) point at random
will generalize to a higher-dimensional analog, e.g., choosing a
sequence of electric car arrivals.
• The question of whether the randomly chosen point is black or
white will generalize from a binary measurement to a continuous
measurement, e.g., for each “point” the percentage of time that
the attendant of the charging station for electric cars was busy.
Car Charging Example

The question of wanting to estimate the area of the black region


generalizes to the question of wanting to estimate the average
value of the continuous measurement (the average percentage of
time that the attendant was busy) across all possible sequences of
electric car arrivals.
Just as in the toy example above, this cannot be easily determined
precisely since we cannot possibly try all possible sequences of
electric car arrivals.
Fortunately, however, as in the toy example, Monte Carlo
simulation lets us estimate this value.
Performance Measures

• f: the maximum size of Q over the simulation’s duration; and


• g: the average percentage of time the server is busy.
Parameters
• By design, the simulation had several system parameters,
including:
• D (governs electric car inter-creation intervals);
• F (governs the battery capacity); and
• M (the maximum battery charging rate).
Parameters..
• We noted that even for fixed values of the system parameters D,
F, and M, the performance measures depend heavily on random
choices made in the course of the simulation.
• Thus, the system is non-deterministic and the performance
measures are themselves random variables.
• This is precisely a setting in which Monte Carlo simulation could
be applied
Parameters..
• We assume that D, F, and M are fixed (by consulting domain
experts or by mining real-world trace data from operating
charging stations), then we consider X to be the space of all
possible electric car arrival histories, for which temporal
sequencing is governed by the distribution implicit in D (and
battery capacity is governed by the distribution implicit in F).
• The act of sampling x1 from X amounts to specifying a single
electric car arrival history.
Parameters..
• For example, the arrival history x1 might be:
• Electric car 1 arrived at time 1.0 having a battery capacity 10kW that was 10% full.
• Electric car 2 arrived at time 2.5 having a battery capacity 14kW that was 80% full.
• Electric car 3 arrived at time 5.5 having a battery capacity 3kW that was 25% full.
• Electric car 4 arrived at time 12.1 having a battery capacity 22kW that was 5% full.
• Now, given this sample, the system’s inputs are fully specified.
• We can run the simulation and determine f(x1) and g(x1).
Parameters..
• The precise values of these performance measures are highly
dependent on the system parameters—in this case, the most
influential parameter is M (the other parameters D and F
influence the electric car arrival history).
• For some values of M, we might for example find that the
maximum queue size f(x1)=2 and that the server was busy
g(x1)=75% of the time.
Parameters..
• Now, we can select another electric car arrival history x2 from
the space X. For example, the electric car arrival history x2 might
be:
• Electric car 1 arrived at time 1.0 having a battery capacity 8kW that was 20% full.
• Electric car 2 arrived at time 2.0 having a battery capacity 18kW that was 60% full.
• Electric car 3 arrived at time 4.5 having a battery capacity 30kW that was 45% full.
• Electric car 4 arrived at time 8.7 having a battery capacity 2kW that was 95% full.
• As before, we can run the simulation and determine f(x2) and
g(x2).
• The procedure is repeated in this manner for a large number of
sampled inputs N.
Parameters..
• Each of the inputs x1, x2, . . . , xN is being sampled (i.e., chosen)
according to known and agreed-upon “distributions” that govern how
likely each of the inputs (i.e., electric car arrival histories) is in
practice.
• In all but the simplest cases, not all the xi are deemed to be equally
likely—indeed if they are, the system may be amenable to analytical
modelling.
• Most computer programming languages or spreadsheets have built-in
functions to generate uniform distribution random numbers that can
be easily used.
• For example, one can use the RAND() function in Microsoft Excel or
RND in Visual Basic to generate random numbers between 0 and 1.
CMP 472 Modelling and
Simulation
S.A. Arekete
Discrete-Event Dynamic
Systems (DEDS)
DEDS Modelling and Simulation
• An important behavioural feature of DEDS models is the central
role played by random phenomena.
• The inter-arrival times between messages entering a
communication network and the time to service customers at
the checkout counter of a grocery store are examples of such
phenomena.
DEDS Modelling and Simulation..
• Data modelling is an important subtask of the conceptual
modelling phase in the DEDS domain.
• It is concerned with correctly representing stochastic features of
the SUI (System Under Investigation).
• Generally, it involves determining appropriate probability
distributions from collected data.
• This can be a demanding and time-consuming task.
• The project goal guides the identification of the data models that
are required.
DEDS Modelling and Simulation..
• We differentiate between an existing system and a proposed
system.
• The data modelling task is considerably facilitated when the SUI
currently exists and is accessible because then data collection is
possible.
• When the SUI does not yet exist (or indeed, may never actually
‘exist’), data modelling becomes a very uncertain undertaking
and essentially depends on insight and intuition.
The Stochastic Nature of DEDS Models
• We study some important aspects of the random (stochastic)
nature of DEDS and introduce several assumptions that are
typically made about it within the model development process.
• We begin by noting that sequences of random variables, ordered
in time, are a fundamental and recurring feature within the
DEDS domain.
• Our particular interest, here, includes both the creation of such
sequences and capturing values of such sequences generated
within the model.
• Often, these sequences fall within the realm of stochastic
processes.
The Stochastic Nature of DEDS Models
• Consider a simple view of the operation of a delicatessen
counter, which has one server.
• Customers arrive at the counter, wait in a queue until the server
is available and then select and purchase items at the counter.
• Two important random phenomena drive this SUI.
• The first is the arrival of customers and the second is the time it takes
to select and purchase items at the counter, which is referred to as the
service time.
• Each of these phenomena (arrivals and servicing) is, in fact, a
sequence of continuous random variables that are linked to the
stream of customers.
The Stochastic Nature of DEDS Models..
The Stochastic Nature of DEDS Models..
The Stochastic Nature of DEDS Models..
• In the simple eatery model above, both of these random
phenomena (i.e. arrivals and servicing) would typically be
independent of any other phenomena or interactions in the
system.
• We refer to stochastic processes with this independence attribute as
autonomous stochastic processes.
• A stochastic process that is not autonomous is said to be dependent.
The Stochastic Nature of DEDS Models..
A continuous-time stochastic process is a collection of time functions (time
trajectories) that are defined over the entire observation interval. In a DEDS model,
this collection is a collection of piecewise constant time functions because changes
in value occur only at discrete points in time. An observation of a continuous-time
stochastic process is one particular member of this collection. To illustrate, consider
the status of a machine in a manufacturing system which is subject to random
failure due to parts deterioration. The time trajectory (Status(t)) shown in Fig. 3.2
can be regarded as an observation of the underlying continuous-time stochastic
process. Here, we have chosen to use the value 1 to indicate that the machine is
fully operational and the value 0 to indicate a failure status (the machine is either
waiting for service or repair is underway).
The Stochastic Nature of DEDS Models..
The Stochastic Nature of DEDS Models..
The Stochastic Nature of DEDS Models..
The Stochastic Nature of DEDS Models..
• The representation of autonomous random phenomena within a
model often incorporates simplifying assumptions.
• For example, a common assumption is that customer inter-
arrival times can be represented with a homogeneous stochastic
process, that is, the sequence of random variables that
constitute the stochastic process are independent and identically
distributed (IID).
• Unfortunately, in many cases, such assumptions are simply not
realistic.
The Stochastic Nature of DEDS Models..
• Consider our delicatessen counter example.
• There are ‘busy periods’ over the course of a business day,
during which customer arrivals occur more frequently.
• This implies that the mean of the customer inter-arrival time
distributions will be shorter during these busy periods.
• It is reasonable to assume that dependent stochastic processes
such as waiting times will be affected and will also be non-
stationary.
The Stochastic Nature of DEDS Models..
• When appropriate, this issue can be circumvented by redefining the
observation interval so that the study is restricted, for example, to the
busy period.
• Then, the validity of a homogeneous stochastic process assumption
for the customer inter-arrivals time can be reasonably assured.
• Even in cases where the autonomous stochastic processes within a
DEDS model are stationary over the observation interval, dependent
stochastic processes can still exhibit transient behaviour.
• These transient effects are a consequence of initial conditions, whose
impact needs to dissipate before stationary behaviour evolves.
The Stochastic Nature of DEDS Models..
• Consider, for example, waiting times when the delicatessen of
our example first opens in the morning.
• The first customer will experience no waiting time and receive
service immediately.
• Subsequent customers will likewise experience short waiting
times.
• As time progresses, more customers will enter the queue and
waiting times could start to lengthen, but in any event, the
exceptional circumstances immediately following the opening
will disappear.
Random Variates and RVVs
• DEDS simulation modelling can be viewed in idealized terms, as a
mapping of prescribed random input behaviour into random
output behaviour.
• Here ‘idealization’ arises from the observation that ‘randomness’
within the computing setting is not, in fact, genuinely random.
• The ‘random’ values that are required in the characterization of
random input behaviour, are of necessity, samples taken from
prescribed probability distributions using algorithmic methods.
• However, by their fundamental nature, these methods do not
guarantee genuine randomness.
Random Variates and RVVs..
• The values thus generated are called random variates, and they are
generally regarded as ‘pseudorandom’.
• We however, appreciate that the algorithmic basis for random
variates does have an advantage.
• In many circumstances, there is a need to explore model behaviour
under a variety of controlled conditions (e.g. comparing design
alternatives).
• In these circumstances, it is critical to be able to ‘duplicate’ random
input behaviour.
• This requirement is easily accommodated in the algorithmic milieu of
pseudorandomness.
Random Variates and RVVs..
• Random variates play a key role in simulation studies in the DEDS
domain.
Definitions
• A random variate is a sample from a prescribed probability
distribution which has been generated using an algorithm-based
procedure.
• We also introduce the notion of a random variate variable (RVV).
• We define an RVV to be a variable, whose values are random variates.
• It is important to note that any particular sequence of values acquired
by an RVV can be interpreted as an observation of an autonomous
stochastic process.
Random Variates and RVVs..
• Suppose delta is an RVV. This implies that the values for delta are
delivered via a named algorithmic procedure.
• To emphasize the special role of such a procedure, we attach a
prefix ‘RVP’ to the assigned name.
• For example, the procedure associated with delta might be
RVP.GetDelta().
• We shall refer to such a procedure as an ‘RVP’.
Discrete-Time Variables
• A discrete-time variable is a time-dependent variable, whose
value changes only at discrete points in time.
• Such variables play a fundamental role in the development of
models for discrete-event dynamic systems.
• Such variables are also relevant to the description of both the
input and the output of such models.
• We recognize two types of discrete-time variable which are
called sample discrete-time variables (as in Fig. 3.4) and
piecewise constant discrete-time variables (as in Fig. 3.5).
Discrete-Time Variables..
Discrete-Time Variables..
Discrete-Time Variables..
Representation of Sample DTV
• We consider first the sample
discrete-time variable, x(t), shown
in Fig. 3.4.
• We note that values for x(t) exist
only at a finite set of points in
time.
• This variable could, for example,
represent the flow of orders for a
particular product that is being
marketed by an Internet-based
distributing company.
• Orders arrive at the time points
indicated and the number of units
in the order is given by the value
of x at those points in time.
Discrete-Time Variables..
Representation of Sample DTV
• The evolution of a sample
discrete-time variable over time
is associated with a finite
sequence of discrete values of
its argument, t, namely, ⟨tr, tr+1,
tr+2, …⟩ where
𝑡𝑘+1 = 𝑡𝑘 + ∆𝑘
• with ∆𝑘 > 0, k = r, r + 1, r + 2, …
and r = 0 or 1 (the first value in
the sequence may or may not
coincide with the left-hand
boundary of the observation
interval, namely, t0).
Discrete-Time Variables..
Representation of Sample DTV
• The key feature here is that
the value of x(t) is meaningful
only for those values of t that
belong to the time sequence.
Discrete-Time Variables..
Representation of Sample DTV
• As a direct consequence, it
follows that a convenient
representation for x(t) is the
sequence of ordered pairs
(when r = 0):

• where xk = x(tk).
• We call CS[x] the
characterizing sequence for x.
Discrete-Time Variables..
Representation of Sample DTV
• We note that there are two
separate aspects of this
representation; namely, the
time sequence and the value
sequence.
• In fact, it is convenient to
separate the two underlying
sequences in the following
way:
Discrete-Time Variables..
Representation of Sample DTV

• which are called, respectively,


the domain sequence for x
and the range sequence for x.
Discrete-Time Variables..
Representation of Piecewise DTV
• A typical piecewise constant discrete-
time variable is shown in Fig. 3.5.
• Here, x(t) could represent the number
of electricians, at time t, within the
maintenance team of a large
manufacturing plant that operates on
a 24-hour basis but with varying levels
of production (and hence varying
requirements for electricians).
• The behaviour of the SUI likely
depends directly on the value of x(t)
for all t; consequently, the
representation of x as a piecewise
constant time variable is an essential
choice.
Discrete-Time Variables..
Representation of Piecewise DTV
• The key difference between the sample variable of Fig. 3.4 and the
piecewise constant variable shown in Fig. 3.5 is simply that in the
latter case, x has a defined value for all values of t within the
observation interval, while in the former case, x has a value only at
the discrete points in time that are identified.
• This difference between a sample discrete-time variable and a
piecewise constant discrete-time variable as shown in Fig. 3.4 and Fig.
3.5, respectively, is certainly significant.
• However, from the perspective of a characterizing sequence
representation, this difference is transparent.
• This allows for a uniform representation of discrete-time variables,
and this simplifies many aspects of the conceptual model
development.
Discrete-Time Variables..
Representation of Piecewise DTV
• Nevertheless, there are differences in the manner in which
sample discrete-time variables and piecewise constant discrete-
time variables are handled in our conceptual modelling
framework.
• Consequently, we shall often refer to the characterizing
sequence for a sample discrete-time variable, x, as a sample
sequence (denoted by PHI[x]), and we shall refer to the
characterizing sequence for a piecewise constant discrete-time
variable, x, as a trajectory sequence (denoted by TRJ[x]).
Specification
• There are important circumstances where a discrete-time
variable from either of the two subclasses of interest needs to be
specified.
• In view of the representation scheme we have chosen, this
specification task corresponds to establishing the values within
both the domain sequence and the range sequence for the
variable, x, under consideration.
• This can be regarded as a data modelling task.
Specification..
• We can use a variety of data model formats.
• The wide range of alternatives falls into two broad categories:
deterministic and stochastic.
• We note that the conceptual model development process is
inherently iterative and evolves in a manner that reflects
progressively deeper insights into model requirements.
• Consequently at any particular point during this process, it may be
that the required information to characterize either the domain
sequence or the range sequence for some particular variable is not
yet known.
• This should not be regarded as an inherent flaw but simply as an
incomplete facet of model development.
Specification..
• We consider first some options for the data model associated with
the domain sequence.
• We note that this effectively relates to the specification of the time
increment,
• ∆𝑘 , between successive time values in the sequence; i.e. 𝑡𝑘+1 =
𝑡𝑘 + ∆𝑘 .
• The simplest case is when these values are explicitly provided in the
form of a data list.
• In most other deterministic specifications, ∆𝑘 can be expressed in
terms of a known function, 𝐹, of the index 𝑘; i.e.∆𝑘 = 𝐹(𝑘).
• The simplest case, however, is when 𝐹(𝑘) = 𝑐𝑜𝑛𝑠𝑡𝑎𝑛𝑡; in other
words, the values in the domain sequence are equally spaced.
Specification..
• The alternate possible specification format is stochastic.
• Here, the values of ∆𝑘 are established by selections from a
specified probably distribution function, P.
• In the simplest case, P is independent of k; in other words, the
same probability distribution function applies for all k.
• A simple generalization occurs when the specification for ∆𝑘 is
based on a family of probability distribution functions.
• For example, if 𝑘 is even, then the selection is from distribution
PE, while if k is odd, the selection is from PO.
Specification..
• The data modelling options and formats for the range sequence
are similar.
• The important difference is that the data models, in this case,
deal with the range values directly; in other words, there
typically is no counterpart to the generation of increments
between successive values.
• It is important to observe that the values within the domain
sequence and the range sequence for a discrete-time variable
will, in many cases, be treated as random variate variables.
Inputs
--Exogenous input
• Generally, there a boundary a boundary that surrounds the SUI
and separates it from its environment.
• Nevertheless, there are almost always aspects of the
environment that extend across this boundary and influence the
SUI’s behaviour.
• This influence represents the exogenous input to the SUI.
• Examples of exogenous input are the occurrence of storms that
disrupt the operation of a port or the arrival of customers at the
counter of a fast-food outlet.
Inputs
--Exogenous input
• For instance, power supply from the National grid is an
exogenous input to Redeemer’s University.
Inputs
--Endogenous input
• Often, there are facets of the SUI itself that have an impact upon
its behaviour but are not themselves influenced by it.
• This ‘embedded influence’ represents the endogenous input to
the SUI.
• Two examples of endogenous input are the varying number of
part-time servers working at the counter of a fast-food outlet
over the course of a day and the service times for the stream of
customers that arrive at the counter of the outlet.
Inputs
• A fundamental initial step in the modelling process is the
identification and characterization of the SUI’s inputs.
• This necessarily takes the form of appropriately formulated input
variables that capture the essential features of each identified
input behaviour.
• Generally, such input variables are time dependent and their
time dependency must be explicitly specified.
• Such variables are generally discrete-time variables.
Inputs
…Modelling Exogenous Input
• Environmental input variables:
• These variables are used in the model to characterize the
environmental effects that have an impact on the SUI’s
behaviour.
• In the case of a storm, for example, we might introduce an
environmental input variable named Storm, whose values
alternate between TRUE and FALSE to reflect the existence or
not of storm conditions.
• This variable would fall in the category of a piecewise constant
discrete-time variable.
Inputs
1. A constant is never an input variable (a constant is an identifier with
which we associate a fixed value).
2. A parameter is never an input variable (a parameter is an identifier
whose assigned value is invariant over the course of the
observation interval for any particular experiment with the
simulation model but will change in other experiments in a manner
consistent with the project goal).
3. A sample discrete-time variable is an input variable if its range
sequence values impact upon the behaviour of the model but are
not themselves dependent on that behaviour.
4. A piecewise constant discrete-time variable is an input variable if its
range sequence values are not (by definition) identical and they
impact upon the model but are not themselves dependent on that
behaviour.
Inputs
1. A constant is never an input variable (a constant is an identifier with
which we associate a fixed value).
2. A parameter is never an input variable (a parameter is an identifier
whose assigned value is invariant over the course of the
observation interval for any particular experiment with the
simulation model but will change in other experiments in a manner
consistent with the project goal).
3. A sample discrete-time variable is an input variable if its range
sequence values impact upon the behaviour of the model but are
not themselves dependent on that behaviour.
4. A piecewise constant discrete-time variable is an input variable if its
range sequence values are not (by definition) identical and they
impact upon the model but are not themselves dependent on that
behaviour.
Inputs
…Modelling Exogenous Input
• Environmental input variables:
• These variables are used in the model to characterize the
environmental effects that have an impact on the SUI’s
behaviour.
• In the case of a storm, for example, we might introduce an
environmental input variable named Storm, whose values
alternate between TRUE and FALSE to reflect the existence or
not of storm conditions.
• This variable would fall in the category of a piecewise constant
discrete-time variable.
Inputs
…Modelling Exogenous Input
• Entity stream input variables:
• We noted that transient entities that flow through the domain of
the SUI are common elements in most modelling and simulation
projects in the DEDS domain (e.g. customers at our fast-food
outlet).
• We regard these as originating in the SUI’s environment and
generally returning to it; in other words, they flow across the
boundary that separates the SUI from its environment and hence
are regarded as exogenous input
Inputs
…Modelling Exogenous Input
• Entity stream input variables:
• We use an entity stream input variable to represent the arrival aspect
of this flow.
• This variable is a sample discrete-time variable.
• Its domain sequence corresponds to the points in time when entity
arrivals (from a particular category) occur, and its range sequence
provides the number of such arrivals at each arrival time point
(typically 1).
• Note that the creation of the entity itself is necessarily a separate
operation; the entity stream input variable simply serves to invoke
this operation.
• Note also that the creation of each entity in such a stream requires, in
particular, the initialization of its attributes.
Output
• The fundamental outcome of a simulation run is provided by the
output that is produced.
• Output is that set of generated data that has relevance to the
achievement of the project goal.
• Output can take several forms, but its origins are almost
exclusively linked to the changing values of entity attributes
within the model.
• More specifically we regard any output variable to be a function
of one or more attributes.
Output..
• From a modelling perspective, output, like input, is identified
using suitably defined variables.
• Because of the stochastic behaviour inherent in the study of
DEDS, these output variables are random variables and this has
significant implications on how meaningful data is acquired and
interpreted.
CMP 472 Modelling and
Simulation
S.A. Arekete

1
Module 6:
Mathematical Modelling

2
What is Mathematical Modeling?
• The application of mathematics to describe realworld problems
and investigating important questions that arise from it.
• Using mathematical tools, the real-world problem is translated
to a mathematical problem, which mimics the real-world
problem.
• A solution to the mathematical problem is obtained, which is
interpreted in the language of real-world problem to make
predictions about the real world.

3
What is Mathematical Modeling?
• Real-world problems are problems from biology, chemistry,
engineering, ecology, environment, physics, social sciences,
statistics, wildlife management and so on.
• Mathematical modeling (MM) can be described as an activity
which allows a mathematician to be biologist, chemist, ecologist,
economist depending on the problem that he/she is tackling.
• The primary aim of a modeler is to undertake experiments on
the mathematical representation of a real-world problem,
instead of undertaking experiments in the real world.

4
Challenges in mathematical modeling
• “........not to produce the most comprehensive descriptive model
but to produce the simplest possible model that incorporates
the major features of the phenomenon of interest.” - Howard
Emmons

5
Importance of Mathematical Modeling
• A mathematical model is a mathematical description of a real life
situation.
• Therefore, we can get a better understanding of the system
through proper analysis of the model using appropriate
mathematical tools.
• Moreover, in the process of building the model, we discover
various factors which govern the system, factors which are most
important to the system and that reveal how different aspects of
the system are related.

6
Importance of Mathematical Modeling..
• The importance of mathematical modeling in physics, chemistry,
biology, economics and even industry cannot be ignored.
• Mathematical modeling in basic sciences is gaining popularity,
mainly in biological sciences, economics and industrial problems.
• For example, if we consider mathematical modelling in the steel
industry, many aspects of steel manufacture, from mining to
distribution, are susceptible to mathematical modeling.

7
Importance of Mathematical Modeling..
• Steel companies have participated in several mathematics-
industry workshops, where they discussed various problems and
obtained solution through mathematical modeling - problems
involving control of ingot cooling, heat and mass transfer in blast
furnaces, hot rolling mechanics, friction welding, spray cooling
and shrinkage in ingot solidification, to mention a few [91].

8
Importance of Mathematical Modeling..
• Similarly, mathematical modeling can be used
i. to study the growth of plant crops in a stressed environment,
ii.to study mRNA transport and its role in learning and memory,
iii.
to model and predict climate change,
iv.to study the interface dynamics for two liquid films in the context of
organic solar cells,
v. to develop multi-scale modeling in liquid crystal science and many
more.

9
Importance of Mathematical Modeling..
• For gaining physical insight, analytical techniques are used.
• However, to deal with more complex problems, numerical
approaches are quite handy.
• It is always advisable and useful to formulate a complex system
with a simple model whose equation yields an analytical
solution.
• Then the model can be modified to a more realistic one that can
be solved numerically.
• Together with the analytical results for simpler models and the
numerical solution from more realistic models, one can gain maximum
insight into the problem.

10
Latest Developments in Mathematical
Modeling
• Mathematical modeling is an area of great development and
research.
• Recently, mathematical models have been used to validate
hypotheses made from experimental data, and at the same time the
designing and testing of these models has led to testable
experimental predictions.
• There are impressive cases in which mathematical models have
provided fresh insight into biological systems, physical systems,
decision making problems, space models, industrial problems,
economical problems and so forth.
• The development of mathematical modeling is closely related to
significant achievements in the field of computational mathematics.
11
Latest Developments in Mathematical
Modeling..
• Consider a new product being launched by a company. In the
development process, there are critical decisions involved in its
launch such as timing, determining price, launch sequence, etc.
• Experts use and develop mathematical models to facilitate such
decision making.
• Similarly, in order to survive market competition, cost reduction is
one of the main strategies for a manufacturing plant, where a large
amount of production operation costs are involved.
• Proper layout of equipment can result in a huge reduction in such
costs.
• This leads to dynamic facility layout problem for finding equipment
sites in manufacturing environments, which is one of the developing
areas in the field of mathematical modeling [122].

12
Latest Developments in Mathematical
Modeling..
• Mathematical modeling also intensifies the study of potentially
deadly flu viruses from mother nature and bio-terrorists.
• Mathematical models are also being developed in optical
sciences [6], namely, diffractive optics, photonic band gap
structures and wave guides, nutrient modeling, studying the
dynamics of blast furnaces, studying erosion, and prediction of
surface subsidence.

13
Latest Developments in Mathematical
Modeling..
• In geosciences, mathematical models have been developed for
talus.
• Talus is an accumulation of rock debris formed close to mountain
walls, mainly through many small rockfalls.
• Hiroyuki and Yukinori [90] have constructed a new mathematical
model for talus development and retreat of cliffs behind the
talus, which was later applied to the result of a field experiment
for talus development at a cliff composed of chalk.
• Their model was found to be in agreement with the field observations.

14
Latest Developments in Mathematical
Modeling..
• In geosciences, mathematical models have been developed for
talus.
• Talus is an accumulation of rock debris formed close to mountain
walls, mainly through many small rockfalls.
• Hiroyuki and Yukinori [90] have constructed a new mathematical
model for talus development and retreat of cliffs behind the
talus, which was later applied to the result of a field experiment
for talus development at a cliff composed of chalk.
• Their model was found to be in agreement with the field observations.

15
Latest Developments in Mathematical
Modeling..
• There has been tremendous development in the interdisciplinary field
of applied mathematics in human physiology in the last decade, and
development continues.
• One of the main reasons for this development is the researcher’s
improved ability to gather data, whose visualization have much better
resolution in time and space than just a few years ago.
• At the same time, this development also constitutes a giant collection
of data as obtained from advanced measurement techniques.
• Through statistical analysis, it is possible to find correlations, but such analysis
fails to provide insight into the mechanisms responsible for these correlations.
• However, when it is combined with mathematical modeling, new insights into
the physiological mechanisms are revealed.

16
Latest Developments in Mathematical
Modeling..
• There has been tremendous development in the interdisciplinary field
of applied mathematics in human physiology in the last decade, and
development continues.
• One of the main reasons for this development is the researcher’s
improved ability to gather data, whose visualization have much better
resolution in time and space than just a few years ago.
• At the same time, this development also constitutes a giant collection
of data as obtained from advanced measurement techniques.
• Through statistical analysis, it is possible to find correlations, but such analysis
fails to provide insight into the mechanisms responsible for these correlations.
• However, when it is combined with mathematical modeling, new insights into
the physiological mechanisms are revealed.

17
Latest Developments in Mathematical
Modeling..
• Mathematical models are being developed in the field of cloud
computing to facilitate the infrastructure of computing resources
in which large pools of systems (or clouds) are linked together
via the Internet to provide IT services (for example, providing
secure management of billions of online transactions) [25].
• Development of mathematical models are also noticed
(i) in the study of variation of shielding gas in GTA welding,
(ii) for prediction of aging behavior for Al-Cu-Mg/Bagasse Ash particular
composites,

18
Latest Developments in Mathematical
Modeling..
(iii) for public health decision making and estimations,
(iv) for developing of cerebral cortical folding patterns which have
fascinated scientists with their beauty and complexity for centuries,
(v) to predict sunflower oil expression,
(vi) in the development of a new three dimensional mathematical
ionosphere model at the European Space Agency/European Space
Operators Centre,
(vii) in battery modeling or mathematical description of batteries, which
plays an important role in the design and use of batteries, estimation of
battery processes and battery design.

19
Limitations of Mathematical Modeling
• Sometimes mathematical model may give unexpected results or
simply fail.
• This may indicate that we have reached the limit of the present
mathematical model and must look for a new refinement of the
real-world or a new theoretical breakthrough [10].
• A similar type of problem was addressed in [6], which deals with
Moire theory, involving the mathematical modeling of the
phenomena that occur in the superposition of two or more
structures (line gratings, dot screens, etc.), either periodic or
not.

20
Limitations of Mathematical Modeling..
• In MM, more assumptions must be made, as information about
real-world systems become less precise or harder to measure.
• Modeling becomes a less precise endeavor as it moves away
from physical systems towards social systems.
• For example, modeling an electrical circuit is much more
straightforward than modeling human decision making or the
environment.
• Since physical systems usually do not change, reasonable past
information about a physical system is quite valuable in
modeling future performance.
21
Limitations of Mathematical Modeling..
• However, both social systems and environments often change in
ways that are not of the past, and even correct information may
be of less value in forming assumptions.
• Thus, to understand a model’s limitations, it is important to
understand the basic assumptions that were used to create it.

22
Limitations of Mathematical Modeling..
• Real-world systems are complex and a number of interrelated
components are involved.
• Since models are abstractions of reality, a good model must try to
incorporate all critical elements and interrelated components of the
real-world system. This is not always possible.
• Thus, an important inherent limitation of a model is created by what
is left out.
• Problems arise when key aspects of the real-world system are
inadequately treated in a model or are ignored to avoid
complications, which may lead to incomplete models.
• Other limitations of a mathematical model are that they may assume
the future will be like the past, input data may be uncertain or the
usefulness of a model may be limited by its original purpose.

23
Limitations of Mathematical Modeling..
• However, despite all these limitations and pitfalls, a good model can
be formulated, if a modeler asks himself/herself the following
questions about the model:
(i) Does the structure of the model resemble the system being modeled?
(ii) Why is the selected model appropriate to use in a given application?
(iii) How well does the model perform?
(iv) Has the model been analyzed by someone other than the model authors?
(v) Is adequate documentation of the model available for all who wish to study
it?
(vi) What assumptions and data were used in producing model output for the
specific application?
(vii) What is the accuracy of the model output?

24
Limitations of Mathematical Modeling..
• One should not extrapolate the model beyond the region of fit.
• A model should not be applied unless one understands the
simplifying assumptions on which it is based and can test their
applicability.
• It is also important to understand that the model is not the reality
and one should not distort reality to fit the model.
• A discredited model should not be retained and one should not limit
himself to a single model, as more than one model may be useful for
understanding different aspects of the same phenomenon.
• It is imperative to be aware of the limitations inherent in models. There is no
best model, only better models.

25
Introduction to Discrete Models
• In discrete models, the state variables change only at a countable number of
points in time.
• These points in time are the ones at which the event occurs/change in state.
• Thus, in discrete time modeling, there is a state transition function which
computes the state at the next time instant given the current state and input.
• The changes are really discrete in many situations which occur at well defined
time intervals.
• Moreover, in many cases, the data are usually discrete rather than continuous.
• Hence, due to the limitations of the available data, we may be compelled to
work with the discrete model, even though the underlying model is
continuous.

26
Introduction to Discrete Models
• In discrete models, the state variables change only at a countable number of
points in time.
• These points in time are the ones at which the event occurs/change in state.
• Thus, in discrete time modeling, there is a state transition function which
computes the state at the next time instant given the current state and input.
• The changes are really discrete in many situations which occur at well defined
time intervals.
• Moreover, in many cases, the data are usually discrete rather than continuous.
• Hence, due to the limitations of the available data, we may be compelled to
work with the discrete model, even though the underlying model is
continuous.

27
Introduction to Discrete Models..

28
Introduction to Discrete Models..

29
Linear Models
We take a look at some linear models in this session

30
Population Model Involving Growth

31
Population Model Involving Growth

32
Population Model Involving Growth

33
Population Model Involving Growth

34
Population Model Involving Growth
Year0 0 150 Year0 0 150
Year1 1 146 .. .. ..
Year2 2 142 .. .. ..
Year3 3 137 Year153 153 2
Year4 4 133 Year154 154 2
Year5 5 129 Year155 155 2
Year6 6 125 Year156 156 2
Year7 7 122 Year157 157 2
Year8 8 118 Year158 158 2
Year9 9 115 Year159 159 2
Year10 10 111 Year160 160 2
Year11 11 108 Year161 161 2
Year12 12 105 Year162 162 2
Year13 13 101 Year163 163 2
Year14 14 98 Year164 164 2
Year15 15 95 Year165 165 1
35
Population Model Involving Growth
Population Growth, Initial Population = 150, growth Rate= -3%
160

140

120

100

80

60

40

20

0
0 20 40 60 80 100 120 140 160 180 200

36
Population Model Involving Growth
Year0 0 150 Year0 0 150
Year1 1 146 .. .. ..
Year2 2 142 .. .. ..
Year3 3 137 Year153 153 2
Year4 4 133 Year154 154 2
Year5 5 129 Year155 155 2
Year6 6 125 Year156 156 2
Year7 7 122 Year157 157 2
Year8 8 118 Year158 158 2
Year9 9 115 Year159 159 2
Year10 10 111 Year160 160 2
Year11 11 108 Year161 161 2
Year12 12 105 Year162 162 2
Year13 13 101 Year163 163 2
Year14 14 98 Year164 164 2
Year15 15 95 Year165 165 1
37
Population Model Involving Growth
Population Growth Po = 150 and Growth Rate = +3%
200

180

160

140

120

100

80

60

40

20

0
0 5000 10000 15000 20000 25000 30000

38
Newton’s Law of Cooling

39
Newton’s Law of Cooling..

40
Newton’s Law of Cooling..

41
Newton’s Law of Cooling..

42
Newton’s Law of Cooling..

43

You might also like