Stochastic Simulation The modelling process Bo Friis Nielsen - - PowerPoint PPT Presentation

stochastic simulation the modelling process
SMART_READER_LITE
LIVE PREVIEW

Stochastic Simulation The modelling process Bo Friis Nielsen - - PowerPoint PPT Presentation

Stochastic Simulation The modelling process Bo Friis Nielsen Institute of Mathematical Modelling Technical University of Denmark 2800 Kgs. Lyngby Denmark Email: bfni@dtu.dk Explanation: What is the problem with the Explanation: What is


slide-1
SLIDE 1

Stochastic Simulation The modelling process

Bo Friis Nielsen

Institute of Mathematical Modelling Technical University of Denmark 2800 Kgs. Lyngby – Denmark Email: bfni@dtu.dk

slide-2
SLIDE 2

02443 – lecture 11 2

DTU

Explanation: What is the problem with the Pareto distribution Explanation: What is the problem with the Pareto distribution

  • Moment distributions
  • For nonnegative valued random variables

Gj(x) = x

0 tjf(t)dt

0 tjf(t)dt =

x

0 tjf(t)dt

E (Xj) The contribution to the j’th moment from values ≤ x. x t1f(t)dt = x

β

tk β t β −k−1 dt = x

β

k t β −k dt = β k k − 1 x

β

k − 1 β t β −k dt = βk k − 1

  • 1 −

x β −k+1

slide-3
SLIDE 3

02443 – lecture 11 3

DTU

Explanation: What is the problem with the Pareto distribution Explanation: What is the problem with the Pareto distribution

0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 5 10 15 20 25 30 Pareto distribution 1 - exp(-k*log(t)) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 5 10 15 20 25 30 Pareto distribution 1 - exp(-k*log(t)) 1 - exp(-(k-1)*log(t)) 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1 5 10 15 20 25 30 Pareto distribution 1 - exp(-k*log(t)) 1 - exp(-(k-1)*log(t)) 1 - exp(-(k-2)*log(t))

  • The first moment distribution for the Pareto distribution (green)
  • The second moment distribution for the Pareto distribution

(blue)

slide-4
SLIDE 4

02443 – lecture 11 4

DTU

Some numbers β = 1 Some numbers β = 1

F(t) = 1 − t−k f(t) = kt−k−1 G1(t) = 1 − t−k+1 G2(t) = 1 − t−k+2 For k = 2.05 t F(t) G1(t) G2(t) 2 0.7585 0.5170 0.0341 10 0.9911 0.9109 0.1190 100 0.9999 0.9921 0.2057 844.5 1 − 10−6 0.9992 0.2860

  • Even when if we simulate 106 values we can not expect to get a

decent estimate of the variance!

slide-5
SLIDE 5

02443 – lecture 11 5

DTU

What to learn: What to learn:

  • Care is needed when using simulation
  • Especially if one wants to study strange or rare phenomena.
  • Always use your practical, theoretical and intuitive understanding
  • f the system to support the analysis by simulation.
slide-6
SLIDE 6

02443 – lecture 11 6

DTU

The modelling process The modelling process

  • Problem identification
  • Goal/purpose
  • System analysis and data gathering
  • System syntesis - model formulation
  • Estimation of model parameters
  • Preliminary model validation
  • Program development
  • Final validation
  • Experimental design
  • Statistical analysis
slide-7
SLIDE 7

02443 – lecture 11 7

DTU

Goal/purpose Goal/purpose

  • Describe the objective of the problem
  • e.g. to design an inventory control system with stable production
slide-8
SLIDE 8

02443 – lecture 11 8

DTU

Problem identification Problem identification

  • Define which part of reality which is to be modelled
  • A company producing one product with an ingoing and outgoing

inventory wants an adequate inventory control system

slide-9
SLIDE 9

02443 – lecture 11 9

DTU

System analysis and data gathering System analysis and data gathering

  • Investigate the system identifying parts with direct impact on

the goal. Provide data on these parts.

  • Demand, relations between order, production and inventory.

Insignificant: unemployment, weather.

slide-10
SLIDE 10

02443 – lecture 11 10

DTU

System syntesis System syntesis

  • Define state variables. Describe dynamics and relations,

determine distributions.

  • Example: Inventory at time t, determine the type and form of

the demand function.

slide-11
SLIDE 11

02443 – lecture 11 11

DTU

Estimation of model parameters Estimation of model parameters

  • Determine parameter values, values for model

constants/parameters.

  • Example: Estimate mean and variance of the demand function.
slide-12
SLIDE 12

02443 – lecture 11 12

DTU

Preliminary model evaluation Preliminary model evaluation

  • Control of fundamental logical structures. Common sense

control of parameters

  • Does the model imply inventory sizes exceeding system capacity
slide-13
SLIDE 13

02443 – lecture 11 13

DTU

Program development Program development

  • Translate state definitions into data structures. Formalise logical

