Jump to content

File:Graph SIR model without vital dynamics.svg

Page contents not supported in other languages.
This is a file from the Wikimedia Commons
From Wikipedia, the free encyclopedia

Original file (SVG file, nominally 964 × 723 pixels, file size: 206 KB)

Summary

Description
English: Basic SIR system:

dS/dt = -βIS/N dI/dt = βIS/N-γI dR/dt = γI

Initial Conditions: S(0)=3000000, I(0)=1, R(0)=0

Parameters: β=0.001, γ=0.07, N=3400000, t∈[0,60], step size=0.5

Yellow → Susceptible, Maroon → Infectious, Teal → Recovered
Date
Source File:Sirsys-p9.png
Author Bye~commonswiki
Clear[IC, a, b, h, i, m, n, f, NN, β, γ];
   IC = {3000000, 1, 0}; m = Length[IC];
   a = 0; b = 60; h = 0.5;
   NN = 1;
   n = (b - a)/h;

   β = 0.001; γ = 0.1;
   f[1, t_, S_, I_, R_] := -((β I S)/NN);
   f[2, t_, S_, I_, R_] := (β I S)/NN - γ I;
   f[3, t_, S_, I_, R_] := γ I;
   Clear[t, k1, k2, k3, k4, w];
   t[i_] := a + i*h;
   For[i = 1, i <= m, i++, w[i, 0] = IC[[i]]];
   k1[i_, j_] := h*(f @@ Flatten[{i, t[j - 1], Table[w[k, j - 1], {k, 1, m}]}]);
   k2[i_, j_] := h*(f @@ Flatten[{i, t[j - 1] + h/2, Table[w[k, j - 1] + k1[k, j]/2, {k, 1, m}]}]);
   k3[i_, j_] := h*(f @@ Flatten[{i, t[j - 1] + h/2, Table[w[k, j - 1] + k2[k, j]/2, {k, 1, m}]}]);
   k4[i_, j_] := h*(f @@ Flatten[{i, t[j - 1] + h, Table[w[k, j - 1] + k3[k, j], {k, 1, m}]}]);
   w[i_, j_] :=  w[i, j] = w[i, j - 1] + (k1[i, j] + 2*k2[i, j] + 2*k3[i, j] + k4[i, j])/6
   t1 = Table[Table[{t[j], w[i, j]}, {j, 0, n}], {i, 1, m}](*//TableForm*);
   DkYellow = RGBColor[.808, .808, .192];
   Teal = RGBColor[0, .5, .5];
   Maroon = RGBColor[.5, 0, 0];
   ListPlot[t1, PlotMarkers -> {Automatic, Scaled[0.01]}, PlotStyle -> {DkYellow, Maroon, Teal}, AspectRatio -> 420/560]

Licensing

Creative Commons CC-Zero This file is made available under the Creative Commons CC0 1.0 Universal Public Domain Dedication.
The person who associated a work with this deed has dedicated the work to the public domain by waiving all of their rights to the work worldwide under copyright law, including all related and neighboring rights, to the extent allowed by law. You can copy, modify, distribute and perform the work, even for commercial purposes, all without asking permission.

Captions

Add a one-line explanation of what this file represents

Items portrayed in this file

depicts

31 March 2020

image/svg+xml

File history

Click on a date/time to view the file as it appeared at that time.

Date/TimeThumbnailDimensionsUserComment
current23:46, 31 March 2020Thumbnail for version as of 23:46, 31 March 2020964 × 723 (206 KB)GregoryKaiserUploaded a work by https://commons.wikimedia.org/wiki/User:Bye~commonswiki from https://en.wikipedia.org/w/index.php?title=File:Sirsys-p9.png&gettingStartedReturn=true with UploadWizard

Global file usage

The following other wikis use this file:

Metadata