Web-Books
im Austria-Forum
Austria-Forum
Web-Books
Informatik
Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition
Seite - 230 -
  • Benutzer
  • Version
    • Vollversion
    • Textversion
  • Sprache
    • Deutsch
    • English - Englisch

Seite - 230 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition

Bild der Seite - 230 -

Bild der Seite - 230 - in Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition

Text der Seite - 230 -

230 8 SolvingOrdinaryDifferentialEquations plt.savefig(’tmp.pdf’); plt.savefig(’tmp.png’) plt.show() This program was written to investigate the spreading of flu at the mentioned boardingschool,andthereasoningfor thespecificchoicesβ andγ goesas follows. At some other school where the disease has already spread, it was observed that in the beginning of a day there were 40 susceptibles and 8 infected, while the numbers were 30 and 18, respectively, 24h later. Using 1h as time unit, we then have from (8.11) that β = 10/(40 ·8 ·24). Among 15 infected, it was observed that 3 recovered during a day, givingγ = 3/(15 ·24). Applying these parameters to a new case where there is one infected initially and 50 susceptibles, gives the graphs in Fig. 8.11. These graphs are just straight lines between the values at times ti = iΔt as computed by the program. We observe that S reduces as I and R grows. After about 30 days everyone has become ill and recovered again. Wecanexperimentwithβ andγ toseewhetherwegetanoutbreakof thedisease ornot.Imaginethata“washyourhands”campaignwassuccessfulandthat theother school in this case experienceda reductionofβ by a factor of 5. With this lowerβ the disease spreads very slowly so we simulate for 60 days. The curves appear in Fig.8.12. 8.3.4 OutbreakorNot Lookingat the equation for I, it is clear that we must haveβSI−γI > 0 for I to increase.Whenwe start the simulation it means that βS(0)I(0)−γI(0)>0, Fig. 8.11 Natural evolution of flu at a boarding school
zurück zum  Buch Programming for Computations – Python - A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition"
Programming for Computations – Python A Gentle Introduction to Numerical Simulations with Python 3.6, Band Second Edition
Titel
Programming for Computations – Python
Untertitel
A Gentle Introduction to Numerical Simulations with Python 3.6
Band
Second Edition
Autoren
Svein Linge
Hans Petter Langtangen
Verlag
Springer Open
Datum
2020
Sprache
englisch
Lizenz
CC BY 4.0
ISBN
978-3-319-32428-9
Abmessungen
17.8 x 25.4 cm
Seiten
356
Schlagwörter
Programmiersprache, Informatik, programming language, functional, imperative, object-oriented, reflective
Kategorie
Informatik
Web-Books
Bibliothek
Datenschutz
Impressum
Austria-Forum
Austria-Forum
Web-Books
Programming for Computations – Python