EoN.SIR_effective_degree(S_si0, I0, R0, tau, gamma, tmin=0, tmax=100, tcount=1001, return_full_data=False)[source]

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

dot{S}_{s,i} = - tau i S_{s,i} + gamma((i+1)S_{s,i+1} - i S_{s,i})
  • tau [ISS]((s+1)S_{s+1,i-1} - sS_{s,i})/[SS]

dot{R} = gamma I S = sum_{s,i} S_{s,i} I = N-S-R

S_si0 (square) numpy 2-D array
S_{s,i} at time 0
I0 number
number of infected individuals at time 0
R0 number
number of recovered individuals at time 0
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, R or all calculated data.
if return_full_data==False

times np.array of times

S np.array of number susceptible

I np.array of number infected

R np.array of number recovered


times as before

S number susceptible

I number infected

R number recovered

S_si S_{s,i} at each time in times