Professional Documents
Culture Documents
SYSTEMS SIMULATION
1
LECTURE 1
OUTLINE
Simulation Methodology
3
OPEN OR CLOSED SYSTEM
Entity
Exterior
Entity Environment
Entity
Entity Entity
SYSTEM
Entity
Entity
BOUNDARY
Entity
5
SYSTEM COMPLEXITY
N = Number of elements
K = Number of links (Degree of Connectedness)
D = Degree of Diversity (How heterogeneus?)
Non-linearity of relationships
6
NON-LINEARITY
Linear Relationships : Cause and Effect
Output proportional to input
Examples:
Fuel and Distance travelled
Two TV factories – Each producing n TV per year
Non-linear Relationship:
Synergistic: Output greater than the sum of its parts
Interference: Output less than the sum of its parts
Example : 4 textile workers producing t-shirts
7
ANALYTICAL vs. SYSTEMS THINKING
Key Differences:
SETS (Objects) vs. SYSTEMS (Function)
COMPONENTS vs. RELATIONS
LINEAR (Causality) vs. NON-LINEAR (Feedback)
STATIC (Structure) vs. DYNAMIC (Process)
8
ANALYTICAL vs. SYSTEMS THINKING
Systems Thinking :
Identify the car’s function: personal transportation
9
SYSTEM CLASSIFICATION
Classification of models:
iconic (physical)
mathematical
analog
11
HOW TO STUDY A SYSTEM
Analytical solutions
Numerical solutions
Simulation
12
WHY SIMULATE?
• What is SINSFIT?
13
WHY SIMULATE?
SINSFIT
14
WHY SIMULATE?
15
SIMULATION
...
INPUT SIMULATION OUTPUT
MODEL
Performance
Measures
Uncontrollable Variables
16
MANUFACTURING SYSTEM
Major Questions:
What is the best design?
How to improve the current system?
Performance Measures:
Delay in order fulfillment
Throughput
Reliability
Further Questions:
Where are the bottlenecks?
How frequent are the machine breakdowns?
17
BENEFITS
18
LIMITATIONS
19
TYPES OF SIMULATION
Discrete Event Simulation
Continuous Simulation
Distributed Simulation
20
DISCRETE EVENT SIMULATION
Initialization routine
System state Timing routine
Simulation Clock
Event routine
Event list
Statistical counters Library routines
Report Generator
24
COMPONENTS OF DES MODEL
Initialization routine
1. Set simulation clock = 0
2. Initialize system state and statistical counters
3. Initialize event list
Timing routine
1. Determine the next event type
2. Advance the simulation clock
Event routine
1. Update system state
2. Update statistical counters
3. Generate future events and update event list 25
COMPONENTS OF DES MODEL
Library routines
Generate random variates
Report Generator
1. Compute estimates of interest
2. Write report
Main Program
0. Invoke the initialization routine
1. Invoke the timing routine
2. Invoke event routine i
26
MONTE CARLO SIMULATION
27
MONTE CARLO SIMULATION
The term "Monte Carlo" comes from the name of a city in
Monaco. The city's main attractions are casinos, which run
games such as roulette wheels, dice and slot machines.
These games provide entertainment by exploiting the
random behaviour of each game.
28
Stanislaw Marcin Ulam
• Devised the 'Monte-Carlo method' widely
used in solving mathematical problems
using statistical sampling in 1946.
http://www-history.mcs.st-andrews.ac.uk/history/Mathematicians/Ulam.html 29
Stanislaw Marcin Ulam
Invented the Monte Carlo method in 1946 while pondering the probabilities of
winning a card game of solitaire.
“The first thoughts and attempts I made to practice [the Monte Carlo Method] were
suggested by a question which occurred to me in 1946 as I was convalescing from an
illness and playing solitaires. The question was what are the chances that a Canfield
solitaire laid out with 52 cards will come out successfully? After spending a lot of
time trying to estimate them by pure combinatorial calculations, I wondered whether
a more practical method than “abstract thinking” might not be to lay it out say one
hundred times and simply observe and count the number of successful plays. This
was already possible to envisage with the beginning of the new era of fast computers,
and I immediately thought of problems of neutron diffusion and other questions of
mathematical physics, and more generally how to change processes described by
certain differential equations into an equivalent form interpretable as a succession of
random operations. Later … [in 1946, I] described the idea to John von Neumann,
and we began to plan actual calculations.”
Eckhardt, Roger (1987). Stan Ulam, John von Neumann, and the Monte Carlo 30
method, Los Alamos Science, Special Issue (15), 131-137.
Metropolis, Nicholas Constantine
(1915-1999)
Greek-American mathematician who
worked on Manhattan Project, and
collaborated with Enrico Fermi and Edward
Teller on the first nuclear reactors.
31
MONTE CARLO SIMULATION
Monte Carlo simulation randomly select values to create scenarios of a problem.
These values are generated randomly according to a probability distribution [e.g.
Uniform, exponential, normal, lognormal, etc.].
This is like rolling a die. If it is a fair die, the outcome is known to be one of the six
values {1,2,...,6} each with a chance of 1/6 . There is an equal opportunity for any
number to be the outcome.
32
MONTE CARLO SIMULATION
EXAMPLES
33
Example 1 – Area Estimation
34
Example 1 – Area Estimation
Procedure :
Number of Successes
Area = x 50
n
Naturally, more accurate approximations for the shaded area can be obtained if more
trials are repeated.
35
Example 2 – Computation of Pi
Y
(1,1) Procedure :
Number of Successes
Area of Circle = x Area of Square
n
Number of Successes
π = x4
n
36
Example 2 – Computation of Pi
Procedure :
(1,1)
Randomly select a location (X,Y) within the
square.
If X 2 +Y 2 ≤ 1, then SUCCESS
Estimate Pi as
Number of Successes
π= x4
n
37
EXAMPLE 3. DEMONSTRATION OF
CENTRAL LIMIT THEOREM
Experiment: cast a die n times
n=1
0.250
0.200
0.150
0.100
0.050
0.000
11
13
15
17
38
EXAMPLE 3. DEMONSTRATION OF
CENTRAL LIMIT THEOREM
Experiment: cast a die n times 0.250
0.200
n=2
0.150
0.100
0.050
0.000
11
13
15
17
n=3
0.250
0.200
0.150
0.100
0.050
0.000
39
1
11
13
15
17