SlideShare a Scribd company logo
1 of 29
Download to read offline
Static - Dynamic
Anna Maria Sri Asih
Department of Mechanical & Industrial Engineering
Gadjah Mada University
Introduction
 Deterministic models:
 expressed in terms of differential equations
 can exactly predict the development of a system based
on initial and boundary conditions
 Stochastic models
 use random variables
 outcomes are uncertain
 can only compute the probabilities of possible outcomes
Example:
throwing dice ( random experiment)
 outcome of a toss: initial conditions & external forces
 uncertain ?
How to study system?
How to study system?
 Analytic solution
 know how the model will behave iner any circumstances.
 closed form solution
 simple models
 Numerical methods
 More complex system
 example: Runge-Kutta method
Starts with the initial values of the variables, then use the
equations to figure out the changes In these variables over a very brief
time period
 repetition / iteration
 result: long list numbers, NOT equation
 Simulation
 even more complex system
 deals with uncertainty
 ”Calculate when you can, simulate when you can’t!”
Simulation models
 Model of the real system
 Faster, cheaper, or safer to perform
experiments on the model
 Computer simulation may use formulas,,
programming statements, or other means
to express math relationships between
inputs and outputs.
 Dealing with uncertainty  include
uncertain variables  random values from
a distribution.
 Simulation run includes many trials
Advantages of simulation
 Allows the study of complex, real-world systems (which
otherwise cannot be studied)
 Estimates performance of existing system under ‘projected’ /
different operating conditions
 Compares alternative proposed system designs
 Better control over experimental conditions
 Compress time, expand time
 Overall, if done correctly, simulation gives planners unlimited
freedom to try out different ideas for design and improvement
Disadvantages and pitfalls of
simulation
 Failure to produce exact results (only estimates)
 Costs of developing simulation models can be
expensive and time consuming
Simulation methodology
 Estimate probabilities of
future events
 Assign random number
ranges to percentages
(probabilities)
 Obtain random numbers
 Use random numbers to
“simulate events”
Simulation life cycle
Ayani, R., 2003
Building a valid and credible
simulation model
 Picture
verification asks “ Was the model made right? ”
validation asks “ Was the right model made? ”
accreditation asks “ Is the model the right one for the job? ”
Simulation methods – Monte Carlo
It is a method that
methods for solving
various kinds of
computational problems
by using random numbers
Simulation methods – Monte Carlo
“Find the value of ”
 Use “hit and miss” method
 The area of square = (2r)2
 The area of circle = r2

𝑎𝑟𝑒𝑎 𝑜𝑓 𝑠𝑞𝑢𝑎𝑟𝑒
𝑎𝑟𝑒𝑎 𝑜𝑓 𝑐𝑖𝑟𝑐𝑙𝑒
=
4𝑟2
𝑟2 =
4

  = 4 ∗
𝑎𝑟𝑒𝑎 𝑜𝑓 𝑐𝑖𝑟𝑐𝑙𝑒
𝑎𝑟𝑒𝑎 𝑜𝑓 𝑠𝑞𝑢𝑎𝑟𝑒
=
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑑𝑜𝑡𝑠 𝑖𝑛𝑠𝑖𝑑𝑒 𝑐𝑖𝑟𝑐𝑙𝑒
𝑡𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑑𝑜𝑡𝑠
r
Simulation methods – Monte Carlo
“Find the value of ”
 Use “hit and miss” method
 The area of square = (2r)2
 The area of circle = r2

𝑎𝑟𝑒𝑎 𝑜𝑓 𝑠𝑞𝑢𝑎𝑟𝑒
𝑎𝑟𝑒𝑎 𝑜𝑓 𝑐𝑖𝑟𝑐𝑙𝑒
=
4𝑟2
𝑟2 =
4

  = 4 ∗
𝑎𝑟𝑒𝑎 𝑜𝑓 𝑐𝑖𝑟𝑐𝑙𝑒
𝑎𝑟𝑒𝑎 𝑜𝑓 𝑠𝑞𝑢𝑎𝑟𝑒
=
𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑑𝑜𝑡𝑠 𝑖𝑛𝑠𝑖𝑑𝑒 𝑐𝑖𝑟𝑐𝑙𝑒
𝑡𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑑𝑜𝑡𝑠
r
Simulation methods – Monte Carlo
“Birthday problem”
 Out of a group of 100 people, 2 people share a brithday
 Use “hit and miss” method
