Web-Books
in the Austria-Forum
Austria-Forum
Web-Books
Informatik
Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python
Page - 111 -
  • User
  • Version
    • full version
    • text only version
  • Language
    • Deutsch - German
    • English

Page - 111 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Image of the Page - 111 -

Image of the Page - 111 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python

Text of the Page - 111 -

4.2 SpreadingofDiseases 111 Tosummarize, the spreadingof thisdisease is essentially thedynamicsofmov- ing individuals fromtheS to the I and then to theRcategory: We can usemathematics tomore precisely describe the exchange between the categories. The fundamental idea is to describe the changes that take placeduring asmall time interval, denotedby t. Ourdiseasemodel isoftenreferred toasacompartmentmodel,wherequantities are shuffled between compartments (here a synonym for categories) according to some rules. The rules express changes in a small time interval t, and from these changeswe can let t go to zero and obtain derivatives. The resulting equations thengo fromdifferenceequations (withfinite t) to differential equations ( t ! 0). We introduce a uniformmesh in time, tn D n t, n D 0;:: :;Nt, and seekS at themeshpoints. Thenumerical approximation toS at time tn is denotedbySn. Similarly, we seek the unknown values of I.t/ andR.t/ at themesh points and introduce a similar notation In andRn for the approximations to the exact values I.tn/andR.tn/. In the time interval tweknowthat somepeoplewill be infected, soSwillde- crease.Weshall soonarguebymathematics that therewill beˇ tSI newinfected individuals in this time interval,whereˇ is aparameter reflectinghoweasypeople get infectedduringa timeintervalofunit length. If the loss inS isˇ tSI,wehave that thechange inS is SnC1 Sn D ˇ tSnIn : (4.9) Dividingby t and letting t !0,makes the left-handsideapproachS0.tn/ such thatweobtainadifferential equation S0 D ˇSI : (4.10) The reasoning in going from the difference equation (4.9) to the differential equa- tion (4.10) followsexactly the stepsexplained inSect. 4.1.1. BeforeproceedingwithhowI andRdevelopsintime, letusexplaintheformula ˇ tSI. We haveS susceptibles and I infected people. These canmake upSI pairs.Now,supposethatduringatimeintervalTwemeasurethatmactualpairwise meetings do occur among n theoretically possible pairings of people from the S and I categories. The probability that peoplemeet in pairs during a timeT is (by the empirical frequency definition of probability) equal tom=n, i.e., the number of successes dividedby thenumberof possible outcomes. Fromsuch statisticswe normallyderivequantitiesexpressedperunit time, i.e.,herewewanttheprobability perunit time, ,which is foundfromdividingbyT : Dm=.nT/. Given the probability , the expected number ofmeetings per time interval of SI possible pairs of people is (frombasic statistics) SI. During a time interval t, therewill be SI t expected number ofmeetings between susceptibles and infected people such that the virus may spread. Only a fraction of the tSI
back to the  book Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python
Title
Programming for Computations – Python
Subtitle
A Gentle Introduction to Numerical Simulations with Python
Authors
Svein Linge
Hans Petter Langtangen
Publisher
Springer Open
Date
2016
Language
English
License
CC BY-NC 4.0
ISBN
978-3-319-32428-9
Size
17.8 x 25.4 cm
Pages
248
Keywords
Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
Category
Informatik
Web-Books
Library
Privacy
Imprint
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python