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 - 237 -
  • Benutzer
  • Version
    • Vollversion
    • Textversion
  • Sprache
    • Deutsch
    • English - Englisch

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

Bild der Seite - 237 -

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

Text der Seite - 237 -

8.3 SpreadingofDisease:ASystemofFirstOrderODEs 237 Thenew,extendeddifferentialequationswith theV quantitybecome S′ =−βSI+νR−pS, (8.36) V ′ =pS, (8.37) I′ =βSI−γI, (8.38) R′ =γI−νR. (8.39) We shall refer to thismodelas theSIRV model. The new equation for V ′ poses no difficulties when it comes to the numerical method. Ina ForwardEuler schemewe simplyaddanupdate Vn+1 =Vn+pΔtSn . TheprogramneedstostoreV(t) inanadditionalarrayV, and theplottingcommand must be extended with more arguments to plot V versus t as well. The complete code is found in thefileSIRV1.py. Using p = 0.0005 and p = 0.0001 as values for the vaccine efficiency parameter, the effect of vaccination is seen in Figs. 8.15 and 8.16, respectively. (otherparametersareas inFig.8.13). 8.3.9 DiscontinuousCoefficients:AVaccinationCampaign What about modeling a vaccination campaign? Imagine that 6 days after the outbreak of the disease, the local health station launches a vaccination campaign. They reach out to many people, say 10 times as efficiently as in the previous (constantvaccination)case. If thecampaign lasts for10dayswecanwrite p(t)= { 0.005, 6 ·24≤ t≤15 ·24, 0, otherwise Note that we must multiply the t value by 24 because t is measured in hours, not days.Inthedifferentialequationsystem,pS(t)mustbereplacedbyp(t)S(t), andin thiscasewegetadifferentialequationsystemwithatermthat isdiscontinuous.This
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