You are on page 1of 31

Introduction to Simulation and

Model Building

Some slides were created by D. Kelton, R. Sadowski, and


D. Sturrock, to accompany their book, “Simulation with
Arena,” Mc-Graw-Hill, third edition, 2003.
Introduction to Simulation and Model Building, 2

Outline
• Definitions and types
• Models
• The role of random numbers
• What is feasible
• Stages in modeling
• The KISS Principle
• The customer is always right
Introduction to Simulation and Model Building, 3

Simulation - Definition

• An activity whereby one can draw


conclusions about the behavior of a given
system by studying a corresponding,
computer-based, model.
• PURPOSE AND OBJECTIVE
– To evaluate the behavior of the system under
different sets of conditions.
– To determine the best possible operating policy
relative to some particular measure of system
performance.
Introduction to Simulation and Model Building, 4

Simulation Is ...
• Simulation – very broad term – methods and
applications to imitate or mimic real systems,
usually via computer
• Involves a model—validity?
• Don’t even aspire to analytic solution
– Don’t get exact results (bad)
– Allows for complex, realistic models (good)
• Approximate answer to exact problem is better
than exact answer to approximate problem
Introduction to Simulation and Model Building, 5

Systems
• System – facility or process, actual or planned
– Examples abound …
• 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
• Emergency-response system
Introduction to Simulation and Model Building, 6

Models
• Model – set of assumptions/approximations
about how the system works
– Study the model instead of the real system … usually much
easier, faster, cheaper, safer
– Can try wide-ranging ideas with the model
• Make your mistakes on the computer where they don’t count, rather
than for real where they do count
– Often, just building the model is instructive – regardless of
results
– Model validity (any kind of model … not just simulation)
• Care in building to mimic reality faithfully
• Level of detail
• Get same conclusions from the model as you would from system
Introduction to Simulation and Model Building, 7

Types of Models
• Physical (iconic) models
– Tabletop material-handling models
– Flight simulators
• Logical (mathematical) models
– Approximations and assumptions about a system’s
operation
– Often represented via computer program in appropriate
software
– Exercise the program to try things, get results, learn about
model behavior
Introduction to Simulation and Model Building, 8

Studying Logical Models


• If model is simple enough, use traditional
mathematical analysis … get exact results, lots of
insight into model
– Queueing theory
– Differential equations
– Linear programming
• But complex systems can seldom be validly
represented by a simple analytic model
– Danger of over-simplifying assumptions … model validity?
– Type III error – working on the wrong problem
• Often, a complex system requires a complex
model, and analytical methods don’t apply …
what to do?
Introduction to Simulation and Model Building, 9

Computer Simulation
• Broadly interpreted, computer simulation refers
to methods for studying a wide variety of models
of systems
– Numerically evaluate on a computer
– Use software to imitate the system’s operations and
characteristics, often over time
• Can be used to study simple models but should
not use it if an analytical solution is available
• Real power of simulation is in studying complex
models
• Simulation can tolerate complex models since we
don’t even aspire to an analytical solution
Introduction to Simulation and Model Building, 10

Advantages of Simulation
• Flexibility to model things as they are (even if
messy and complicated)
• Allows uncertainty, non-stationarity in modeling
– The only thing that’s for sure: nothing is for sure
– Danger of ignoring system variability
– Model validity
• Advances in computing/cost ratios
• Advances in simulation software
– Far easier to use (GUIs)
– Statistical design & analysis capabilities
Introduction to Simulation and Model Building, 11

Different Kinds of Simulation


• Static vs. Dynamic
– Does time have a role in the model?
• Continuous-change vs. Discrete-change
– Can the “state” change continuously or only at discrete
points in time?
• Deterministic vs. Stochastic
– Is everything for sure or is there uncertainty?
• Most operational models:
– Dynamic, Discrete-change, Stochastic
• Though Chapter 11 discusses continuous and combined discrete-
continuous models
Introduction to Simulation and Model Building, 12

Using Computers to Simulate


• Simulation languages
– GPSS, SIMSCRIPT, SLAM, SIMAN (on which Arena is
based, and is included in Arena)
– Popular, still in use
– Learning curve for features, effective use, syntax
Introduction to Simulation and Model Building, 13

Where Arena Fits In


• Hierarchical structure
– Multiple levels of modeling
– Can mix different modeling
levels together in the same
model
– Often, start high then go lower
as needed
• Get ease-of-use advantage
of simulators without
sacrificing modeling
flexibility
Introduction to Simulation and Model Building, 14

Types of Simulation
• Discrete
• Continuous
• Real-time
• Object oriented
• Distributed
• Intelligent
Introduction to Simulation and Model Building, 15

Simulation Involves
• Building computer-based models.
• Using the models to carry out
experiments.
• Drawing inferences about changes in
existing systems without actually
disturbing them.
• Drawing inferences about new systems
without actually building them.
Introduction to Simulation and Model Building, 16

Model Building Approach

system
purpose
boundaries
level of detail
design
performance
measures
model alternatives

Assessment

implementation
Inferences about system
w/o building
w/o disturbing
w/o destroying
Introduction to Simulation and Model Building, 17

The basics: A table of random


numbers
05 69 56 30 32 66
55 24 80 35 10 98
25 96 58 14 68 15
18 99 13 05 03 83
34 78 50 89 98 93
70 11 49 01 79 35
64 43 71 48 36 78
53 67 37 57 25 17
84 59 68 45 12 53
68 38 18 60 02 08
Introduction to Simulation and Model Building, 18

