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

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

dot{S}_kappa = <I> [-(tau+gamma) kappa S_kappa
  • gamma(kappa+1)S_{kappa+1}
[dot{SI}] = -(tau+gamma)[SI]
  • tau(<I> - 2 <I>^2) sum_{kappa} kappa(kappa-1) S_kappa

dot{R} = gamma I <I> = [SI]/sum_kappa kappa S_kappa S = sum_kappa S_kappa I = N - S - R

Skappa0 : numpy array

from S_0(0) up to S_kappamax(0) of number susceptible with each effective degree Skappa = number of nodes that are susceptible and have kappa non-recovered neighbors

I0 number
number of infected individuals at time 0
R0 number
initial number recovered
SI0 number
initial number of SI edges
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

SI S_{s,i}
number of SI edges