24
Stochastic Simulation The modelling process Bo Friis Nielsen Institute of Mathematical Modelling Technical University of Denmark 2800 Kgs. Lyngby – Denmark Email: [email protected]

Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

  • Upload
    voliem

  • View
    218

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

Stochastic SimulationThe modelling processBo Friis Nielsen

Institute of Mathematical Modelling

Technical University of Denmark

2800 Kgs. Lyngby – Denmark

Email: [email protected]

Page 2: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 2DTU

The modelling processThe 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

Page 3: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 3DTU

Goal/purposeGoal/purpose

• Describe the objective of the problem

• e.g. to design an inventory control system with stable production

Page 4: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 4DTU

Problem identificationProblem 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

Page 5: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 5DTU

System analysis and data gatheringSystem 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.

Page 6: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 6DTU

System syntesisSystem syntesis

• Define state variables. Describe dynamics and relations,

determine distributions.

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

the demand function.

Page 7: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 7DTU

Estimation of model parametersEstimation of model parameters

• Determine parameter values, values for model

constants/parameters.

• Example: Estimate mean and variance of the demand function.

Page 8: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 8DTU

Preliminary model evaluationPreliminary model evaluation

• Control of fundamental logical structures. Common sense

control of parameters

• Does the model imply inventory sizes exceeding system capacity

Page 9: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 9DTU

Program developmentProgram 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.

Page 10: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 10DTU

Final validationFinal 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.

Page 11: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 11DTU

Experimental designExperimental design

• Planning of sensitivity analyses.

• Realistic/interesting combinations of parameter values.

• Example: Periods of constant demand. Periods with highly

varying demand.

Page 12: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 12DTU

Statistical analysisStatistical analysis

• Estimation of systemparameters. Confidence intervals. Variance

reduction techniques. Time series analysis.

• Example: Variance of number of orders.

Page 13: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 13DTU

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”.

Page 14: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 14DTU

ValidiationValidiation

• 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.

Page 15: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 15DTU

CredibilityCredibility

• 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

Page 16: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 16DTU

What is simulation?What is simulation?

• Computer experiments with mathematical model

• General engineering technique

• Analytical/numerical solutions

Page 17: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 17DTU

Course goalCourse 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

Page 18: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 18DTU

Project typesProject 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.

Page 19: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

Simulation projectsSimulation 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)

• Secretary (Suitors) problem

• Simulation of queues with Brownian motion input (discrete

event, can be developed to something more advanced)

• How zeros affect chemical concentration data (general

simulation exercise)

• Your own suggestion to discuss

Page 20: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 20DTU

General guidelinesGeneral guidelines

• Do not make model too complicated

• Clear objective

• Time to experiment with model

• Apply variance reduction techniques if possible

Page 21: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 21DTU

Deliverable 2: Project reportDeliverable 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 21st (Monday June 25th if you like)

Page 22: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 22DTU

RegisteringRegistering

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

Campusnet.

Page 23: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 23DTU

Plan for the next two weeksPlan for the next two weeks

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

availability will be communicated through the web page. Some

exercises have external teachers. You might be able to get a

little more help here.

Page 24: Stochastic Simulation The modelling process€¢ Analytical/numerical solutions. ... (discrete event) • Simulation of queueing system with input generated by ... (discrete event

02443 – lecture 11 24DTU

And rememberAnd remember

• Course evaluation (Campus net)

• Comments and suggestions, at any level of detail