Zombie propagation

Sat 21 March 2020
Zombie favorite food warning (Photo credit: wikipedia)

I recently read a paper [1] trying to model a disease propagation. I wanted to play with this model.

The model

The model is know as "SIR" as it divide the population into 3 groups:

  • S: suceptible to become a zombie
  • I: infected, and thus zombified
  • R: recovered, and (hopefully) immune

It then model the move of individuals between groups. The principle of dividing a population into such group and modeling the transitions of individual is known as a compartmental model and many results have already been published about such models. I won't insist on the R0 (basic reproduction number).

For fun, and because it is already done by scientific researchers, I will add other groups:

  • Q: quarantined
  • D: dead
  • AC: asymptomatic carrier (exposed, can infect other but not zombified)

I'll use the follwing transition between groups:

Zombie transition diagram

Note that:

  • this is only a toy model
  • transitions rates are proportional to population of some groups (more zombies and more suceptibles   ⇒   more mettings between both groups, zombies can be put in quarantine faster if there is more non-zombie able to do it)
  • ζ = (1)/(λ) in some research paper, λ being a recovery time.
  • only zombie can die, e.i. other death causes are not modeled
  • once recovered, there is a slight chance to not be immune (model either mutation in the desease or people needing a booster shot)

This model is thus entirely described by the following equations:

(S)/(t) =  − νS(t)I(t) + αR(t) − β(I(t) + AC(t)) × S(t)

(I)/(t) = β(I(t) + AC(t)) × S(t) − ζI(t) − γ(S(t) + AC(t) + R(t)) × I(t) − μI(t)

(R)/(t) = ζ(I(t) + Q(t)) + τAC(t) − αR(t)

(Q)/(t) = γ(S(t) + AC(t) + R(t)) × I(t) − (μ + ζ)Q(t)

(D)/(t) = μ(I(t) + Q(t))

(AC)/(t) = νS(t)I(t) − τ(AC(t)

The game

I use python to code this model. I use scipy.integrate.odeint. I simulated some scenarii [2]

This model clearly needs improvements (quarantine is useless in this model). In this model the asymptomous carrier, even if they are few, can have a visible influence on the outcome.

We can now collect possible outcomes:

[1]C Witkowski and B Blais (2013), "Bayesian analysis of epidemics-zombies, influenza, and other diseases"
[2]a jupyter notebook containing my code is available here (also in pdf)

Category: maths Tagged: python maths zombie


Python virtualenv: quick reference

Sun 21 July 2019
Virtual environement (Photo credit: wikipedia)

To isolate python developments, I use virtualenv. This allow me to forget about the specific python version used for each project, avoid interferences with the default python installation and between my projects, is relatively light, and may have other advantages I cannot imagine with my …

Category: programming Tagged: python tools code

Read More

C*: Yaw

Mon 01 April 2019
aileron Vertical stabilizer (Photo credit: Wikipedia)

This post is about yaw control. This is also the post for which I did not find many references.

Remember the yaw is the axis controlled by the rudder. The rudder acts as any foil, providing a force dependant of its angle of attack. This …

Category: aviation Tagged: C star Flight dynamics yaw

Read More

LaTeX makefile updated

Fri 29 March 2019

My default LaTeX makefile evolved. Here is an update:

The makefile looks like:

LATEX=pdflatex
BIBTEX=bibtex
BIB=
RERUN='(There is undefined reference|Rerun to get (cross-references|the bars) right)'

%.pdf:%.tex
    ${LATEX} $<
    @if [ -e $*.bbl ]; then ${BIBTEX} $* && ${LATEX} $< && ${LATEX} $< ; fi
    @if egrep -q $(RERUN) $*.log ; then ${LATEX} $< ; fi

%.aux …

Category: tools Tagged: GNU LaTeX Makefile Writing how to tools

Read More

Back online

Mon 18 February 2019

I've migrated the blog from wordpress to pelican. Static files, quite easy to use.

The migration process went well. The pelican import tool is easy to use and my rst linter highlighted the few errors done by the import tools (mainly empty sections).

There are still few artefacts due to …

Category: tools Tagged: pelican wordpress blog tools

Read More

Seine flooding

Mon 13 June 2016
Français : Crue de la Seine à Paris en 1910.

Seine, Paris, 1910. (Photo credit: Wikipedia)

On this mounth, the Seine decided to flood Paris and its neighborouds, so I took my camera to take pictures. I realised:

I was not alone

TV team waiting for the news

TV team waiting for the news

TV team waiting for the news

TV team waiting for the news

Guy taking picture thanks to a stick

Guy taking picture thanks to a …

Category: photography Tagged: Flooding Paris Seine

Read More
Page 1 of 10

Next »