camdl
Compartmental Model Description Language
camdl is a language and toolkit for stochastic compartmental models of epidemics. You write a .camdl file that says what the compartments are (for example susceptible, infected and recovered), how individuals move between them and how fast. The compiler checks the file and expands it into a flat model description, which camdl then simulates and fits to data.
Most guides and reference pages here are the same text the binary carries: camdl docs <topic> prints them offline, matched to the installed version. The tutorials are website-only, because they show the real output of each command, regenerated from the current code every time the site is built.
About these docs. Much of this documentation was drafted with an AI model and is being revised by hand. In the tutorials, every command was run when the site was built, and the output shown is what camdl printed. The guides, concepts and reference pages are prose checked against the code, and can be wrong. If something is unclear, contradicts what camdl does, or looks wrong, please open an issue.
camdl by exampleThe language, one construct at a time. Fitting the boarding-school outbreakFourteen days of influenza counts, fitted and read. The fit workflowFrom a model and data to a checked posterior. Language specificationThe normative reference for the DSL. Dimensions and stratificationAge, place and disease stage, expanded by the compiler. Diagnosing a fitWhat to do when a fit will not behave. CheatsheetEvery DSL form on one page.