Repository navigation
Add EpiModel as a thirteenth engine - #28
Merged
Merged
Conversation
EpiModel 2.5.0 (CRAN, Statnet) simulates epidemics on networks drawn from fitted exponential random graph models. The benchmark's network is fixed, so the runner skips both the fit and the draws: the formation model is an edges term held at the shared network's density (~offset(edges), which leaves ergm nothing to estimate), a replacement initialization module installs the edge list where EpiModel would put its first draw, and the network-resimulation module does nothing. The network stays a tergmLite edge list; EpiModel's default networkDynamic form was 30 to 40 times slower on the same fixed network in a side test. The SEIRH disease is written as EpiModel modules: infection over discord_edgelist(), progression with daily probabilities, and a prevalence module. The scenario 01 vaccine is a protection attribute, and the scenario 02 outputs come from EpiModel's transmission matrix, infTime, and per-flow epidemic statistics. Calibrated against epiworldR's medians: 0.948 at 10,000 agents and 0.940 at 100,000 and 1,000,000 (uncalibrated medians 0.458 and 0.086). Runners for scenarios 00 to 04, registration in run.py, config, tests, make check, the Dockerfile, code regions, and the docs (engines, methods, results, showcase plan, scenario notes); EpiModel's 640 published records and the re-rendered reports. EpiModel moves out of the engines considered and not included. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds EpiModel 2.5.0 (CRAN, Statnet) to every scenario.
How the runner uses EpiModel
EpiModel draws its contact network from a fitted ERGM, and has no stock setting for a fixed network:
resimulate.network = FALSEonly draws the whole network time series before the epidemic instead of during it. The runner therefore skips both the fit and the draws:~offset(edges)held at the shared network's density, so ergm has nothing to estimate. Fitting withtarget.statsran for more than 10 minutes at 100,000 agents.resim_nets.FUNdoes nothing. After a 100-day run the edge list is identical to the shared one.tergmLite = TRUEkeeps the network as a plain edge list. EpiModel's defaultnetworkDynamicform was 31× (10k) to 39× (100k) slower on the same fixed network, with 3–5× the memory. Most of that cost isget.dyads.active()andnwupdate.netwriting every agent's status into the network each day.discord_edgelist(), progression, prevalence).infTime, and per-flow epidemic statistics.Results
discord_edgelist()shuffles and scans every edge every day whatever the prevalence, so time scales with edges rather than with the outbreak. It is faster on scenario 04's network, which has fewer edges (376,526), than on scenario 00 at 100k (500,000).Run hygiene
Records that overlapped other containers on the shared Podman VM, my own side experiments, or sustained slow windows were deleted and rerun under a guard that stops the run if another container starts. One replicate whose timing was corrupted by a VM clock step after host sleep was also rerun. R's elapsed timer follows the wall clock, so benchmarks should run with the host kept awake.
The environment records and run manifest are left as on
main, as in the ABM change.Possible follow-up
ABM's published scenario 01 records at 100,000 agents look contended: p90 is 1.52× the median, against 1.03–1.16× for other engines. Not touched here.
🤖 Generated with Claude Code