EoN.SIR_super_compact_pairwise¶
-
EoN.
SIR_super_compact_pairwise
(R0, SS0, SI0, N, tau, gamma, psihat, psihatPrime, psihatDPrime, tmin=0, tmax=100, tcount=1001, return_full_data=False)[source]¶ Encodes system (5.22) of Kiss, Miller, & Simon. Please cite the book if using this algorithm.
dot{theta} = -tau [SI]/N*psihat(theta)
[dot{SS}] = -2 tau [SS] [SI] Q
[dot{SI}] = -gamma[SI] + tau([SS]-[SI])[SI]Q - tau*[SI]
[dot{R}] = gamma*[I]
[S] = N psihat(theta)
[I] = N-[S]-[R]
Q = psihat_xx(theta)/N(psihat_x(theta))^2
Arguments: - R0 number
- initial number of R nodes.
- SS0 number
- initial number of SS edges
- 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.
Returns: - if return_full_data:
- return times, S, I, R, SS, SI
- else:
- return times, S, I, R