An example
Type Code Prob. Cum.Prob. r.n.
Routine 1 0.20 0.20 01-20
Severe 2 0.30 0.50 21-50
Life-threat 3 0.35 0.85 51-85
DOA 4 0.15 1.00 86-00
First few numbers give:
05 Type: 1 routine case
69 3 life-threatening case
56 3 life-threatening case
30 2 severe case
Introduction to Simulation and Model Building, 19

What Simulation Can Do


• Provide realistic estimates of
– Expected system behavior
– Variations within the system
• Evaluate the effects of
– Adding, replacing or deleting machines or workers
– Changing the process flow and/or product mix
– Changing the process and/ or setup times
– Introducing new products / Deleting existing products
– Changing material handling methods
– Changing scheduling methods
– Location and size of inventories
– Reliability analysis (planned vs. unplanned maintenance)
Introduction to Simulation and Model Building, 20

What Simulation Can NOT Do

• It cannot optimize your system's performance; it


can only describe the results of "what if"
questions.
• It cannot give accurate results if the data are
inaccurate.
• It cannot describe system characteristics that
have not been explicitly modeled.
• It cannot solve problems; it can only provide
information, from which solutions can be
inferred.
Introduction to Simulation and Model Building, 21

The Limits to Simulation

• Answers to “WHAT IF?”


• Does NOT answer to:
– WHY?
– WHEN?
– HOW?
– EVER?/NEVER?
– BEST?
– GOAL?
Introduction to Simulation and Model Building, 22

Typical Purposes
• Will the system work as intended?
(Evaluation and prediction)
• Why doesn't it work? (Bottleneck
determination and optimization)
• Which is the best alternative? (Comparison
and sensitivity analysis)
• Objectives: must define the kind of
decisions that must be made in order to
answer questions.
Introduction to Simulation and Model Building, 23

The Bad News


• Don’t get exact answers, only approximations,
estimates
– Also true of many other modern methods
– Can bound errors by machine roundoff
• Get random output (RIRO) from stochastic
simulations
– Statistical design, analysis of simulation experiments
– Exploit: noise control, replicability, sequential sampling,
variance-reduction techniques
– Catch: “standard” statistical methods seldom work
Introduction to Simulation and Model Building, 24

Different Kinds of Simulation


• Static vs. Dynamic
– Does time have a role in the model?
• Continuous-change vs. Discrete-change
– Can the “state” change continuously or only at discrete
points in time?
• Deterministic vs. Stochastic
– Is everything for sure or is there uncertainty?
• Most operational models:
– Dynamic, Discrete-change, Stochastic
Introduction to Simulation and Model Building, 25

Stages of Modeling
• Identify problem
– State objectives JJJJ

– Control variables
– Measures of effectiveness
– Constraints
• Formulate model
– Collect/prepare data
– Verify/validate model
• Experiment and interpret results
– Conclude and implement
Introduction to Simulation and Model Building, 26

Beginning The Study


• Every simulation study should begin by developing
a clear statement of the purpose, goals and
objectives of the project.
• An analyst is responsible for converting the client's
(vague) description into an appropriate problem
definition.
• Develop a model to help answer certain questions
about the system.
• Tradeoffs made in formulation depend on study's
goals and objectives.
Introduction to Simulation and Model Building, 27

Things to Keep in Mind


• Measures of effectiveness:
– Throughput
– WIP
– Cycle time
– Down time
– Queue time
– Utilization
• Sources of information: Documentation,
interviews, observation and measurement.
– How much data? How accurate?
Introduction to Simulation and Model Building, 28

The KISS Principle


• Large models:
– take longer to build and run
– harder to debug, modify, validate, document
– harder to understand and analyze
– require more data
• Begin with simple model.
– Embellish later with more detail. Iterate.
– Goal is to capture the essence of the real system
without including unnecessary detail.
– Level of detail should be proportional to impact the
detail has on results.
• Better 80% on time than 100% late!
Introduction to Simulation and Model Building, 29

Building Simple Models


• Omit certain details
• Aggregate details into a single, equivalent, function.
• Substitute a simpler (but approximate) process for a
complex one (e.g., replace a probabilistic service time
by a constant equal to the process mean).
• Identify critical factors (“First Order Effects”).
• Keep focus on desired objectives and how do you
measure effectiveness in reaching them.
Introduction to Simulation and Model Building, 30

Building Simple Models


• Level of detail should be proportional to impact the detail
has on results. Example: If job spends 10% of time in
queue, 85% in material handling, and 5% in processing,
include more detail in the material handling portion of the
model.
• Try to lump together closely coupled activities.
• Carefully assess the impact of model simplification on
results: Do they cause bias?
• It is better to get an approximate solution to the correct
problem than the correct solution to an approximate
problem!
Introduction to Simulation and Model Building, 31

The Customer is Always Right


• Keep close to the client
– Use a simple, first cut model to discuss with client
its uses and the type of information it will provide
• Double check your understanding of the problem
– Do NOT solve correctly the wrong problem!
– Concentrate in what the customers needs
(measures of effectiveness!)
• Go back to the client as often as needed
– Estimate the impact of each set of refinements
– Keep smiling

You might also like