1. Pick 30 random numbers in the rang [1,365], each number
represent a day in a year
2. Check to see if any of the 30 random numbers are equal
3. Go back to step [1] and repeat 10,000 times
4. Report the fraction of trials that have matching birthdays
Simulation methods – Monte Carlo
“Birthday problem”
 Out of a group of 100 people, 2 people share a brithday
 Use “sampling from distribution” method
1. Suppose we have the cdf of people’s birthday, F(x)
2. People’s birthday is represented as x = [1, 365]
3. Generate a random values, z, from U [0,1]
4. Compute x = F-1(z)
5. Check to see if any of the 30 random numbers are equal
6. Go back to step [3,4] and repeat 10,000 times
7. Report the fraction of trials that have matching birthdays
Many kinds of sampling, e.g.:
• Simple sampling
• Importance sampling
• Stratified sampling
• Non-stratified sampling
• Cluster sampling
• Latin hypercube
Output from Monte Carlo
can form a distribution too !
Simulation methods –
Discrete event Simulation (DES)
 Discrete time systems: system changes with
time, in discrete steps
 Stochastic, dynamic, discrete
 Uncertainty (modelled by probability)
 Example:
 Traffic problem: given locations of cars and
destinations and traffic rules  the expected time for
a specific car to reach its destination?
 In a system with n machines, the system will crash
when fewer than n machines are available  what is
the expected time for the system to crash?
Simulation methods –
Discrete event Simulation (DES)
 Example: Single-server queue
 Estimate expected average delay in queue (line, not service)
 State variables
○ Status of server (idle, busy) – needed to decide what to do with an
arrival
○ Current length of the queue – to know where to store an arrival that
must wait in line
○ Time of arrival of each customer now in queue – needed to compute
time in queue when service starts
 Events
○ Arrival of a new customer
○ Service completion (and departure) of a customer
○ Maybe – end-simulation event (a “fake” event) – whether this is an
event depends on how simulation terminates (a modeling decision)
Status
shown is
after all
changes
have
been
made in
each
case …
Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …
Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …
Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, …
Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …
Final output performance measures:
Average delay in queue = 5.7/6 = 0.95 min./cust.
Time-average number in queue = 9.9/8.6 = 1.15 custs.
Server utilization = 7.7/8.6 = 0.90 (dimensionless)
• Example: Single Stage Process with Two Servers and Queue
1
2
Arrivals
…
d1
d2
s = (s1, s2 , s3) where
0
1
2
3 4 5
(0,0,0)
(0,1,0)
(1,1,0) (1,1,1) (1,1,2)
(1,0,0)
• • •
a
a
a
a a
d1
d2
d2
d2
d2
d1
d1
d1
, ,
State-
transition
network
3
0, if server is idle
1, if server is busy
number in the queue
i
i
s
i
s

 


i = 1, 2
Simulation methods –
Discrete event Simulation (DES)
Simulation methods –
Discrete event Simulation (DES)
 Example: repair problem
n machines are needed to keep an operation.
There are s spare machines.
The machines in operation fail according to some unknown distribution
(e.g. exponential, Poisson, uniform, etc., with a known mean).
When a machine fails it is sent to repair shop and the time to fix is a
random variable that follows a known distribution.
System crashes when fewer than n machines are available
What is the expected time for the system to crash?
Simulation methods –
Discrete event Simulation (DES)
n = number of working machines needed
S = number of spares available
Simulation methods – Continuous
 Continuous time model:
 state variables may change
continuously, e.g. temperature in a class
room, the level of water in a tank
 used extensively in mechanical, chemical,
and electrical engineering
 Example:
 the level of temperature of a liquid
 the level of temperature in a classroom
 the level of water in a tank
 the level of drug concentration in body
Simulation methods – Hybrid
 Hybrid : combined discrete / continuous
model
 Some variables in the system model are
