Note, however, that this is not the final time of the simulation. Similar to ContactSimulator, the Gillespie_simple_contagion "overshoots" the end of the interval. In other words, self.time in
is not equal to tmax (which I think is assumed in this function).
We need to take this into account when specifying interval-wise simulations. We can probably reuse the same method / algorithm developed for the same purpose in ContactSimulator.
We specify
tmax
in the call toGillespie_simple_contagion
:https://github.com/dburov190/risk-networks/blob/3fb0f3a104cdcc705ef201dd25a0cea80b17332e/epiforecast/kinetic_model_simulator.py#L128
Note, however, that this is not the final time of the simulation. Similar to
ContactSimulator
, theGillespie_simple_contagion
"overshoots" the end of the interval. In other words,self.time
inhttps://github.com/dburov190/risk-networks/blob/3fb0f3a104cdcc705ef201dd25a0cea80b17332e/epiforecast/kinetic_model_simulator.py#L130
is not equal to
tmax
(which I think is assumed in this function).We need to take this into account when specifying interval-wise simulations. We can probably reuse the same method / algorithm developed for the same purpose in
ContactSimulator
.