Pandemic Calculator

English Version
Benutzeravatar
Yukterez
Administrator
Beiträge: 272
Registriert: Mi 21. Okt 2015, 02:16

Pandemic Calculator

Beitragvon Yukterez » Mo 23. Mär 2020, 21:48

Bild

Bild This is the english translation.   Bild Die deutsche Version befindet sich auf pandemic.yukterez.net
Bild

SIRD-Model
Bild

Bild

Initial conditions → E0: inhabitants, I0: infected, R0: recovered and immunized plus deceased, b0 and b1: initial and final transmission rate, b: time dependend transmission rate.

Parameters → T: timespan for the integration, tb: timespan for the change in the transmission rate, tu: timespan before the transmission rate starts to change, d: sickness duration, h: hospitalization rate, x: death rate, Rh: recovered and immunized, Rd: deceased.

The transmission rate can be larger that the effective spread rate; the first describes how many people per day on average receive a viral load from an infected person, while the latter says how many of those get indeed infected. If the product of the transmission rate and the sickness duration (the reproduction number ℛ=b·d) is smaller than 1 the number of infected people decreases over time, otherwise it increases.

Code: Alles auswählen

(* pandemic.yukterez.net *)

T  = 300;                                              (* Zeitraum *)
E0 = 83000000;                                        (* Einwohner *)

I0 = 66;                                             (* Infizierte *)
R0 = 0;                                                (* Geheilte *)

b0 = 30/100;                         (* initiale Transmissionsrate *)
b1 = 30/100;                           (* finale Transmissionsrate *)

tu = 15;               (* Zeitspanne der ungehinderten Ausbreitung *)
tb = 5;                                     (* Zeitspanne b0 -> b1 *)

d  = 30;                                        (* Krankheitsdauer *)
h  = 2/10;                                (* Hospitalisierungsrate *)
x  = 3/100;                                          (* Sterberate *)

f  = (b0-b1)/tb;                 (* Änderung der Transmissionsrate *)
τ  = t-tu;
B  = If[b0==b1, b0, If[b1<b0, Max[b1, b0-f τ], Min[b1, b0-f τ]]];
b  = Interpolation[Table[If[t<tu, b0, B], {t, 0, T, 1}]];

i0 = I0/E0;                           (* Fraktion der Angesteckten *)
r0 = R0/E0;                              (* Fraktion der Geheilten *)
s0 = 1-i0-r0;                         (* Fraktion der Ansteckbaren *)

DGL = {
s'[t] == -s[t] b[t] i[t],       (* Änderungsrate der noch Gesunden *)
i'[t] == s[t] b[t] i[t]-i[t]/d,   (* Änderungsrate der Infizierten *)
r'[t] == i[t]/d,                    (* Änderungsrate der Geheilten *)
s[0] == s0,
i[0] == i0,
r[0] == r0};

sol = Quiet[NDSolve[DGL, {s, i, r}, {t, 0, T+tu},
WorkingPrecision -> 48, MaxSteps -> Infinity,
InterpolationOrder -> All]];

max = Quiet[FindMaximum[i[t] /. sol, {t, 1}]]

Plot[{
Evaluate[E0 s[t] /. sol],                      (* noch gesund, rot *)
Evaluate[E0 i[t] /. sol],                        (* erkrankt, blau *)
Evaluate[h E0 i[t] /. sol],             (* hospitalisiert, schwarz *)
Evaluate[(1-x) E0 r[t] /. sol],             (* wieder gesund, grün *)
Evaluate[x E0 r[t] /. sol]                      (* gestorben, grau *)
}, {t, 0, T},
Frame -> True,
AxesOrigin -> {0, 0},
ImageSize -> 380,
PlotRange -> {All, {0, E0}},
ImagePadding -> {{50, 1}, {20, 10}},
PlotStyle -> {Red, Blue, Black, Green, Gray},
GridLines -> {{t/.max[[2]]}, {E0 max[[1]], E0/2}}]

Framed[Grid[Join[{{
"Tag         ",
"Krank (N)   ", "Krank (+%)  ", "Tot         ",
"Spital      ", "Gesund      ", "Genesen     "
}}, {{" ", " ", " ", " ", " "}},
Table[{t,
Round[Evaluate[E0 i[t] /. sol][[1]]],
100 N[Evaluate[(i[t]/i[Max[0, t-1]]-1) /. sol][[1]], 4],
Round[Evaluate[x E0 r[t] /. sol][[1]]],
Round[Evaluate[h E0 i[t] /. sol][[1]]],
Round[Evaluate[E0 s[t] /. sol][[1]]],
Round[Evaluate[(1-x) E0 r[t] /. sol][[1]]]},
{t, 0, T, 1}]],
Alignment -> Left]]

Initial Conditions: Germany, February 29, 2020, best fit: here we assume that the lockdowns established on March 7 start to be effective after an average incubation delay of 1 week and decrease the intial transmission rate of 0.31 down to 0.15 within a period of 11 days in which the population gradually starts to obey the curfew. For a comparison with a constant transmission rate click here; plot:

Bild

x-axis: days; y-axis: persons, %; red: not infectected; blue: infected, black: hospitalized; green: recovered and immunized, gray: dead.
Coronavirus, Corona Virus, Covid-19, Sars-Cov-2, Equation, Formula, Exponential Growth, Pandemy Mathematics
Bild
by Simon Tyran, Vienna @ minds || gab || wikipedia || stackexchange || License: CC-BY 4. If images don't load: [ctrl]+[F5]Bild

Benutzeravatar
Yukterez
Administrator
Beiträge: 272
Registriert: Mi 21. Okt 2015, 02:16

Pandemic Calculator

Beitragvon Yukterez » Di 24. Mär 2020, 02:09

Initial Conditions: Austria, March 23, 2020

Bild

Different transmission rates (color code as in the example above):

Bild

Forecasts for different transmission rates:

Bild

With a transmission rate of b=0.3 per day, the peak with 64% of the population simultaneously infected happens after 37 days (day 0 is March 23), with b=0.2 with 53% sick after 57 days and with b=0.1 with 30% sick after 127 days.

The hospitalization rate is assumed to be 20%, and the sickness duration 1 month (those numbers may not be accurate, for the recent data see here). The largest uncertainty factor is the fact that not everybody who is sick gets tested and the possibility of reinfection, which if true would require the SISD-model instead of the SIRD-model.
Bild
by Simon Tyran, Vienna @ minds || gab || wikipedia || stackexchange || License: CC-BY 4. If images don't load: [ctrl]+[F5]Bild

Benutzeravatar
Yukterez
Administrator
Beiträge: 272
Registriert: Mi 21. Okt 2015, 02:16

Pandemic Calculator

Beitragvon Yukterez » Do 26. Mär 2020, 18:24

Also see
In the meantime the Corona hype turned out to be a polically motivated scam: click here
Bild
by Simon Tyran, Vienna @ minds || gab || wikipedia || stackexchange || License: CC-BY 4. If images don't load: [ctrl]+[F5]Bild


Zurück zu „Yukterez Notepad“

Wer ist online?

Mitglieder in diesem Forum: 0 Mitglieder und 20 Gäste