discrete and some continuous
 Example: unloading dock where tankers
queue up to unload their oil through a
pipeline:
 discrete : tanker arrivals
 continuous : flow of oil
Random variables
& Stochastic Process
 Random variables:
 variable whose possible values are numerical
outcomes of a random phenomenon
 Types:
Discrete random var: countable number of outcomes
(dead/alive, dice, etc.)
Continuous random var: infinite continuum of
possible values ( weight, speed, etc.)
 Stochastic process:
 a family of random variables
Probability functions
 A probability function maps the possible
values x against their respective
probabilities of occurrence, p(x)
 p(x)  [0,1]
 The area under a probability function is
always 1
pmf & pdf
Discrete random var: countable
number of outcomes (dead/alive,
dice, etc.)
 pmf : roll of a dice
Continuous random var: infinite
continuum of possible values
(weight, speed, etc.)
 pdf: weight of adult females in
Indonesia
x
p(x)
1/
6
1 4 5 6
2 3
 
x
all
1
P(x)
Pr( ) ( )
X x p x

 
Pr( ) ( )
b
a
a X b p x dx

   
 The probability that a real-valued random variable x with a given
probability distribution f(x) will be found at a value less than or
equal to x
F(x) = P(X < x) =
it gives the are under the pdf from minus infinity to x
F(x) = P(X < x) =
with properties:






