2010-10-11 © ETH Zürich | 851-0585-04L – Modeling and Simulating Social Systems with MATLAB Lecture 3 – Dynamical Systems © ETH Zürich | Giovanni Luca.

Slides:



Advertisements
Similar presentations
Example Project and Numerical Integration Computational Neuroscience 03 Lecture 11.
Advertisements

Formal Computational Skills
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.
Åbo Akademi University & TUCS, Turku, Finland Ion PETRE Andrzej MIZERA COPASI Complex Pathway Simulator.
In biology – Dynamics of Malaria Spread Background –Malaria is a tropical infections disease which menaces more people in the world than any other disease.
Chapter 8: Long-Term Dynamics or Equilibrium 1.(8.1) Equilibrium 2.(8.2) Eigenvectors 3.(8.3) Stability 1.(8.1) Equilibrium 2.(8.2) Eigenvectors 3.(8.3)
Ordinary Differential Equations (ODEs)
Ordinary Differential Equations (ODEs) 1Daniel Baur / Numerical Methods for Chemical Engineers / Explicit ODE Solvers Daniel Baur ETH Zurich, Institut.
How does mass immunisation affect disease incidence? Niels G Becker (with help from Peter Caley ) National Centre for Epidemiology and Population Health.
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.
Today we will create our own math model 1.Flagellar length control in Chlamydomonus 2.Lotka-Volterra Model.
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.
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.
A Course in Scientific Simulation Mike O’Leary Shiva Azadegan Towson University Supported by the National Science Foundation under grant DUE
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.
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.
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.
L – Modelling and Simulating Social Systems with MATLAB © ETH Zürich | Lesson 3 – Dynamical Systems Anders Johansson and Wenjian.
Variational data assimilation: examination of results obtained by different combinations of numerical algorithms and splitting procedures Zahari Zlatev.
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.
L – Modeling and Simulating Social Systems with MATLAB Lecture 2 – Statistics and plotting © ETH Zürich | Giovanni Luca Ciampaglia,
AFE BABALOLA UNIVERSITY DEPARTMENT OF PHYSICAL SCIENCES.
SIR Epidemics: How to model its behavior? Soonmook Lee 1.
Numerical Analysis Yu Jieun.
SIR Epidemics 박상훈.
Epidemics Pedro Ribeiro de Andrade Münster, 2013.
Shawn Weatherford Saint Leo University
Differential Equations A Universal Language
Numerical Integration Methods
L – Modeling and Simulating Social Systems with MATLAB
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
L – Modeling and Simulating Social Systems with MATLAB
Population Models in Excel
L – Modeling and Simulating Social Systems with MATLAB
Describing Motion with Equations
L – Modeling 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
L – Modeling and Simulating Social Systems with MATLAB
ZCE 111 Assignment 11.
L – Modeling and Simulating Social Systems with MATLAB
A Computational Analysis of the Lotka-Volterra Equations Delon Roberts, Dr. Monika Neda Department of Mathematical Sciences, UNLV INTRODUCTION The Lotka-Volterra.
Ch 1.3: Classification of Differential Equations
Ch 1.3: Classification of Differential Equations
Autonomous Cyber-Physical Systems: Dynamical Systems
Differential Equations:
MATH 175: NUMERICAL ANALYSIS II
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.
The Simple Linear Regression Model: Specification and Estimation
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.
Numerical Integration Methods
Susceptible, Infected, Recovered: the SIR Model of an Epidemic
1.1 Dynamical Systems MODELING CHANGE
Presentation transcript:

© ETH Zürich | L – Modeling and Simulating Social Systems with MATLAB Lecture 3 – Dynamical Systems © ETH Zürich | Giovanni Luca Ciampaglia, Stefano Balietti and Karsten Donnay Chair of Sociology, in particular of Modeling and Simulation

G. L. Ciampaglia, S. Balietti & K. Donnay / 2 Projects  Implementation of a model from the Social-Science literature in MATLAB  Carried out in pairs  The projects will be assigned next week: October 18, 2010  Project suggestions are online now; please visit the website and read through the material!

G. L. Ciampaglia, S. Balietti & K. Donnay / 3 Lesson 3 - Contents  Differential Equations  Dynamical Systems  Pendulum  Lorenz attractor  Lotka-Volterra equations  Epidemics: Kermack-McKendrick model  Exercises

G. L. Ciampaglia, S. Balietti & K. Donnay / 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)

