Introduction
Simulation & Modelling
AHMED SALEEM
Lecturer
Department of Computer Science
Faculty of Computing & IT
University of Gujrat
Prepared by Ahmed Saleem
Course Assessment Criteria
➢ Assignment 5%
➢ Quiz 5%
➢ Project/Presentation 15%
➢ Class Participation 5%
➢ Mid 25%
➢ Final Exam 50%
Prepared by Ahmed Saleem
Simulation & Modelling
Course Synopsis
This course covers the advance topics of modeling and simulation such as
Developing Models, Executing Simulations, Analyzing Results, Calibrating
Models, Verification & Validation of Models.
Course Learning Outcomes
At the end of this course students will have better understandings of
followings:
➢ Basics of Simulation
➢ Simulation Tools
➢ Agent-Based Model
➢ Other Models
Prepared by Ahmed Saleem
Simulation & Modelling
Overview
➢ Simulation & Modelling is an extremely important part of
our daily lives.
➢ Our entire living experience is based on the concept of
‘’Consciousness’’
➢ The state of being aware of and responsive to one’s
surroundings
Prepared by Ahmed Saleem
Consciousness: Robert Fudd (17th Century)
Prepared by Ahmed Saleem
Systems
➢ System a collection of entities, e.g. people or machine, that
act and interact together to accomplish some end
➢ System state the collection of variables necessary to
describe the system at a particular time
➢ Types of systems
• Discrete
• Continuous
Prepared by Ahmed Saleem
Entity and more!
➢ Any object of interest in the system is called an Entity.
➢ An attribute is the property of an entity.
➢ An activity represents a time period of a specific length
➢ State: Collection of variables necessary to describe the
system at any time, relative to the objectives of the study.
➢ Event: Instantaneous occurrence that might change the state
of the system
Prepared by Ahmed Saleem
Endogenous vs Exogenous!
➢ Endogenous is used for activities and events occurring within
the system
➢ Exogenous is used for activities and events occurring in the
environment that affect the system
Prepared by Ahmed Saleem
Examples…
Prepared by Ahmed Saleem
Discrete System
➢ A discrete system is one in which the state variables change
Only at discrete set of points in time.
➢ Customer arrival in a bank.
➢ The state variable ‘Number of customers’ changes only when
a customer arrives or when the service is completed.
Prepared by Ahmed Saleem
Continuous System
➢ A continuous system is one in which the state variables
change CONTINUOUSLY over time.
➢ Head of water behind a dam.
➢ The state variable ‘’Head of water’’ changes as rain comes in
or dam is emptied etc.
Prepared by Ahmed Saleem
What is Simulation?
➢ Simulation is the use of a computer to evaluate a system
model numerical, in order to estimate the desired true
characteristics of the system.
➢ Simulation is useful when a real-world system is too complex
to allow realistic model to be evaluated analytically.
Prepared by Ahmed Saleem
Advantages of Simulation
➢ Simulation has many advantages, but some disadvantages.
(Pegden, Shannon, and Sadowski 1995)
➢ Provides a way to study complex, real-world systems that
cannot be accurately described by a mathematical model
that can be evaluated analytically.
➢ Allows estimation of the performance of an existing system
under some projected set of operating conditions.
➢ Allows Comparison of alternative proposed system design to
see which one best meets a specified requirement.
Prepared by Ahmed Saleem
Disadvantages of Simulation
➢ Model building requires special training.
➢ It is an art that is learned over time and through experience.
➢ Furthermore, if two models are constructed by different
competent individuals, they might have similarities, but it is
highly unlikely that they will be the same.
➢ Simulation modeling and analysis can be time consuming
and expensive.
Prepared by Ahmed Saleem
In Defense of Simulation
➢ Vendors of simulation software have been actively
developing packages that contain models that need only
input data for their operation.
➢ Such model have the generic tag Simulator and Template.
➢ Simulation can be performed faster today than yesterday
and will be even faster than tomorrow, because of advances
in hardware that permit rapid running of scenarios and
because advances in many simulation packages.
Prepared by Ahmed Saleem
What is a Model?
➢ ‘’A representation of an object, a system, or an idea in some
form other than that of the entity itself. (Shannon)
➢ A model is defined as a representation of a system for the
purpose of studying the system.
➢ For most studies, it is only necessary to consider those
aspects of the problem under investigation.
Prepared by Ahmed Saleem
Why Model?
➢ Sometimes it is of interest to study a system to understand
the relationships between its components or predict how
the system will operate under new policy.
➢ To study the system, it is sometimes possible to experiments
with the system itself.
➢ However, this is not always possible.
Prepared by Ahmed Saleem
Modeling Example
➢ What if we show child a video on a mobile smart phone?
Prepared by Ahmed Saleem
Types of Models
➢ Mathematical
• A mathematical model uses symbolic notation and
mathematical equations to represent a system.
➢ Physical
• Physical modeling is a way of modeling and simulating
systems that consist of real physical components.
Prepared by Ahmed Saleem
What is a Simulation Model?
➢ A special type of mathematical model
➢ Simulation model may be further classified as:
• Static
• Dynamic
• Deterministic
• Stochastic
• Discrete
• Continuous
Prepared by Ahmed Saleem
Static vs Dynamic
➢ Static
• A static simulation model, sometime called a Monte Carlo
Simulation, represents system at a particular point in time.
➢ Dynamic
• Dynamic simulation models represent systems as they
change over time.
• E.g. Simulation of a bank from 9 AM to 2 PM
Prepared by Ahmed Saleem
Deterministic Models
➢ Simulation models that contain no random variables are
classified as deterministic.
➢ Deterministic models have a known set of inputs, which all
results in a unique set of outputs.
Prepared by Ahmed Saleem
Stochastic Models
➢ A stochastic simulation model has one or more random
variables as inputs.
➢ Random inputs lead to random outputs.
➢ Random outputs can be considered only as estimates of the
true characteristics of a model.
➢ The Simulation of a bank would usually involve random
interarrival times and random service times.
Prepared by Ahmed Saleem
What is in the mind’s eye? Implicit Modeling
➢ Implicit modeling mean going primarily into the second position
with the person being modeled in order to personally get an
intuitive sense of what experience they are doing.
Prepared by Ahmed Saleem
Maps: An example of Explicit Modeling
➢ Explicit modeling means going into a third position to describe
explicit structure of role model experience so that it becomes
transferable to others.
Prepared by Ahmed Saleem
Simulation is NOT a Silver Bullet!
➢ There is typical misconception often in graduate students
that everything can be, or should be simulated.
➢ Simulation is NOT for everything!
Prepared by Ahmed Saleem
Banks and Gibson (1997)
➢ Bank and Gibson present ten rules for evaluating when
simulation is not appropriate.
Prepared by Ahmed Saleem
Rule Number 1
➢ Simulation should not be used when the problem can be
solved by common sense.
➢ E.g. In an automobile tag facility serving customers who
arrive randomly at an average rate of 100/hour and are
served at a mean rate of 12/hour.
➢ To determine the minimum number of servers needed.
➢ Just compute 100/12 = 8.33 indicating that nine or more
servers are needed.
Prepared by Ahmed Saleem
Rule Number 2
➢ Simulation should not be used if the problems can be solved
analytically.
➢ For example, under certain conditions, the average waiting
time in the example above can be found from curves that
were developed by Hillier and Lieberman (2002).
Prepared by Ahmed Saleem
Rule Number 3 and 4
➢ Simulation should not be used if it is easier to perform direct
experiments.
➢ In a fast food drive in restaurant it can be less expensive to
stage a person taking order using a hand-held terminal and
voice communication to determine the effect of adding
another order station on customer waiting time.
➢ Don’t use simulation if the costs exceed the savings. (4)
➢ If a simulation study costs $20,000 and the savings might be
$10,000, simulation would not be appropriate.
Prepared by Ahmed Saleem
Rule Number 5,6 and 7
➢ Simulation should not be performed if the resources or time
are not available.
➢ If a decision in needed in two weeks and a simulation will
take a month, the simulation study is not advised.
➢ Simulation takes data, sometimes lots of data. (7)
➢ If no data is available, not even estimates, simulation is not
advised.
Prepared by Ahmed Saleem
Rule Number 8 and 9
➢ The next rule concerns the ability to verify and validate the
model.
➢ If there is not enough time or if the personnel are not
available, simulation is not appropriate.
➢ If managers have unreasonable expectations, if they ask for
too much too soon, or if the power of simulation is
overestimated, simulation might not be appropriate. (9)
Prepared by Ahmed Saleem
Rule Number 10
➢ Last, if system behavior is too complex or can’t be defined,
simulation is not appropriate.
➢ Human behavior is sometimes extremely complex to model.
Prepared by Ahmed Saleem
Simulation & Modeling
Thank You!
Prepared by Ahmed Saleem