You are on page 1of 34

INTRODUCTION TO

MODELLING AND
SIMULATION
Goals Of This
Course
History of Modeling and
Simulation Introduce Modeling
Introduce Simulation
Develop an Appreciation for the Need
for Simulation
“Learn by Doing”--Lots of Case Studies
History of Modeling and
Simulation
INTEROPERABILITY

GAMES VIRTUAL
REALITTY
LIVE
REHERSAL
SYSTEMS
ANALYSIS ENTERTAINMENT

DISCRETE
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)
Types of
Physical
Models:
(Scale models, prototype plants,…)

Mathematical
(Analytical queueing models,
linear programs, simulation)
MATHEMATICAL MODEL
• An abstract and simplified representation of a
system
• Specifies
– Important components
– Assumptions/approximations about how the system
works
• Not an exact re-creation of the original system!
• If model is simple enough, study it with Queuing
Theory, Linear Programming, Differential
Equations...
• If model is complex, Simulation is the only
GETTING ANSWERS FROM MODELS

ACTUAL SYSTEM
Operating Policies
• Single queue, parallel servers
• FIFO Output Parameters
(X) (Y)
Input Parameters • Waiting Times
• No of servers MODEL • System Size
• Inter-arrival Time Distribution • Utilizations
• Service Time Distributions
Y = f (X)
STOCHASTIC MODELS
• Randomness or uncertainty is inherent
• Example: Bank with customers and tellers



ACTUAL SYSTEM QUEUEING MODEL


APPLICATIONS
Systems – facility or process, actual or planned

Examples
Manufacturing facility
Bank operation
Airport operations (passengers, security, planes, crews, baggage)
Transportation/logistics/distribution operation
Hospital facilities (emergency room, operating room,
admissions)
Computer network
Freeway system
Business process
(insurance office)
Criminal justice system
Chemical plant
Fast-food restaurant
Supermarket
Theme park
CLASSIFICATION OF SIMULATION MODELS

Static (Monte Carlo) Dynamic Systems

Represents the system at a particular point


in time Represents the system behaviour over time
IID observations Continuous Simulation:
• (Stochastic) Differential Equations

• Estimation of  • Water Level in a Dam


• Risk Analysis in Business
Discrete Event Simulation:
•System quantities (state variables) change
with events

• Queueing Systems
• Inventory Systems
HOW TO SIMULATE
• By hand
– Buffon Needle and Cross Experiments (see Kelton et
al.)
• Spreadsheets
• Programming in General Purpose Languages
– Java, UML
• Simulation Languages
– SIMAN
• Simulation Packages
– Arena, MAYA, STELLA
Issue: Modeling Flexibility vs. Ease of Use
WHAT IS SIMULATION?

A Simulation of a system is the operation of a


model, which is a representation of that
system

The imitation of the operation of a real-


world process or system over time…
– Most widely used tool for decision making
– Usually on a computer with appropriate software
– An analysis (descriptive) tool – can answer what if
questions
– A synthesis (prescriptive) tool – if complemented by
WHAT IS SIMULATION?
Applied to complex systems that are
impossible to solve mathematically
We shall focus on one form of simulation
modelling – discrete-event simulation
modelling
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
Applications
:
Designing and analyzing manufacturing systems
Evaluating and testing 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
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


Steps In Simulation and
Model Building
1. Define an achievable goal
2.Put together a complete mix of skills on
the team
3. Involve the end-user
4. Choose the appropriate simulation
tools
5. Model the appropriate level(s) of
detail
Steps In Simulation and
Building(cont’d)
Model
7.Provide adequate and on-going
documentation
8. Develop a plan for adequate
model verification
(Did we get the “right
answers ?”)
9. Develop a plan for model validation
(Did we ask the “right questions ?”)
10.Develop a plan for statistical output
The Role of Computers in
Simulation
General-purpose languages
Visual Basic, C++, Java
 Special-purpose simulation languages
GPSS/H, SLAM II, SIMSCRIPT II.5

1. require less programming


2. more efficient and easier to
check for errors
3. have random number generators
built in

 Special Purpose
Simulation Package
Extend, AutoMod, ALPHA/Sim, SIMUL8,STELLA,
Arena, AweSim!, SLX, etc.
MODELLING W/ GENERAL
PURPOSE LANGUAGES
Advantages:
– Little or no additional software cost
– Universally available (portable)
– No additional training (Everybody knows…(language X) !
)
– Open source and free