G. L. Ciampaglia, S. Balietti & K. Donnay / 5 Dynamical systems  Mathematical description of the time dependence of variables that characterize a given problem/ scenario in its state space  A dynamical system is described by a set of linear/non-linear differential equations.  Even though an analytical treatment of dynamical systems is usually very complicated, obtaining a numerical solution is (often) straight forward.

G. L. Ciampaglia, S. Balietti & K. Donnay / 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:

G. L. Ciampaglia, S. Balietti & K. Donnay / 7 Pendulum: MATLAB code

G. L. Ciampaglia, S. Balietti & K. Donnay / 8 Set time step

G. L. Ciampaglia, S. Balietti & K. Donnay / 9 Set constants

G. L. Ciampaglia, S. Balietti & K. Donnay / 10 Set starting point of pendulum

G. L. Ciampaglia, S. Balietti & K. Donnay / 11 Time loop: Simulate the pendulum

G. L. Ciampaglia, S. Balietti & K. Donnay / 12 Perform 1 st order Euler’s method

G. L. Ciampaglia, S. Balietti & K. Donnay / 13 Plot pendulum

G. L. Ciampaglia, S. Balietti & K. Donnay / 14 Set limits of window

G. L. Ciampaglia, S. Balietti & K. Donnay / 15 Make a 10 ms pause

G. L. Ciampaglia, S. Balietti & K. Donnay / 16 Pendulum: Executing MATLAB code

G. L. Ciampaglia, S. Balietti & K. Donnay / 17 Lorenz attractor  The Lorenz attractor defines a 3-dimensional trajectory by the differential equations:  σ, r, b are parameters.

G. L. Ciampaglia, S. Balietti & K. Donnay / 18 Lorenz attractor: MATLAB code

G. L. Ciampaglia, S. Balietti & K. Donnay / 19 Set time step

G. L. Ciampaglia, S. Balietti & K. Donnay / 20 Set number of iterations

G. L. Ciampaglia, S. Balietti & K. Donnay / 21 Set initial values

G. L. Ciampaglia, S. Balietti & K. Donnay / 22 Set parameters

G. L. Ciampaglia, S. Balietti & K. Donnay / 23 Solve the Lorenz-attractor equations

G. L. Ciampaglia, S. Balietti & K. Donnay / 24 Compute gradient

G. L. Ciampaglia, S. Balietti & K. Donnay / 25 Perform 1 st order Euler’s method

G. L. Ciampaglia, S. Balietti & K. Donnay / 26 Update time

G. L. Ciampaglia, S. Balietti & K. Donnay / 27 Plot the results

G. L. Ciampaglia, S. Balietti & K. Donnay / 28 Animation

G. L. Ciampaglia, S. Balietti & K. Donnay / 29

G. L. Ciampaglia, S. Balietti & K. Donnay / Food chain 30

G. L. Ciampaglia, S. Balietti & K. Donnay / 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

G. L. Ciampaglia, S. Balietti & K. Donnay / 32 Lotka-Volterra equations  The Lotka-Volterra equations describe the interaction between two species, prey vs. predators, e.g. rabbits vs. foxes.

G. L. Ciampaglia, S. Balietti & K. Donnay / 33 Lotka-Volterra equations  The Lotka-Volterra equations describe the interaction between two species, prey vs. predators, e.g. rabbits vs. foxes.

G. L. Ciampaglia, S. Balietti & K. Donnay / Epidemics 34 Source: Balcan, et al. 2009

G. L. Ciampaglia, S. Balietti & K. Donnay / 35 SIR model  A general model for epidemics is the SIR model, which describes the interaction between Susceptible, Infected and Removed (immune) persons, for a given disease.

G. L. Ciampaglia, S. Balietti & K. Donnay / 36 Kermack-McKendrick model  Spread of diseases like the plague and cholera? A popular SIR model is the Kermack-McKendrick model.  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.

G. L. Ciampaglia, S. Balietti & K. Donnay / 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

G. L. Ciampaglia, S. Balietti & K. Donnay / 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

G. L. Ciampaglia, S. Balietti & K. Donnay / 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

G. L. Ciampaglia, S. Balietti & K. Donnay / 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

G. L. Ciampaglia, S. Balietti & K. Donnay / 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

G. L. Ciampaglia, S. Balietti & K. Donnay / 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 Euler‘s method to give reasonable accuracy?  Check in the MATLAB help how the functions ode23, ode45 etc, can be used for solving differential equations.