Board index Other Hangar talk

Numerical Epidemics

Talk about (almost) anything, as long as it is no serious FlightGear talk and does not fit in the other subforums.
Forum rules
Please refrain from discussing politics.

Numerical Epidemics

Postby Thorsten » Thu Apr 29, 2021 6:42 am

For the mathematically interested, I've been working some on numerical modeling of the spread of epidemics across a grid since last year. It seemed a timely activity to understand what meets us daily in the news. Most models I've seen in the media or in scientific publications to this date use coupled differential equations, which inevitably lead to exponentials - and indeed, news headlines are full of 'exponential growth' etc. However, looking at the actual numbers, there was hardly ever any exponential growth seen anywhere in the world - nature seemed very reluctant to follow the models.

So I tried a different kind of model, one in which mobility of actors imposes local restrictions on the growth of infections - and this indeed produced many of the patterns we've seen in reality (in particular, it actually predicted the long spell of calm Germany experienced last summer to the surprise of many people using exponential models).

I've gradually expanded on the code to be more complex, so the latest version can for example run different virus strains on the same grid and show how they interact - here's an example of a standard strain (violet) being contained by a measure, at which point a more agressive strain (green) is introduced to the grid and takes over the dynamics - except for the areas where the standard strain has been acive before and created a protective mesh of immunity around pockets of uninfected people.

Image

Image

So if you want to have some hands- on model to see how parameters like mobility affect spread and containment, or what vaccination fraction would be enough to stop a particular disease from spreading, or... - the code is GPL 2+, feel free to download and use, a short tutorial series is on my page.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Numerical Epidemics

Postby Johan G » Thu Apr 29, 2021 9:18 am

Thorsten wrote in Thu Apr 29, 2021 6:42 am:Most models I've seen in the media or in scientific publications to this date use coupled differential equations, which inevitably lead to exponentials - and indeed, news headlines are full of 'exponential growth' etc. However, looking at the actual numbers, there was hardly ever any exponential growth seen anywhere in the world - nature seemed very reluctant to follow the models.

So I tried a different kind of model, one in which mobility of actors imposes local restrictions on the growth of infections - and this indeed produced many of the patterns we've seen in reality (in particular, it actually predicted the long spell of calm Germany experienced last summer to the surprise of many people using exponential models).

Even as a layman I would expect pure exponential growth to pretty much only exist on on petri dishes, and only up to the point to attrition of the nutrients on the substrate.

With mobility of actors, are you talking about the pathogens or the potential hosts?

And have you seen any surprising/unexpected runs?
Low-level flying — It's all fun and games till someone looses an engine. (Paraphrased from a YouTube video)
Improving the Dassault Mirage F1 (Wiki, Forum, GitLab. Work in slow progress)
Some YouTube videos
Johan G
Moderator
 
Posts: 6629
Joined: Fri Aug 06, 2010 6:33 pm
Location: Sweden
Callsign: SE-JG
IRC name: Johan_G
Version: 2020.3.4
OS: Windows 10, 64 bit

Re: Numerical Epidemics

Postby Thorsten » Thu Apr 29, 2021 10:05 am

Even as a layman I would expect pure exponential growth to pretty much only exist on on petri dishes, and only up to the point to attrition of the nutrients on the substrate.


Well, you get the logistic function when you start to see attrition and take it into account - the differential equations give that, But only after you have infected a substantial proportion of the population.

With mobility of actors, are you talking about the pathogens or the potential hosts?


Mobility of potential hosts, but I assumed that's pretty much the same. The model is based on contacts caused by movement across grid cells and transmission probability upon a contact. The mobility is really in an abstract social space though - how many people do you potentially get in contact with? If you move within your social circle of close family, that's a few tens and the mobility is low, if you go to a concert whith 100.000 other visitors, the mobility is high because contacts ensure a rapid mixing of the population.

And have you seen any surprising/unexpected runs?


Depends what you expect - nature shows us that the patterns are really complicated, so I was specifically looking whether the model shows this complex dependency on the variables - so in a sense it wasn't unexpected that it does, I hoped it would.

I guess the thing that really surprised me most is that if you have a fairly low mobility (aka people never meet others outside their close circle), you need a very low vaccination percentage (like 15%) to completely stall an outbreak. Whereas if mobility is high, you need much more.
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am

Re: Numerical Epidemics

Postby GinGin » Thu Apr 29, 2021 2:01 pm

The tutorial is really interesting.
Do you still use gnu plot for the graphics ?
GinGin
 
Posts: 1580
Joined: Wed Jul 05, 2017 11:41 am
Location: Paris
Callsign: Gingin

Re: Numerical Epidemics

Postby Thorsten » Mon Nov 08, 2021 11:02 am

Version 0.4 is out, allows to simulate a vaccination campaign as part of the measures. (Download link see first post).
Thorsten
 
Posts: 12490
Joined: Mon Nov 02, 2009 9:33 am


Return to Hangar talk

Who is online

Users browsing this forum: helijah and 4 guests