2010-03-08 851-0585-04L – Modelling and Simulating Social Systems with MATLAB © ETH Zürich | Lesson 3 – Dynamical Systems Anders Johansson and Wenjian.

Slides:



Advertisements
Similar presentations
Chapter 6 Differential Equations
Advertisements

Modeling of Complex Social Systems MATH 800 Fall 2011.
Epidemics Modeling them with math. History of epidemics Plague in 1300’s killed in excess of 25 million people Plague in London in 1665 killed 75,000.
A Modified Discrete SIR Model Jennifer Switkes. Epidemiology  Epidemiology studies the causes, distribution, and control of disease in populations.
DIFFERENTIAL EQUATIONS 9. We have looked at a variety of models for the growth of a single species that lives alone in an environment.
Åbo Akademi University & TUCS, Turku, Finland Ion PETRE Andrzej MIZERA COPASI Complex Pathway Simulator.
ODE jiangyushan. Pendulum As a example of a system that is nonlinear, consider the swinging pendulum shown above. When the mass of the pendulum is small.
بسم الله الرحمن الرحيم وقل ربِ زدني علماً صدق الله العظيم.
In biology – Dynamics of Malaria Spread Background –Malaria is a tropical infections disease which menaces more people in the world than any other disease.
Paula Gonzalez 1, Leticia Velazquez 1,2, Miguel Argaez 1,2, Carlos Castillo-Chávez 3, Eli Fenichel 4 1 Computational Science Program, University of Texas.
MAT 594CM S10Fundamentals of Spatial ComputingAngus Forbes Week 2 : Dynamics & Numerical Methods Goal : To write a simple physics simulation Topics: Intro.
Ordinary Differential Equations (ODEs)
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Explicit ODE Solvers Daniel Baur ETH Zurich, Institut.
Numerical Solutions to ODEs Nancy Griffeth January 14, 2014 Funding for this workshop was provided by the program “Computational Modeling and Analysis.
Developing Simulations and Demonstrations Using Microsoft Visual C++ Mike O’Leary Shiva Azadegan Towson University Supported by the National Science Foundation.
Emerging Infectious Disease: A Computational Multi-agent Model.
Engineering Computation and Simulation Conor Brennan Dublin City University EE317.
Today we will create our own math model 1.Flagellar length control in Chlamydomonus 2.Lotka-Volterra Model.
Exercises: C = 0 on the whole boundary no flux at all boundaries In these cases, make surface color plots of the concentration in the cell at different.
National Computational Science Leadership Program (NCSLP) 1 Explorations in Computational Science: Hands-on Computational Modeling using STELLA Presenter:
MA Dynamical Systems MODELING CHANGE. Introduction to Dynamical Systems.
MA Dynamical Systems MODELING CHANGE. Modeling Change: Dynamical Systems A dynamical system is a changing system. Definition Dynamic: marked by.
NW Computational Intelligence Laboratory Implementing DHP in Software: Taking Control of the Pole-Cart System Lars Holmstrom.
SIR Epidemic Models CS 390/590 Fall 2009
An Introduction to Programming and Algorithms. Course Objectives A basic understanding of engineering problem solving process. A basic understanding of.
V5 Epidemics on networks
MA Dynamical Systems MODELING CHANGE. Modeling Change: Dynamical Systems ‘Powerful paradigm’ future value = present value + change equivalently:
CODE RED WORM PROPAGATION MODELING AND ANALYSIS Cliff Changchun Zou, Weibo Gong, Don Towsley.
Math 3120 Differential Equations with Boundary Value Problems
L – Modelling and Simulating Social Systems with MATLAB Lesson 2 – Statistics and plotting Anders Johansson and Wenjian Yu © ETH.
Chiara Mocenni List of projects.
Biological Attack Model (BAM) Formal Progress Report April 5, 2007 Sponsor: Dr. Yifan Liu Team Members: Richard Bornhorst Robert Grillo Deepak Janardhanan.
A Course in Scientific Simulation Mike O’Leary Shiva Azadegan Towson University Supported by the National Science Foundation under grant DUE
L – Modelling and Simulating Social Systems with MATLAB Lesson 7 – Continuous simulations Wenjian Yu © ETH Zürich |
Computational Methods of Scientific Programming Lecturers Thomas A Herring, Room A, Chris Hill, Room ,
Modeling frameworks Today, compare:Deterministic Compartmental Models (DCM) Stochastic Pairwise Models (SPM) for (I, SI, SIR, SIS) Rest of the week: Focus.
L – Modelling and Simulating Social Systems with MATLAB Lesson 6 – Graphs (Networks) Anders Johansson and Wenjian Yu (with S. Lozano.
Epidemic (Compartment) Models. Epidemic without Removal SI Process Only Transition: Infection Transmission SIS Process Two Transitions: Infection and.
University of Texas at Austin CS 378 – Game Technology Don Fussell CS 378: Computer Game Technology Physics for Games Spring 2012.
Ch 1.3: Classification of Differential Equations
MA354 Dynamical Systems T H 2:30 pm– 3:45 pm Dr. Audi Byrne.
Simulation of Infectious Diseases Using Agent-Based Versus System Dynamics Models Omar Alam.
Variational data assimilation: examination of results obtained by different combinations of numerical algorithms and splitting procedures Zahari Zlatev.
Recap Cubic Spline Interpolation Multidimensional Interpolation Curve Fitting Linear Regression Polynomial Regression The Polyval Function The Interactive.
Dynamics of Infectious Diseases. Using Lotka-Volterra equations? PredatorPrey VS.
Predicting the Future To Predict the Future, “all we have to have is a knowledge of how things are and an understanding of the rules that govern the changes.
Copyright © The McGraw-Hill Companies, Inc. Permission required for reproduction or display. 1 Part 6 - Chapters 22 and 23.
Numerical Analysis -Applications to SIR epidemic model and Computational Finance - with MATLAB Jaepil LEE.
AFE BABALOLA UNIVERSITY DEPARTMENT OF PHYSICAL SCIENCES.
SIR Epidemics: How to model its behavior? Soonmook Lee 1.
Numerical Analysis Yu Jieun.
SIR Epidemics 박상훈.
- MATHEMATICAL BIOLOGY BY D A - YEON M IN # SIR Epidemics.
Mean Field Methods for Computer and Communication Systems Jean-Yves Le Boudec EPFL Network Science Workshop Hong Kong July
Epidemics Pedro Ribeiro de Andrade Münster, 2013.
© ETH Zürich | L – Modeling and Simulating Social Systems with MATLAB Lecture 3 – Dynamical Systems © ETH Zürich | Giovanni Luca.
Differential Equations A Universal Language
Modelling and Simulating Social Systems with MATLAB
L – Modeling and Simulating Social Systems with MATLAB
L – Modeling and Simulating Social Systems with MATLAB
L – Modeling and Simulating Social Systems with MATLAB
ZCE 111 Assignment 11.
L – Modeling and Simulating Social Systems with MATLAB
Autonomous Cyber-Physical Systems: Dynamical Systems
Differential Equations:
Predicting the Future To Predict the Future, “all we have to have is a knowledge of how things are and an understanding of the rules that govern the changes.
Predicting the Future To Predict the Future, “all we have to have is a knowledge of how things are and an understanding of the rules that govern the changes.
Susceptible, Infected, Recovered: the SIR Model of an Epidemic
1.1 Dynamical Systems MODELING CHANGE
Presentation transcript:

L – Modelling and Simulating Social Systems with MATLAB © ETH Zürich | Lesson 3 – Dynamical Systems Anders Johansson and Wenjian Yu

A. Johansson & W. Yu / 2 Projects  Implementation of a model from the Social-Science literature in MATLAB.  Carried out in pairs.  The projects will be assigned next week: March 15, 2010

A. Johansson & W. Yu / 3 Lesson 3 - Contents  Differential Equations  Dynamical Systems  Pendulum  Lorenz attractor  Lotka-Volterra equations  Epidemics: Kermack-McKendrick model  Exercises

A. Johansson & W. Yu / 4 Differential equations  Solving differential equations numerically can be done by a number of schemes. The easiest way is by the 1 st order Euler’s Method: t x ΔtΔt x(t) x(t-Δt)

A. Johansson & W. Yu / 5 Dynamical systems  A dynamical system is a mathematical description of the time dependence of a point in a space.  A dynamical system is described by a set of linear/non-linear differential equations.  Even though an analytical treatment of dynamical systems is often complicated, obtaining a numerical solution is straight forward.

A. Johansson & W. Yu / 6 Pendulum  A pendulum is a simple dynamical system: L = length of pendulum (m) = angle of pendulum g = acceleration due to gravity (m/s 2 ) The motion is described by:

A. Johansson & W. Yu / 7 Pendulum: MATLAB code

A. Johansson & W. Yu / 8 Set time step

A. Johansson & W. Yu / 9 Set constants

A. Johansson & W. Yu / 10 Set starting point of pendulum

A. Johansson & W. Yu / 11 Time loop: Simulate the pendulum

A. Johansson & W. Yu / 12 Perform 1 st order Euler’s method

A. Johansson & W. Yu / 13 Plot pendulum

A. Johansson & W. Yu / 14 Set limits of window

A. Johansson & W. Yu / 15 Make a 10 ms pause

A. Johansson & W. Yu / 16 Pendulum: Executing MATLAB code

A. Johansson & W. Yu / 17 Lorenz attractor  The Lorenz attractor defines a 3-dimensional trajectory by the differential equations:  σ, r, b are parameters.

A. Johansson & W. Yu / 18 Lorenz attractor: MATLAB code

A. Johansson & W. Yu / 19 Set time step

A. Johansson & W. Yu / 20 Set number of iterations

A. Johansson & W. Yu / 21 Set initial values

A. Johansson & W. Yu / 22 Set parameters

A. Johansson & W. Yu / 23 Solve the Lorenz-attractor equations

A. Johansson & W. Yu / 24 Compute gradient

A. Johansson & W. Yu / 25 Perform 1 st order Euler’s method

A. Johansson & W. Yu / 26 Update time

A. Johansson & W. Yu / 27 Plot the results

A. Johansson & W. Yu / 28 Animation

A. Johansson & W. Yu / 29

A. Johansson & W. Yu / Food chain 30

A. Johansson & W. Yu / 31 Lotka-Volterra equations  The Lotka-Volterra equations describe the interaction between two species, prey vs. predators, e.g. rabbits vs. foxes. x: number of prey y: number of predators α, β, γ, δ: parameters

A. Johansson & W. Yu / 32 Lotka-Volterra equations  The Lotka-Volterra equations describe the interaction between two species, prey vs. predators, e.g. rabbits vs. foxes.

A. Johansson & W. Yu / 33 Lotka-Volterra equations  The Lotka-Volterra equations describe the interaction between two species, prey vs. predators, e.g. rabbits vs. foxes.

A. Johansson & W. Yu / Epidemics 34 Source: Balcan, et al. 2009

A. Johansson & W. Yu / 35 SIR model  A model for epidemics is the SIR model, which describes the interaction between Susceptible, Infected and Removed (immune) persons, for a given disease.

A. Johansson & W. Yu / 36 Kermack-McKendrick model  of diseases like the plague and cholera. A popular SIR model is the Kermack-McKendrick model. The model was proposed for explaining the spreading  The model assumes:  A constant population size.  A zero incubation period.  The duration of infectivity is as long as the duration of the clinical disease.

A. Johansson & W. Yu / 37 Kermack-McKendrick model  The Kermack-McKendrick model is specified as: S: Susceptible persons I: Infected persons R: Removed (immune) persons β : Infection rate γ : Immunity rate S I R β transmission γ recovery

A. Johansson & W. Yu / 38 Kermack-McKendrick model  The Kermack-McKendrick model is specified as: S: Susceptible persons I: Infected persons R: Removed (immune) persons β : Infection rate γ : Immunity rate

A. Johansson & W. Yu / 39 Kermack-McKendrick model  The Kermack-McKendrick model is specified as: S: Susceptible persons I: Infected persons R: Removed (immune) persons β : Infection rate γ : Immunity rate

A. Johansson & W. Yu / 40 Exercise 1  Implement and simulate the Kermack- McKendrick model in MATLAB. Use the starting values: S=I=500, R=0, β =0.0001, γ =0.01  Slides/exercises: (Download only possible with Firefox!)

A. Johansson & W. Yu / 41 Exercise 2  A key parameter for the Kermack-McKendrick model is the epidemiological threshold, β S/ γ. Plot the time evolution of the model and investigate the influence of the epidemiological threshold, in particular the cases: 1. β S/ γ < 1 2. β S/ γ > 1 Starting values: S=I=500, R=0, β =0.0001

A. Johansson & W. Yu / 42 Exercise 3 - optional  Implement the Lotka-Volterra model and investigate the influence of the timestep, dt.  How small must the timestep be in order for the 1 st order Eulter‘s method to give reasonable accuracy?  Check in the MATLAB help how the functions ode23, ode45 etc, can be used for solving differential equations.