Researchers have employed stochastic simulations to determine the validity of their theoretical findings and to study analytically intractable spreading dynamics. In both cases, the correctness and efficiency of the simulation algorithm are of paramount importance. We prove in this article that the Next Reaction Method and the non-Markovian Gillespie algorithm, two algorithms for simulating non-Markovian epidemics, are statistically equivalent. We also study the performance and applicability under various circumstances through complexity analyses and numerical experiments. In our numerical simulations, we apply the Next Reaction Method and the Gillespie algorithm to epidemic simulations on time-varying networks and epidemic simulations with cooperative infections. Both tasks have only been done using the Gillespie algorithm, while we show that the Next Reaction Method is a good alternative. We believe this article may also serve as a guide for choosing simulation algorithms that are both correct and efficient for researchers from epidemiology and beyond.
翻译:研究人员利用随机模拟来确定其理论发现的有效性,并研究分析难解的传播动态。在这两种情况下,模拟算法的正确性和效率都至关重要。我们在文章中证明,下一个反应方法和非马尔科维安·吉莱斯皮算法(模拟非马尔科维安流行病的两种算法)在统计上是等同的。我们还通过复杂分析和数字实验研究各种情况下的性能和适用性。在数字模拟中,我们应用下一个反应方法和吉列斯皮算法(下一个反应方法和吉列斯皮算法)在时间变化网络上进行流行病模拟以及合作感染的流行病模拟。这两项任务都只使用吉列斯皮算法(Gillespie 算法)完成,同时我们证明下一个反应方法是一种好的替代方法。我们认为,这篇文章还可以作为指南,用于选择从流行病学和其他地方对研究人员来说既正确又有效的模拟算法。