x
t
x
-
t
f untuk
)
(
1. 0 < F(x) < 1
2. F(x) is nondecreasing function
3. F(-) = 0
4. F() = 1
Cummulative Distribution Function
(CDF)


x
dt
t
f )
(
x
P(x)
1/
6 1 4 5 6
2 3
1/
3
1/
2
2/
3
5/
6
1.
0
Stochastic process
 The process has a strong element of
random behaviour
 If the time set T is countable  discrete
time process : {Xn, n=0,1,2,…}
 If the time set T is an interval of the real
line  continuous time process: {X(t),
t0}
Types of formulations
 Static formulations
 involves functions with one or
more variables being random
 Dynamic formulations
 involves stochastic process with
independent var t (time) to model
uncertain dynamic systems

More Related Content

Similar to Week08.pdf

Monte Carlo Simulation
Monte Carlo SimulationMonte Carlo Simulation
Monte Carlo SimulationDeepti Singh
 
Introduction to simulation modeling
Introduction to simulation modelingIntroduction to simulation modeling
Introduction to simulation modelingbhupendra kumar
 
Techniques in marketing research
Techniques in marketing researchTechniques in marketing research
Techniques in marketing researchSunny Bose
 
Machine learning (5)
Machine learning (5)Machine learning (5)
Machine learning (5)NYversity
 
Ali Mousavi -- Event modeling
Ali Mousavi -- Event modeling Ali Mousavi -- Event modeling
Ali Mousavi -- Event modeling Anatoly Levenchuk
 
Discrete Event Simulation in Healthcare
Discrete Event Simulation in HealthcareDiscrete Event Simulation in Healthcare
Discrete Event Simulation in HealthcareATALAN
 
Probability distribution Function & Decision Trees in machine learning
Probability distribution Function  & Decision Trees in machine learningProbability distribution Function  & Decision Trees in machine learning
Probability distribution Function & Decision Trees in machine learningSadia Zafar
 
An Introduction to Simulation in the Social Sciences
An Introduction to Simulation in the Social SciencesAn Introduction to Simulation in the Social Sciences
An Introduction to Simulation in the Social Sciencesfsmart01
 
Operational Research
Operational ResearchOperational Research
Operational ResearchRoy Thomas
 
!Business statistics tekst
!Business statistics tekst!Business statistics tekst
!Business statistics tekstKing Nisar
 
Introduction to computing Processing and performance.pdf
Introduction to computing Processing and performance.pdfIntroduction to computing Processing and performance.pdf
Introduction to computing Processing and performance.pdfTulasiramKandula1
 
Monte Carlo Simulations
Monte Carlo SimulationsMonte Carlo Simulations
Monte Carlo Simulationsgfbreaux
 
Dynamics of structures with uncertainties
Dynamics of structures with uncertaintiesDynamics of structures with uncertainties
Dynamics of structures with uncertaintiesUniversity of Glasgow
 
Introduction to Simulation
Introduction to SimulationIntroduction to Simulation
Introduction to Simulationchimco.net
 
Converting Measurement Systems From Attribute
Converting Measurement Systems From AttributeConverting Measurement Systems From Attribute
Converting Measurement Systems From Attributejdavidgreen007
 

Similar to Week08.pdf (20)

Monte Carlo Simulation
Monte Carlo SimulationMonte Carlo Simulation
Monte Carlo Simulation
 
Introduction to simulation modeling
Introduction to simulation modelingIntroduction to simulation modeling
Introduction to simulation modeling
 
Techniques in marketing research
Techniques in marketing researchTechniques in marketing research
Techniques in marketing research
 
Machine learning (5)
Machine learning (5)Machine learning (5)
Machine learning (5)
 
Ali Mousavi -- Event modeling
Ali Mousavi -- Event modeling Ali Mousavi -- Event modeling
Ali Mousavi -- Event modeling
 
Ml ppt at
Ml ppt atMl ppt at
Ml ppt at
 
Mathematical modeling
Mathematical modelingMathematical modeling
Mathematical modeling
 
Discrete Event Simulation in Healthcare
Discrete Event Simulation in HealthcareDiscrete Event Simulation in Healthcare
Discrete Event Simulation in Healthcare
 
Probability distribution Function & Decision Trees in machine learning
Probability distribution Function  & Decision Trees in machine learningProbability distribution Function  & Decision Trees in machine learning
Probability distribution Function & Decision Trees in machine learning
 
An Introduction to Simulation in the Social Sciences
An Introduction to Simulation in the Social SciencesAn Introduction to Simulation in the Social Sciences
An Introduction to Simulation in the Social Sciences
 
Respose surface methods
Respose surface methodsRespose surface methods
Respose surface methods
 
Operational Research
Operational ResearchOperational Research
Operational Research
 
!Business statistics tekst
!Business statistics tekst!Business statistics tekst
!Business statistics tekst
 
Introduction to computing Processing and performance.pdf
Introduction to computing Processing and performance.pdfIntroduction to computing Processing and performance.pdf
Introduction to computing Processing and performance.pdf
 
Monte Carlo Simulations
Monte Carlo SimulationsMonte Carlo Simulations
Monte Carlo Simulations
 
PhysicsSIG2008-01-Seneviratne
PhysicsSIG2008-01-SeneviratnePhysicsSIG2008-01-Seneviratne
PhysicsSIG2008-01-Seneviratne
 
Or ppt,new
Or ppt,newOr ppt,new
Or ppt,new
 
Dynamics of structures with uncertainties
Dynamics of structures with uncertaintiesDynamics of structures with uncertainties
Dynamics of structures with uncertainties
 
Introduction to Simulation
Introduction to SimulationIntroduction to Simulation
Introduction to Simulation
 
Converting Measurement Systems From Attribute
Converting Measurement Systems From AttributeConverting Measurement Systems From Attribute
Converting Measurement Systems From Attribute
 

Recently uploaded

Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionDr.Costas Sachpazis
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .Satyam Kumar
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxPoojaBan
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfAsst.prof M.Gokilavani
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort servicejennyeacort
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxKartikeyaDwivedi3
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVRajaP95
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfme23b1001
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...asadnawaz62
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfAsst.prof M.Gokilavani
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerAnamika Sarkar
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEroselinkalist12
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxwendy cai
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage examplePragyanshuParadkar1
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...srsj9000
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidNikhilNagaraju
 

Recently uploaded (20)

Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective IntroductionSachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
Sachpazis Costas: Geotechnical Engineering: A student's Perspective Introduction
 
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCRCall Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
Call Us -/9953056974- Call Girls In Vikaspuri-/- Delhi NCR
 
Churning of Butter, Factors affecting .
Churning of Butter, Factors affecting  .Churning of Butter, Factors affecting  .
Churning of Butter, Factors affecting .
 
Heart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptxHeart Disease Prediction using machine learning.pptx
Heart Disease Prediction using machine learning.pptx
 
Design and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdfDesign and analysis of solar grass cutter.pdf
Design and analysis of solar grass cutter.pdf
 
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdfCCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
CCS355 Neural Networks & Deep Learning Unit 1 PDF notes with Question bank .pdf
 
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort serviceGurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
Gurgaon ✡️9711147426✨Call In girls Gurgaon Sector 51 escort service
 
Concrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptxConcrete Mix Design - IS 10262-2019 - .pptx
Concrete Mix Design - IS 10262-2019 - .pptx
 
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IVHARMONY IN THE NATURE AND EXISTENCE - Unit-IV
HARMONY IN THE NATURE AND EXISTENCE - Unit-IV
 
Electronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdfElectronically Controlled suspensions system .pdf
Electronically Controlled suspensions system .pdf
 
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Serviceyoung call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
young call girls in Rajiv Chowk🔝 9953056974 🔝 Delhi escort Service
 
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
🔝9953056974🔝!!-YOUNG call girls in Rajendra Nagar Escort rvice Shot 2000 nigh...
 
complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...complete construction, environmental and economics information of biomass com...
complete construction, environmental and economics information of biomass com...
 
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdfCCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
CCS355 Neural Network & Deep Learning Unit II Notes with Question bank .pdf
 
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube ExchangerStudy on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
Study on Air-Water & Water-Water Heat Exchange in a Finned Tube Exchanger
 
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETEINFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
INFLUENCE OF NANOSILICA ON THE PROPERTIES OF CONCRETE
 
What are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptxWhat are the advantages and disadvantages of membrane structures.pptx
What are the advantages and disadvantages of membrane structures.pptx
 
DATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage exampleDATA ANALYTICS PPT definition usage example
DATA ANALYTICS PPT definition usage example
 
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
Gfe Mayur Vihar Call Girls Service WhatsApp -> 9999965857 Available 24x7 ^ De...
 
main PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfidmain PPT.pptx of girls hostel security using rfid
main PPT.pptx of girls hostel security using rfid
 

Week08.pdf

  • 1. Static - Dynamic Anna Maria Sri Asih Department of Mechanical & Industrial Engineering Gadjah Mada University
  • 2. Introduction  Deterministic models:  expressed in terms of differential equations  can exactly predict the development of a system based on initial and boundary conditions  Stochastic models  use random variables  outcomes are uncertain  can only compute the probabilities of possible outcomes Example: throwing dice ( random experiment)  outcome of a toss: initial conditions & external forces  uncertain ?
  • 3. How to study system?
  • 4. How to study system?  Analytic solution  know how the model will behave iner any circumstances.  closed form solution  simple models  Numerical methods  More complex system  example: Runge-Kutta method Starts with the initial values of the variables, then use the equations to figure out the changes In these variables over a very brief time period  repetition / iteration  result: long list numbers, NOT equation  Simulation  even more complex system  deals with uncertainty  ”Calculate when you can, simulate when you can’t!”
  • 5. Simulation models  Model of the real system  Faster, cheaper, or safer to perform experiments on the model  Computer simulation may use formulas,, programming statements, or other means to express math relationships between inputs and outputs.  Dealing with uncertainty  include uncertain variables  random values from a distribution.  Simulation run includes many trials
  • 6. Advantages of simulation  Allows the study of complex, real-world systems (which otherwise cannot be studied)  Estimates performance of existing system under ‘projected’ / different operating conditions  Compares alternative proposed system designs  Better control over experimental conditions  Compress time, expand time  Overall, if done correctly, simulation gives planners unlimited freedom to try out different ideas for design and improvement Disadvantages and pitfalls of simulation  Failure to produce exact results (only estimates)  Costs of developing simulation models can be expensive and time consuming
  • 7. Simulation methodology  Estimate probabilities of future events  Assign random number ranges to percentages (probabilities)  Obtain random numbers  Use random numbers to “simulate events”
  • 9. Building a valid and credible simulation model  Picture verification asks “ Was the model made right? ” validation asks “ Was the right model made? ” accreditation asks “ Is the model the right one for the job? ”
  • 10. Simulation methods – Monte Carlo It is a method that methods for solving various kinds of computational problems by using random numbers
  • 11. Simulation methods – Monte Carlo “Find the value of ”  Use “hit and miss” method  The area of square = (2r)2  The area of circle = r2  𝑎𝑟𝑒𝑎 𝑜𝑓 𝑠𝑞𝑢𝑎𝑟𝑒 𝑎𝑟𝑒𝑎 𝑜𝑓 𝑐𝑖𝑟𝑐𝑙𝑒 = 4𝑟2 𝑟2 = 4    = 4 ∗ 𝑎𝑟𝑒𝑎 𝑜𝑓 𝑐𝑖𝑟𝑐𝑙𝑒 𝑎𝑟𝑒𝑎 𝑜𝑓 𝑠𝑞𝑢𝑎𝑟𝑒 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑑𝑜𝑡𝑠 𝑖𝑛𝑠𝑖𝑑𝑒 𝑐𝑖𝑟𝑐𝑙𝑒 𝑡𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑑𝑜𝑡𝑠 r
  • 12. Simulation methods – Monte Carlo “Find the value of ”  Use “hit and miss” method  The area of square = (2r)2  The area of circle = r2  𝑎𝑟𝑒𝑎 𝑜𝑓 𝑠𝑞𝑢𝑎𝑟𝑒 𝑎𝑟𝑒𝑎 𝑜𝑓 𝑐𝑖𝑟𝑐𝑙𝑒 = 4𝑟2 𝑟2 = 4    = 4 ∗ 𝑎𝑟𝑒𝑎 𝑜𝑓 𝑐𝑖𝑟𝑐𝑙𝑒 𝑎𝑟𝑒𝑎 𝑜𝑓 𝑠𝑞𝑢𝑎𝑟𝑒 = 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑑𝑜𝑡𝑠 𝑖𝑛𝑠𝑖𝑑𝑒 𝑐𝑖𝑟𝑐𝑙𝑒 𝑡𝑜𝑡𝑎𝑙 𝑛𝑢𝑚𝑏𝑒𝑟 𝑜𝑓 𝑑𝑜𝑡𝑠 r
  • 13. Simulation methods – Monte Carlo “Birthday problem”  Out of a group of 100 people, 2 people share a brithday  Use “hit and miss” method 1. Pick 30 random numbers in the rang [1,365], each number represent a day in a year 2. Check to see if any of the 30 random numbers are equal 3. Go back to step [1] and repeat 10,000 times 4. Report the fraction of trials that have matching birthdays
  • 14. Simulation methods – Monte Carlo “Birthday problem”  Out of a group of 100 people, 2 people share a brithday  Use “sampling from distribution” method 1. Suppose we have the cdf of people’s birthday, F(x) 2. People’s birthday is represented as x = [1, 365] 3. Generate a random values, z, from U [0,1] 4. Compute x = F-1(z) 5. Check to see if any of the 30 random numbers are equal 6. Go back to step [3,4] and repeat 10,000 times 7. Report the fraction of trials that have matching birthdays Many kinds of sampling, e.g.: • Simple sampling • Importance sampling • Stratified sampling • Non-stratified sampling • Cluster sampling • Latin hypercube Output from Monte Carlo can form a distribution too !
  • 15. Simulation methods – Discrete event Simulation (DES)  Discrete time systems: system changes with time, in discrete steps  Stochastic, dynamic, discrete  Uncertainty (modelled by probability)  Example:  Traffic problem: given locations of cars and destinations and traffic rules  the expected time for a specific car to reach its destination?  In a system with n machines, the system will crash when fewer than n machines are available  what is the expected time for the system to crash?
  • 16. Simulation methods – Discrete event Simulation (DES)  Example: Single-server queue  Estimate expected average delay in queue (line, not service)  State variables ○ Status of server (idle, busy) – needed to decide what to do with an arrival ○ Current length of the queue – to know where to store an arrival that must wait in line ○ Time of arrival of each customer now in queue – needed to compute time in queue when service starts  Events ○ Arrival of a new customer ○ Service completion (and departure) of a customer ○ Maybe – end-simulation event (a “fake” event) – whether this is an event depends on how simulation terminates (a modeling decision)
  • 17. Status shown is after all changes have been made in each case … Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, … Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, …
  • 18. Interarrival times: 0.4, 1.2, 0.5, 1.7, 0.2, 1.6, 0.2, 1.4, 1.9, … Service times: 2.0, 0.7, 0.2, 1.1, 3.7, 0.6, … Final output performance measures: Average delay in queue = 5.7/6 = 0.95 min./cust. Time-average number in queue = 9.9/8.6 = 1.15 custs. Server utilization = 7.7/8.6 = 0.90 (dimensionless)
  • 19. • Example: Single Stage Process with Two Servers and Queue 1 2 Arrivals … d1 d2 s = (s1, s2 , s3) where 0 1 2 3 4 5 (0,0,0) (0,1,0) (1,1,0) (1,1,1) (1,1,2) (1,0,0) • • • a a a a a d1 d2 d2 d2 d2 d1 d1 d1 , , State- transition network 3 0, if server is idle 1, if server is busy number in the queue i i s i s      i = 1, 2 Simulation methods – Discrete event Simulation (DES)
  • 20. Simulation methods – Discrete event Simulation (DES)  Example: repair problem n machines are needed to keep an operation. There are s spare machines. The machines in operation fail according to some unknown distribution (e.g. exponential, Poisson, uniform, etc., with a known mean). When a machine fails it is sent to repair shop and the time to fix is a random variable that follows a known distribution. System crashes when fewer than n machines are available What is the expected time for the system to crash?
  • 21. Simulation methods – Discrete event Simulation (DES) n = number of working machines needed S = number of spares available
  • 22. Simulation methods – Continuous  Continuous time model:  state variables may change continuously, e.g. temperature in a class room, the level of water in a tank  used extensively in mechanical, chemical, and electrical engineering  Example:  the level of temperature of a liquid  the level of temperature in a classroom  the level of water in a tank  the level of drug concentration in body
  • 23. Simulation methods – Hybrid  Hybrid : combined discrete / continuous model  Some variables in the system model are discrete and some continuous  Example: unloading dock where tankers queue up to unload their oil through a pipeline:  discrete : tanker arrivals  continuous : flow of oil
  • 24. Random variables & Stochastic Process  Random variables:  variable whose possible values are numerical outcomes of a random phenomenon  Types: Discrete random var: countable number of outcomes (dead/alive, dice, etc.) Continuous random var: infinite continuum of possible values ( weight, speed, etc.)  Stochastic process:  a family of random variables
  • 25. Probability functions  A probability function maps the possible values x against their respective probabilities of occurrence, p(x)  p(x)  [0,1]  The area under a probability function is always 1
  • 26. pmf & pdf Discrete random var: countable number of outcomes (dead/alive, dice, etc.)  pmf : roll of a dice Continuous random var: infinite continuum of possible values (weight, speed, etc.)  pdf: weight of adult females in Indonesia x p(x) 1/ 6 1 4 5 6 2 3   x all 1 P(x) Pr( ) ( ) X x p x    Pr( ) ( ) b a a X b p x dx     
  • 27.  The probability that a real-valued random variable x with a given probability distribution f(x) will be found at a value less than or equal to x F(x) = P(X < x) = it gives the are under the pdf from minus infinity to x F(x) = P(X < x) = with properties:       x t x - t f untuk ) ( 1. 0 < F(x) < 1 2. F(x) is nondecreasing function 3. F(-) = 0 4. F() = 1 Cummulative Distribution Function (CDF)   x dt t f ) ( x P(x) 1/ 6 1 4 5 6 2 3 1/ 3 1/ 2 2/ 3 5/ 6 1. 0
  • 28. Stochastic process  The process has a strong element of random behaviour  If the time set T is countable  discrete time process : {Xn, n=0,1,2,…}  If the time set T is an interval of the real line  continuous time process: {X(t), t0}
  • 29. Types of formulations  Static formulations  involves functions with one or more variables being random  Dynamic formulations  involves stochastic process with independent var t (time) to model uncertain dynamic systems