Disadvantages:
– Every model starts from scratch
– Very little reusable code
– Long development cycle for each model
GEN. PURPOSE LANGUAGES
USED FOR SIMULATION
FORTRAN
– Probably more models than any other language.
PASCAL
– Not as universal as FORTRAN
MODULA
– Many improvements over PASCAL
ADA
– Department of Defense attempt at
standardization
C, C++, Java
– Object-oriented programming language
MODELING W/ GENERAL
SIMULATION LANGUAGES
Advantages:
– Standardized features often needed in
modeling
– Shorter development cycle for each model
– Much assistance in model verification
– Very readable code
Disadvantages:
– Higher software cost (up-front)
– Additional training required
GENERAL PURPOSE SIMULATION
LANGUAGES
GPSS
– Block-structured Language
– Interpretive Execution
– FORTRAN-based (Help blocks)
– World-view: Transactions/Facilities

SIMSCRIPT II.5
– English-like Problem Description Language
– Compiled Programs
– Complete language (no other
underlying language)
– World-view: Processes/ Resources/
GEN. PURPOSE
SIMULATION
LANGUAGES
MODSIM III (continued)
– Modern Object-Oriented Language
– Modularity Compiled Programs
– Based on Modula2 (but compiles into C)
– World-view: Processes
SIMULA
– ALGOL-based Problem Description
Language
– Compiled Programs
– World-view: Processes
GEN. PURPOSE SIMULATION
LANGUAGES (continued)
SLAM
– Block-structured Language
– Interpretive Execution
– FORTRAN-based (and extended)
– World-view: Network / event /
continuous
CSIM
– process-oriented language
– C-based (C++ based)

MODELING W/ SPECIAL-
PURPOSE SIMUL.
AdvantagesPACKAGES
– Very quick development of complex
models
– Short learning cycle
– No programming--minimal errors in usage

Disadvantages
– High cost of software
– Limited scope of applicability
– Limited flexibility (may not fit your
specific application)
SPECIAL PURPOSEPACKAGES USED FOR
SIMULATION
NETWORK II.5
– Simulator for computer systems
OPNET
– Simulator for communication networks, including
wireless networks
COMNET III
– Simulator for communications networks
SIMFACTORY
– Simulator for manufacturing operations
MAYA
– Simulator for computer systems
STELLA
– Simulator for manufacturing operations, computer
systems etc
ADVANTAGES OF SIMULATION
•When mathematical analysis methods are not
available, simulation may be the only
investigation tool
•When mathematical analysis methods are
available, but are so complex that simulation may
provide a simpler solution
•Allows comparisons of alternative designs or
alternative operating policies
• Allows time compression or expansion
DISADVANTAGES OF SIMULATION

• For a stochastic model, simulation estimates the


output while an analytical solution, if
available, produces the exact output

• Often expensive and time consuming to


develop

• An invalid model may result with confidence in


wrong results.
The Nature of
Simulation
• Impediments to acceptance, use
of simulation
– Models of large systems are usually
very complex
• But now have better modeling software … more
general, flexible, but still (relatively) easy to use
– Can consume a lot of computer time
• But now have faster, bigger, cheaper hardware to allow
for much better studies than just a few years ago … this
trend will continue
• However, simulation will also continue to push the
envelope on computing power in that we ask more
and more of our simulation models
The Nature of Simulation
cont…
– Impression that simulation is
“just programming”
• There’s a lot more to a simulation study than just
“coding” a model in some software and running it to get
“the answer”
• Need careful design and analysis of simulation models
– simulation methodology
Pitfalls with Computer
• Simulation
Failure to have a well-defined set of objectives at
the beginning of the simulation.
• Failure to have the entire project team involved at
the beginning of the study.
• Inappropriate level of model detail.
• Failure to communicate with management
throughout the course of the simulation study.
• Misunderstanding of simulation by the management.
• Treating simulation as if it were primarily an
exercise in computer programming.
• Failure to have people with a knowledge of
simulation methodology and statistics on the
Pitfalls with Computer
• Simulation
Failure to collect good system data, e.g. not
enough data to create a good model.
• Inappropriate simulation software.
• Belief that easy-to-use simulation tools require
a significantly lower level of technical
• competence.
Failure to account correctly for sources of
• randomness in the system under consideration.
Using arbitrary random distributions as input to
• the simulation.
Analyzing the output from the simulation
using formulas that assumes independence.
Pitfalls with Computer
• Simulation
Making single replication of a particular
system design and treating the output
statistics as true answers.
• Failure to have warm up period, if the
steady state behavior of a system is of
interest.
• Comparing alternative system designs on
the basis of one replica for each design.
• Using wrong performance measures.

You might also like