Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
and Simulation
Dr. A. K. Dey
Lecture 1
Introduction to Simulation
A Simulation is the imitation of the operation of a
real-world process or system over time
A System is defined to be a set of elements which
interact or interrelated in some fashion
Elements having no relationship with the set of elements
that have been chosen as system can not affect the system –
hence irrelevant
A System may consist of sub systems or may be a part of a
larger system
Elements that often make up the system are called
Entities
Entities that comprise a system need not be tangible e.g, a
queuing system is made up of customers, queue and servers
Customers and servers are physical entities but queue itself
is a concept
05.06.2008 2
More components of a system
An Attribute is a property of a system
An Activity represents a time period of specified length
State of system is defined to be that collection of
variables necessary to describe the system at any time ,
relative to the objective of the study
In the study of a bank possible state variables are number of
busy tellers, number of customers waiting in the queue or
being served, arrival and service times of the next customer
An Event is defined as an instantaneous occurrence
that may change the state of the system
05.06.2008 3
More terms of a system
Endogenous – used to describe the activities
and events occurring within a system
Exogenous – is used to describe activities and
events in the environment that affect the
system
In the bank – arrival of a customer is exogenous
event and completion of service of a customer is
endogenous event
05.06.2008 4
Examples: Banking System
Entities – Customers
Attributes (property of an entity)– Checking account
balance, making deposits, getting a draft made
Activities (time period of specified length) – Time
taken to make a deposit, time taken to get a draft
made
Events – arrival, departure
State variables – Number of busy tellers, number of
customers waiting
05.06.2008 5
Examples: Rail System
Entities – Commuters
Attributes (property of an entity)– Origination ,
Destination
Activities (time period of specified length) –
Traveling
Events – arrival at station, arrival at destination
State variables – Number of commuters waiting
at each station, number of commuters traveling
05.06.2008 6
Examples: Production System
Entities – Machines
Attributes (property of an entity)– Speed ,
Capacity, Breakdown rate
Activities (time period of specified length) –
Welding, Cutting, Stamping
Events – breakdown
State variables – Status of machines – busy,
idle or down
05.06.2008 7
Examples: Communications System
Entities – Messages
Attributes (property of an entity)– Length ,
Destination
Activities (time period of specified length) –
Transmitting
Events – arrival at destination
State variables – Number of messages waiting
to be transmitted
05.06.2008 8
Examples: Inventory System
Entities – Warehouse
Attributes (property of an entity)– Capacity
Activities (time period of specified length) –
Issue, Receipt
Events – Demand
State variables – Level of inventory,
Backlogged demands
05.06.2008 9
Introduction to model
A model is a system that is used as a surrogate for
another system
Reason for using a model
Helps in understanding the behaviour of a real system before
it is built
Cost of building and experimenting with a model is less
Models can be used to mitigate risk – pilots can be taught
how to cope with wind sheer while landing
Models have the capability of scale time or space in
favourable manner – wind sheer can be produced on demand
05.06.2008 10
Types of Models
Broadly there are two types
Physical
05.06.2008 11
Building a simulation gas station
Assume
single pump served by a single service man
arrival of cars as well their service times are random.
At first identify the:
states: number of cars waiting for service and number of
cars served at any moment
events: arrival of cars, start of service, end of service
entities: these are the cars
queue: the queue of cars in front of the pump, waiting for
service
random realizations: inter-arrival times, service times
distributions: we shall assume exponential distributions for
both the inter-arrival time and service time.
05.06.2008 12
Ten Types of Models
Iconic - physical models that are images of the real
world; dimensions are usually scaled up or down; for
example, models of cars might be constructed and
tested in a wind tunnel
Analog - model that substitutes one set of properties
for another; may be iconic or mathematical; electric
resistance often used as an analog of the friction of a
fluid flowing in a pipe; this approach is not as widely
used as at one time – digital computers have allowed
the development of other modeling techniques that
have replaced analog models
05.06.2008 13
Ten Types of Models
Stochastic - probabilistic model that uses randomness
to account for immeasurable factors (e.g., weather)
Deterministic - model that does not use randomness
but uses explicit expressions for relationships that
may or may not involve time rates of change
Discrete - model where state variables change in
steps as opposed to continuously with time (e.g.,
number of cattle in a barn); may be deterministic or
stochastic
05.06.2008 14
Ten Types of Models
Continuous - model whose state variables change
continuously with time (e.g., biomass in a field); usually
sets of differential equations used; initial conditions
required (can be difficult to obtain for some systems!)
Combined - model where some state variables change
continuously and others change in steps at event times;
for example, a field of hay might be modeled using a
combined approach with the biomass modeled
continuously during growth and then as a discrete event
when harvested
05.06.2008 15
Ten Types of Models
Mathematical - abstract model usually written
in equation form
Object-oriented - use objects that are
abstractions of real world objects and develop
relationships and actions between objects;
comes from field of artificial intelligence
Heuristic - heuristics (rules) are used to model
the system; comes from field of artificial
intelligence.
05.06.2008 16
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 17
Applications:
Designing and analyzing manufacturing
systems
Evaluating H/W and S/W requirements for a
computer system
Evaluating a new military weapons system or
tactics
Determining ordering policies for an
inventory system
Designing communications systems and
message protocols for them
Introduction 18
Applications:(continued)
Designing and operating transportation
facilities such as freeways, airports, subways,
or ports
Evaluating designs for service organizations
such as hospitals, post offices, or fast-food
restaurants
Analyzing financial or economic systems
Introduction 19
Types of Simulation Models
System model
deterministic stochastic
05.06.2008 23
Discrete & Continuous Systems
Essential to remember that
A discrete simulation model is not always used to model a
discrete system
Similarly, a continuous simulation model is not always
used for a continuous system
Simulation models may also be mixed – both discrete and
continuous
Choice of discrete or continuous simulation models is
a function of
Characteristics of the system
Objective of the study
05.06.2008 24
Discrete & Continuous Systems
Communication channel
Modeled as discrete – if characteristics of
movement of each message is important
Modeled as continuous – if flow of messages as
aggregate over the channel is important
In this course we will study only
Models that are discrete, dynamic and stochastic
05.06.2008 25
Discrete event systems (DES)
DES are dynamic systems which evolve in
time by the occurrence of events at possibly
irregular time intervals
DES abound in real-world applications
Examples include traffic systems
flexible manufacturing systems
computer-communications systems
production lines
flow networks.
05.06.2008 26
Discrete event systems (DES)
Most of these systems can be modeled in terms
of discrete events whose occurrence causes the
system to change from one state to another
In designing, analyzing and operating such
complex systems, one is interested not only in
performance evaluation but also in sensitivity
analysis and optimization.
05.06.2008 27
Discrete event system simulation
(DESS)
It is modeling of systems in which the state variable
changes only at a discrete set of points in time
Simulation models are analyzed by numerical
methods rather than by analytical methods
Analytical methods apply deductive reasoning to
solve
Differential calculus can be used to calculate EOQ
In case of simulation – model is “run” rather than
solved
An artificial history of the system is generated (with
the help of computer) based on system characteristics
and observations are collected to be analyzed
05.06.2008 28
Steps in Simulation Study
Problem Formulation
Model Conceptualization
Validate model
More runs?
Implementation
05.06.2008 30
Problem Formulation
Initial step
Identify controllable and uncontrollable inputs
Identify constraints on the decision variables
Define measure of system performance and an
objective function
Develop a preliminary model structure to interrelate
the inputs and the measure of performance
May be the problem needs reformulation as the study
progresses
05.06.2008 31
Setting Objectives & Plan
What do you (or the customer) hope to accomplish
with the model
May be an end in itself
Predict the weather
Train personnel to develop certain skills (e.g., driving)
More often a means to an end
Optimize a manufacturing process or develop the most cost
effective means to reduce traffic congestion in some part of a city
Often requires developing a business case to justify
the cost
Improved efficiency will save the company $$$
Example: electronics
Even so, may be hard to justify in lean times
Goals may not be known when you start the project!
One often learns things along the way
05.06.2008 32
Develop Conceptual Model
An abstract (i.e., not directly executable) representation of
the system
What should be included in model? What can be left out?
What abstractions should be used
Level of detail
Often a variation on standard abstractions
Example: transportation
Fluid flow?
Queuing network?
Cellular automation?
What metrics will be produced by the model?
Appropriate choice depends on the purpose of the model
05.06.2008 33
Data Collection
Regardless of the method used to collect the
data, the decision of how much to collect is a
trade-off between cost and accuracy
Constant inter play between construction of
the model and the collection of needed input
Changes with the degree of complexity of the
model
Data should be collected for the validation as
well
05.06.2008 34
Model translation
Model requires great deal of information and
computation
Needs to be translated into computer
recognizable format using either special
purpose or general purpose languages
Focus of this course will be using Excel for
model building
Arena characteristics will be introduced
05.06.2008 35
Verification & Validation
Verification focuses on the internal
consistency of a model
Validation is concerned with the
correspondence between the model and the
reality
Validation is applied to those processes which
seek to determine whether or not a simulation
is correct with respect to the "real" system
Validation is concerned with the question "Are
we building the right system?“
05.06.2008 36
Verification & Validation
Verification seeks to answer the question "Are
we building the system right?"
Verification checks that the implementation of
the simulation model (program) corresponds to
the model
Validation checks that the model corresponds
to reality
Calibration checks that the data generated by
the simulation matches real (observed) data.
05.06.2008 37
Experimental Design
Alternatives to be simulated must be determined
Good experimental design
Randomization
Replication
Local control
05.06.2008 38
Production runs and analysis
To measure performance of the simulation
system so designed
Also to determine if more runs needed till
results are consistent
05.06.2008 39
Documentation & Reporting
Two types
Program
Needed if it is to be used again
May need to be applied for different system by different
people
For modification
Progress
Provides important written history of simulation project
Should be frequent as the project progresses
05.06.2008 40
Implementation
Success depends how well previous steps were
followed
05.06.2008 41
Thanks
05.06.2008 42