Repository navigation
Conversation
several-diseases.md: a stage per disease per agent and one status; one database with its histories kept per disease; an explicit strain(); the references to stages and the tools name their disease when there are several; pull only; phases NH-5a to NH-5c. Runbook updated with the ports of #370. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## v1-layers #371 +/- ##
============================================
Coverage ? 77.52%
============================================
Files ? 70
Lines ? 7996
Branches ? 1567
============================================
Hits ? 6199
Misses ? 1307
Partials ? 490
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
… always, random order, the removal's name) Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
gvegayon
added a commit
that referenced
this pull request
Nov 11, 2026
…372) First phase of NH-5 (`several-diseases.md`, #371): the engine's single natural history becomes a list of **tracks**, one per disease, of length one. A pure refactor: no API change, identical results. ## What changes - **`Model::Track`** holds what the engine keeps for one disease: its natural history, the per-agent records (stage deadlines, stage-entry days, episodes), the queue modes and the initial placement (`set_initial()`). `Model::tracks` replaces `nh`, `nh_until`, `nh_row`, `nh_rows`, `nh_queue` and `nh_initial`; `nh_record()` and `nh_removed()` become `Track::record()` and `Track::removed()`. - **The daily step** proposes a stage transition in each track (`nh_step_stage()`), then the status once. **The reset** loops over the tracks, keeping the order in which it draws the random numbers. - The functions that act for a virus (proposing a transition, entering a stage, the infection probability, seeding) look up that virus's track (`nh_track()`), so NH-5b only has to change how a virus finds its track. ## What does not change (yet) The track's cell is still the agent's `state`, and the agents-by-cell index, the push masks and the database's counts stay as they are. They serve the first disease: with several diseases, infections are pulled and agents iterated once a day. Each further track's per-agent cell, its counts and the disease an event belongs to come with **NH-5b**, where a second disease tests them. This narrows what the plan said for NH-5a; `several-diseases.md` now says so. ## Checks - **Identity:** a harness hashes every output (histories, transmissions, declared transitions, transition matrix, virus and tool histories) for all 11 registered models, under push, pull and auto, with and without the queue, with and without a second strain and a tool, over 3 seeds: identical to `v1-layers` in all 102 configurations, also built with `-DEPI_DEBUG`. - **Cost (callgrind, instructions):** SEIR on a small-world network of 100,000 agents, 100 days: 1.109 → 1.130 billion (**+1.9%**). Measles mixing, 100,000 agents: 10.73 → 10.95 billion (**+2.1%**). Within the 10% rule; the benchmark rerun follows the merge (runbook 11.7). - `make test WITH_OPENMP=0` in the devcontainer: every suite passes. No tests added or removed: the change is internal, and the existing model-level results are the test (AGENTS.md). ## Also - Amalgam regenerated. Runbook (`contact-layers.md` 11.6): measles #73 merged, the NH-5 row, next steps. - **Wrappers:** nothing to port; they re-vendor this with NH-5b. 🤖 Generated with [Claude Code](https://claude.com/claude-code) 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.
A plan only, for review before any code:
several-diseases.md. It carries out decision 21 ofnatural-history.md(#370). No source changes.The design in short
diseasecolumn (never "the first one"); what is shaped by one disease's stages (a transition matrix, the agents' stages) needs the disease when there are several.Virus::strain(name); a virus built from scratch is a new disease. With several diseases, references to stages take.of(disease)and tools must have targets, or the run stops with an error that says how to fix it.get_transition_probability(Margin, disease, strain),get_agents_stages(disease),get_agents_statuses().Phases
For the reviewer: open questions (Section 11)
diseasecolumn also with one disease (proposed: always)?Also
contact-layers.md§11.6): the ports of Close the natural-history plan: quarantine exemption by tool name, plain diagrams, NH-5 next #370 (epiworldR Update docs site to use MrDocs #232, epiworldpy Rename member variables and add new ones #45, epiworldjs Fix lfmcmc print to expect size_t argument #31 merged; measles Adds test for bug about edgelist in run multiple (and fixes) #73 open) and the NH-5 row.AGENTS.mdpoints tonatural-history.mdandseveral-diseases.md.🤖 Generated with Claude Code