EoN.SIR_individual_based_pure_IC

EoN.SIR_individual_based_pure_IC(G, tau, gamma, initial_infecteds, initial_recovereds=None, nodelist=None, tmin=0, tmax=100, tcount=1001, transmission_weight=None, recovery_weight=None, return_full_data=False)[source]

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

The difference between this and SIR_individual_based is that this one assumes a “pure initial condition”, that is, we know exactly what the statuses of the nodes are at the initial time.

<dot{Y}_i> = tau sum_j g_{ij} (1-<Y_i>)<Y_j> - gamma_i <Y_i>

Arguments:
G networkx Graph
The contact network
tau positive float
transmission rate of disease
gamma number (default None)
global recovery rate
initial_infecteds list or set
the set of nodes initially infected
nodelist list (default None)
list of nodes in G in desired order. (only matters if return_full_data==True)
initial_recovereds list or set (default None)
initially recovered nodes if equal to None, then all non-index nodes are initially susceptible.
tmin number (default 0)
minimum report time
tmax number (default 100)
maximum report time
tcount integer (default 1001)
number of reports
transmission_weight string (default None)
the label for a weight given to the edges. G.edge[i][j][transmission_weight] = g_{ij}
recovery_weight string (default None)

a label for a weight given to the nodes to scale their recovery rates

gamma_i = G.nodes[i][recovery_weight]*gamma

return_full_data boolean (default False)

Returns:
if return_full_data is True,
returns times, S, I, R, Ss, Is, Rs
if return_full_data is False,
returns times, S, I, R