EoN.SIS_homogeneous_pairwise(S0, I0, SI0, SS0, n, tau, gamma, tmin=0, tmax=100, tcount=1001, return_full_data=False)[source]

Encodes System (4.10) 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 triples”

S0 number
initial number susceptible
I0 number
initial number infected
SI0 number
initial number of SI edges
SS0 number
initial number of SS edges
n integer
(common) degree of 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
return_full_data boolean
tells whether to just return times, S, I or all calculated data.
if return_full_data is True:
t, S, I, SI, SS, II
if return_full_data is False:
t, S, I
import networkx as nx
import EoN
S0 = 990
I0 = 10
SI0 = 50
SS0 = 4900
n = 5
tau = 1
gamma = 2
t, S, I = EoN.SIS_homogeneous_pairwise(S0, I0, SI0, SS0, n, tau, gamma,
                                        tmax = 20)