-
Notifications
You must be signed in to change notification settings - Fork 48
Developer Guide
Gustav Delius edited this page Aug 16, 2026
·
4 revisions
This guide provides an overview of mizer's internal architecture, design principles, and developer workflows.
-
MizerParams(S4): Central object representing the model specification. Modified via setter functions (setFishing(),setMetabolicRate(), etc.) that return new copies. -
MizerSim(S4): Holds simulation time-series results (n,n_pp,n_other,effort). -
S3 Methods on S4 Classes: Mizer deliberately registers methods for
MizerParamsandMizerSimas S3 methods (e.g.plot.MizerParams) rather thansetMethod(), to avoid promoting base generics to S4 generics session-wide. -
Two Quadrature Schemes:
second_order_wselects first-order boundary values vs second-order finite-volume bin averages. -
Gated Validation:
validParams()usesvalidation_key()fingerprinting to cache validation checks efficiently.
| Guide | Description |
|---|---|
| Array Wrapper Classes | S3 wrapper classes around rate arrays, slot[] <- value rules, and method outputs |
| Integrating over Size Grid | Bin averaging, sizeIntegral(), encounter kernels, and quadrature rules |
| Species Parameter Defaults | Ownership of parameter defaults (setter-owned vs central) and given_species_params
|
| Condition & Signal Handling | User notifications, info_level, signal_info(), and frozen parameter warnings |
| Documenting S3 Generics | Shared man pages, @usage NULL, @param ..., and avoiding codoc check errors |
| Upgrading Mizer Data | Class changes, new slots, updating upgradeParams(), and updating stored fixtures |
| Test Organisation | Naming conventions for test files, snapshots, and splitting files |
| Test Fixtures & Speed | Shared _small fixtures, parallel workers, and experimental test gating |
| Building Documentation & Website | Guide-article generation, llms.txt, _pkgdown.yml, and navbar syncing |