1 / 40

Modelling elements and methods

Modelling elements and methods. Building a simulation model. Step 1 ) Get acquinted with the system Step 2 ) Define the dynamic problem Step 3) Construct a conceptual modell Step 4 ) Define the causal loops or casual relationships

howell
Download Presentation

Modelling elements and methods

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Modelling elements and methods

  2. Building a simulation model Step 1) Get acquinted with the system Step 2) Define the dynamic problem Step 3) Construct a conceptual modell Step 4) Define the causal loops or casual relationships Step 5) Express the relationships mathematically in equations Step 6) Get values of parameters Step 7) Implement the mathematical relationships in a computer program Step 8) Run the model Step 9) Judge if the results are reasonable by comparing to callibration data or ”common sence” Step 10) Sensitivity analysis Step 11) Repeat 3-10 to improve the model and parameter estimates Step 12) Validate the model by independent data Step 13) Apply the model

  3. Step 1) Get acquinted with the system Step 2) Define the dynamic problem Fundamental dynamic patterns

  4. Exponential growth Po = 5 r = 0.1

  5. Exponential decay Po = 100 r = -0.1

  6. S-shaped growth Overshot

  7. Oscillation Disturbance Equilibrium

  8. Equilibrium ?

  9. Chaos Chaos theory describes complex motion and the dynamics of sensitive systems. Chaotic systems are mathematically deterministic but nearly impossible to predict: Unpredicted courses of events Discovered by Edward Lorenz in 1961 (Butterfly Effect):Weather forecast based on previous calculations and giving not equal precision data. Chaos theory http://www.mathjmendl.org/chaos/

  10. Step 3) Construct a conceptual modell -stock and flow diagram • Identify stocks and flows • Connect the stocks by flow • Identify other elements (variables, parameters or constants) that affect the flows • Connect all elements with arrows for the direction of dependency • For each element that has incoming arrows there has to be an equation • Units for stocks and flows have to be consistent, eg indivuals – individuals per year or g m-2 – g m-2 s-1 Stock Other elements Flow Connector for direction of dependency

  11. Step 3) Construct a conceptual modell Example bird population Potential birth rate Births Birth rate Carrying capacity Bird population Death rate Deaths

  12. Step 4) Define the causal loops or casual relationships • Causal Loop Diagram (CLD): • A simplified conseptual model where all elements of the model are connected with arrows for dependency • A simplified understanding of a complex problem • A common language to convey the understanding • A way of explaining cause and effect relationships • Explanation of underlying feedback systems • A help for understanding the overall system behaviour

  13. Conceptual modelling: causal loops diagrams (CLD) Negative feedback: - + x y or x y + - The higher value of x – the higher value of y The higher value of y – the lower value of x The higher value of x – the lower value of y The higher value of y – the higher value of x Positive feedback: + - x y x y + - The higher value of x – the higher value of y The higher value of y – the higher value of x The lower value of x – the lower value of y The lower value of y – the lower value of x An odd number if negative dependcies in a loop means negative feedback

  14. Example bird population Potential birth rate + Births + Birth rate + (+) + (-) - + Carrying capacity Bird population (-) + - Death rate + Deaths

  15. Some problems in the conceptual modelling phase: • What is relevant for the model? Sort out essentials • At what level do we simulate: micro or macro level • Static and dynamic factors ? • What are the boundaries of the system? • Time horizon ?

  16. Step 5) Express the relationships mathematically in equations Determine what type of model you will make - functional or mechanistic Use ”standard” equations if possible Analyse relationships with a curve fitting tool

  17. Dynamic models: many functions are differential equations Biological systems: most of the differential equations can not be solved to analytical functions Thanks to computers: numerical approximations But: Numerical method is an approximation to the true solution

  18. Dynamic models change of state variables with time Xt : status of X at time t X/ t : rate of change Xt+1=Xt + X Continuous model in time: dt is infinitive small Discrete model: t is a period of time

  19. Numeric and analytical solutions Nt+1= Nt+ N N = r Nt r is the net growth rate

  20. Example bird population – numerical solution Potential birth rate (rpot) Births (B) Birth rate (rb) Carrying capacity (CC) Bird population (P) Death rate (rd) Deaths (D) For each element that has incoming arrows there has to be an equation

  21. Step 6) Get values of parameters Parameter estimation from Physical laws Physical based experiments/observations General description of ecological processes Best guess of an expert Your own intuition From literature Level of trust

  22. Step 7) Implement the mathematical relationships in a computer program Now we have a solution on paper: Next step is writing the model to a computer program Computer modelling – programming ’Telling’ a computer what to do Compiling = ’translating’ Debugging = finding/correcting errors in the code What you need: Discipline and attention to detail Good memory Abstract thinking With a good conceptual model and some general structure it is rather ”easy”

  23. Programming and computer implementation Computer ’languages’ : ’telling a computer what to do’: Basic Fortran (1950), Fortran IV (1966), Fortran77, Fortran90, Visual Fortran (Formula translation) Pascal, Delphi C, C++ Java, J, J++ Phyton Matlab Stella Simulink SIMILE Excel SQL

  24. Computer implementation • = all steps neccessary to translate a mathematical description of a model into a computer program and should work in a useful way • is rather time consuming and thus ’expensive’ • should produce a flexible program: easy to adapt • should produce a ’user-friendly’ program: both for user of the model as user of the source code

  25. General structure for a dynamical model • Get input parameter values • Get start values of stocks and other state variables • Loop in which the timestep is increased by one for each cycle • Read driving variables and apply the equation of the processes to get the flows of the model • Update the stocks for time+1 • End of loop

  26. Step 8) Run the model

  27. Step 9) Judge if the results are reasonable by comparing to callibration data or ”common sence” Reasons for ”poor” results Bugs in the computer implementation Wrong understanding of the dynamical problem Using an application outside the model´s development conditions Normal need for parameter callibration

  28. Step 10)Sensitivity analysis Varying parameters and/or variables independently This may highlight the weakness in the model and indicate which parameters or variables need much attention and high accuracy • A well known technique: Monte Carlo simulations • A random value is selected for each of the tasks/parameters, • based on a range (pseudo random) • - The model is applied repeately, each time with another random value • - A typical Monte Carlo simulation calculates the model hundreds or • thousands of times. Book: 3.4.2 – 3.5.3

  29. If needed go back to improve the model Step 1) Get acquinted with the system Step 2) Define the dynamic problem Step 3) Construct a conceptual modell Step 4) Define the causal loops or casual relationships Step 5) Express the relationships mathematically in equations Step 6) Get values of parameters Step 7) Implement the mathematical relationships in a computer program Step 8) Run the model Step 9) Judge if the results are reasonable by comparing to callibration data or ”common sence” Step 10) Sensitivity analysis Step 11) Repeat 3-10 to improve the model and parameter estimates Step 12) Validate the model by independent data Step 13) Apply the model to new situations

  30. Step 12) Validate the model by independent data - to assure that the model is correct Simulation models are simplifications of the real world. If you leave out (unimportant) factors and only describe the system by capturing the important factors, you have to prove that the model is still usefull Verification: concerned with building the model right Validation: concerned with building the right model. ’Validation is the determination as to whether model behavior departs from real system behavior sufficiently farto jeopardize model objectives’

  31. Validation: Compare modelled and measured values by ’goodness-of-fit’ • Try to use standard statistical tests ! • Comparing qualitive similarity is often used, but be careful!

  32. Accuracy of measurements Coincidence: Difference between validation and model data Associotion: Similarity in trends between validation and model data High coincidence and association Low coincidence high association High coincidence low association

  33. Measures of coincidence Student’s t test Observations (O), Modelled value (P) Book section 3.3.1

  34. Measures of association Regression analysis Correlation coefficient, r F-statistics Plotting of residuals Book section 3.3.1

  35. Accuracy is often used as the complement of error: 95% accuracy implies 5% error But accuracy refers also often to the fidelity (= trohet) with which the model represents the processes and relationsships

  36. Sometimes it is not possible to validate a model • Then there are other options: • perform a sensitivity analysis • compare with other validated models or compartment of other models

  37. Step 13) Apply the model to new situations Interpolation and extrapolation in time and space Test of new policies, methods etc Pack the model in a way that is suitable for the end user -Who is the end user -What will the model do? -How can the application guard against input error -How can the application guard agains misinterpretation of the results -What documentation is needed

  38. Steps in modelling Book: chapter 2 • Problem formulation • Conceptual model construction • System boundaries • CLD • Variables, parameters and settings • Reference behavior • Model construction • From conceptional model to quantitative model • Parameterization/Verification • Sensitivity and robustness testing • Model validation • Model use • Scenario analysis • Backcasting and forecasting • Application/Use..

  39. Exercise in conceptual model/causual loop construction from 2011’s exam Think about a house and its heating system. Assume a simple dynamical model that consists of these variables:         - Temperature inside the house         - Outdoor temperature         - Target temperature set at the thermostats of the radiators         - Energy content of the house         - Heat production from the radiators         - Heat loss to the surrounding Put these variables together in a conceptual model diagram and a causal loop diagram and explain what the diagrams tell you.

More Related