and physical relations. Prepare the program for debugging. Make a modular program which is easy to extend.

  • Example: Inventory size is defined as an integer variable. Time is

define integer or continuous depending on the context.

slide-14
SLIDE 14

02443 – lecture 11 14

DTU

Final validation Final validation

  • Run the program for input combination with known analytical
  • solution. Run the program with extreme values of the
  • parameters. Common sense control of output. Study animations.

Compare with real world data if possible (existing system).

  • Example: Choose exponential distribution. Reduce/simplify

relations.

slide-15
SLIDE 15

02443 – lecture 11 15

DTU

Experimental design Experimental design

  • Planning of sensitivity analyses.
  • Realistic/interesting combinations of parameter values.
  • Example: Periods of constant demand. Periods with highly

varying demand.

slide-16
SLIDE 16

02443 – lecture 11 16

DTU

Statistical analysis Statistical analysis

  • Estimation of systemparameters. Confidence intervals. Variance

reduction techniques. Time series analysis.

  • Example: Variance of number of orders.
slide-17
SLIDE 17

02443 – lecture 11 17

DTU

Verification and validation of simulation models

  • L&K chapter 5

Verification and validation of simulation models

  • L&K chapter 5
  • Validation is the process of determining whether a simulation

model (as opposed to the computer program) is an accurate representation for the particular objectives in study.

  • Verification is concerned with determining whether the

conceptual simulation model (model assumptions) has been correctly translated into a computer “program”.

  • A simulation model and its results have Credibility if the

manager and other key project personnel accept them as “correct”.

slide-18
SLIDE 18

02443 – lecture 11 18

DTU

Validiation Validiation

  • Conceptually, if a simulation model is “valid” then it can be

used to make decisions about the system similar to those that would be made if it were feasible and cost-effective to experiment with the system itself.

slide-19
SLIDE 19

02443 – lecture 11 19

DTU

Credibility Credibility

  • The managers understanding and agreement with the models

assumptions.

  • Demonstration that the model has been validated and verified.
  • The managers ownership of and involvement with the project
  • Reputation of the model developers
slide-20
SLIDE 20

02443 – lecture 11 20

DTU

What is simulation? What is simulation?

  • Computer experiments with mathematical model
  • General engineering technique
  • Analytical/numerical solutions
slide-21
SLIDE 21

02443 – lecture 11 21

DTU

Course goal Course goal

  • Topics related to scientific computer experimentation
  • Specialised techniques

⋄ Variance reduction methods ⋄ Random number generation ⋄ Random variable generation ⋄ The event-by-event principle

  • Simulation based statistical techniques

⋄ Markov chain Monte Carlo simulated annealing ⋄ Bootstrap

  • Validition and verification of models
  • Model building
slide-22
SLIDE 22

02443 – lecture 11 22

DTU

Project types Project types

  • Model a system (e.g., like the ferry example) in order to assess

performance, under varying designs.

  • Study a mathematical model, that is impossible or hard to

analyze

  • Study any one of the techniques we have been through, more
  • closely. For example, generating random numbers with the

Mersenne Twister.

  • Come up with your own project type.
slide-23
SLIDE 23

Simulation projects Simulation projects

  • Post office (discrete event)
  • Simulation and estimation in a Markov model of breast cancer

(discrete event)

  • Simulation of queueing system with input generated by

interrupted Poisson processes (discrete event)

  • Simulation of Levy processes (discrete event)
  • Simulation of queues with Brownian motion input (discrete

event, can be developed to something more advanced)

  • Microemulsions (MCMC)
  • Your own suggestion to discuss
slide-24
SLIDE 24

02443 – lecture 11 24

DTU

General guidelines General guidelines

  • Do not make model too complicated
  • Clear objective
  • Time to experiment with model
  • Apply variance reduction techniques if possible
slide-25
SLIDE 25

02443 – lecture 11 25

DTU

Deliverable 2: Project report Deliverable 2: Project report

  • Precision of objective
  • Model validation
  • Program verification
  • Experimental design Standard report, the important issue

though is to have some time to experiment with your model.

  • Deadline Thursday June 27th (Monday June 30th if you like)
slide-26
SLIDE 26

02443 – lecture 11 26

DTU

Registering Registering

  • Register online. I have created an exercise for group hand in on

Campusnet.

  • Register with a group name. Use the title/content of your

project as (part of) the group name

slide-27
SLIDE 27

02443 – lecture 11 27

DTU

Plan for the next two weeks Plan for the next two weeks

  • Nicolai, Jakob and I will be available on a consultancy basis. The

availability will be communicated through Campusnet and/or the web page.

  • I will be unavailable from noon monday (today) until noon

tuesday (tomorrow)

slide-28
SLIDE 28

02443 – lecture 11 28

DTU

And remember And remember

  • Course evaluation (Campus net)
  • Comments and suggestions, at any level of detail