into to simulation
TRANSCRIPT
HAKEEM–UR–REHMANPhD (Scholar) Management Science & Engineering
Center of Logistics & Operations Management,
Antai College of Economics and Management,
Shanghai Jiao Tong University, Shanghai, China1
Simulation Modeling:
An Overview
Outlines
2
What is a System?
Components of a System
Types of Systems
Model of a system
Simulation & Simulation model types
Monte Carlo Simulation: Example
Discrete Event Simulation: Example
What is a System?
3
A system is any set of interrelated components acting together to
achieve a common objective.
INPUT OUTPUTSYSTEM
Manufacturing
Healthcare
Banking
Components of a System
4
Entity: “Flow units transformed by the system over time”
Attribute: “A property of an entity”
Activity: “Time period of specified Length”
o Example: Banking System
o Customers might be one of the entities
o The balance in their checking accounts might be an attribute
o Making deposits might be an activity
Sate of a System: “Collation of variables necessary to describe the
system at any time relative to the objectives of the study”
o Bank: # of busy tellers, # of customers waiting in the queue,
arrival time of the next customer”
Three Types of Systems
5
System
Quantum System
Subatomic World
Cosmological Systems
Continuous System
Electro-mechanical
Systems
Socio-economic, Ecological Systems
Discrete–Event System
Industrial Systems
(Factory, Office, etc.)
Components of a system are
described using quantum
mechanics
physical dynamics are
described using differential
equations of effort,
such as force and voltage, and
flow, such as velocity and
current
event-driven system
an instance of
changes in state
variables
Model of a System
6
A model is a representation of the structure of a real life system.
REAL
SYSTEM
o Simplification
o Abstraction
o Assumptions
MODEL
System
What is a Simulation?
7
The process of running a computer model of a real system to study
or conduct experiments
For understanding the model or its behavior
To evaluate strategies for operation of the system
used to draw conclusions about the real system.
Simulation
vs.
Real World
Different Kinds of Simulation
8
Continuous Vs. Discrete Change
Can “state” change continuously,
or only at discrete points in time?
Deterministic Vs. Stochastic
Is everything for sure or is there
uncertainty?
Static Vs. Dynamic
Does time have a role in model?
Most operational models: Stochastic, Dynamic, Discrete-change
System Model
Deterministic Stochastic
Static Dynamic Static Dynamic
Continuous Discrete Continuous Discrete
Monte Carlo
Simulation
Continuous
SimulationContinuous
Simulation
Discrete
Event
Simulation
Discrete
Event
Simulation
Monte Carlo Simulation
9
Monte Carlo methods (or Monte Carlo experiments) are a broad
class of computational algorithms that rely on repeated random
sampling to obtain numerical results.
“Monte Carlo is a method of approximating things using samples”
Monte Carlo: approximates expectations with a sample average
𝐴𝑝𝑝𝑟𝑜𝑥𝑖𝑚𝑎𝑡𝑒 𝐸 𝑓 𝑥 = 𝑓 𝑥 𝑃 𝑥 𝑑𝑥 ≈1
𝑆 𝑠=1
𝑆 𝑓 𝑥 𝑠 𝑥 𝑠 ~𝑃 𝑥
ACCEPTANCE–REJECTION SAMPLING:
Sampling Underneath a 𝑃 𝑥 ∝ 𝑃(𝑥) curve is also
valid
o Draw underneath a simple curve 𝑘 𝑄(𝑥) ≥ 𝑃(𝑥)• Draw 𝑥 ~𝑄(𝑥)• Height 𝑢 ~𝑈𝑛𝑖𝑓𝑜𝑟𝑚[0, 𝑘 𝑄(𝑥)]
o Discard the point if above 𝑃 𝑥 ,
(i.e. if 𝑢 > 𝑃(𝑥))
Monte Carlo Simulation: Example
10
Using MC to Estimate 𝜋
𝐴𝑟𝑒𝑎 𝑜𝑓 𝐶𝑖𝑟𝑐𝑙𝑒 = 𝜋𝑟2
𝐴𝑟𝑒𝑎 𝑜𝑓 𝑆𝑞𝑢𝑎𝑟𝑒 = 4𝑟2
𝑥2 + 𝑦2 = 𝑟2
𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑡𝑦 𝑝𝑜𝑖𝑛𝑡 𝑖𝑛𝑠𝑖𝑑𝑒 𝑡ℎ𝑒 𝑐𝑖𝑟𝑐𝑙𝑒 =𝜋𝑟2
4𝑟2
𝝅 = 4 ∗ 𝑃𝑟𝑜𝑏𝑎𝑏𝑖𝑙𝑡𝑦 𝑝𝑜𝑖𝑛𝑡 𝑖𝑛𝑠𝑖𝑑𝑒 𝑡ℎ𝑒 𝑐𝑖𝑟𝑐𝑙𝑒
Discrete Event Simulation
11
A single Machine system
Simulation Model Trajectory
Also called System Simulation
“process of codifying the behavior of a complex system as an
ordered sequence of well-defined events”
Discrete Event Simulation…
12
Collecting Statistics from the Model Trajectory:
Queue Length 𝑞(𝑡) statistics during 𝑡 ∈ [𝑡0, 𝑡10] Average waiting time
Average System time (Waiting time + Service time)
Resource utilization
Discrete Event Simulation…
13
Arena Simulation Software
https://www.arenasimulation.com/academic/students
A Single Machine System
Entity: Job arrives every 𝑡𝑎 minutes (𝑡𝑎~𝐸𝑥𝑝(5)) Active Resource: Machine
Passive Resource: Buffer (unlimited)
Activity: service time 𝑡𝑠~𝑇𝑟𝑖𝑎𝑛𝑔𝑢𝑙𝑎𝑟(1,3,6))
Example
Discrete Event Simulation…
14
Books
15
For Theory + AnalysisFor Arena Software
16