EoN.SIS_homogeneous_meanfield

EoN.SIS_homogeneous_meanfield(S0, I0, n, tau, gamma, tmin=0, tmax=100, tcount=1001)[source]

Encodes System (4.8) of Kiss, Miller, & Simon. Please cite the book if using this algorithm.

In the text this is often referred to as the “mean-field model closed at the level of pairs”

[dot{S}] = gamma [I] - tau n[S][I]/N

[dot{I}] = au n[S][I]/N - gamma [I]

This is the SIS version of the “Kermack-McKendrick equations”.

Arguments:
S0 number
initial number susceptible
I0 number
initial number infected
n number
(average) degree of all nodes.
tau positive float
transmission rate
gamma number
recovery rate
tmin number (default 0)
minimum report time
tmax number (default 100)
maximum report time
tcount integer (default 1001)
number of reports
Returns:

times, S, I all numpy arrays

SAMPLE USE:
import networkx as nx
import EoN
S0 = 999
I0 = 1
n = 4 #degree
tau = 1
gamma = 2
t, S, I = EoN.SIS_homogeneous_meanfield(S0, I0, n, tau, gamma)