EpiModel / EpiModel-Gallery

Gallery of Network-Based Epidemic Model Templates for EpiModel
http://epimodel.org
MIT License
52 stars 31 forks source link

End-horizon simulation speed with parameter updater #35

Closed gknowlt closed 2 years ago

gknowlt commented 2 years ago

For the CEA gallery, pull request #33 incorporates the new parameter updater changes to EpiModel to handle the end horizon, while pull request #34 reflects the code before these changes. On my PC, executing the first netsim with the old code (1 core, 104 steps, 10 sims) takes 2.379 minutes. The updated version is sleeker in terms of the code, but the first netsim takes 1 minute longer at 3.376 min. In the clunky original set-up, the sim speeds up significantly during the end horizon but the same does not occur in the updated version of code. @AdrienLeGuillou @smjenness

33

34

AdrienLeGuillou commented 2 years ago

I can replicate this behavior on my machine. I am investigating what does not work with the control updater module

AdrienLeGuillou commented 2 years ago

@gknowlt Is it possible that you are using the CRAN version and not the github main branch of EpiModel? The updater module on CRAN only work with parameters. The ability to change the controls was added later.

With the GitHub version I get similar runtimes for the 2 branches with 1 cores, 104 steps and 10 sims). Around 1.15 minutes for both.

gknowlt commented 2 years ago

@AdrienLeGuillou You are correct! I was using the CRAN version and not the Github version. That fixed the issue and everything is running quickly. Thank you for your help!