Expand description
Core traits and types for the Henad simulation engine.
authoringholds the five model traits, one per topology and backend, and the primitives their kernels call.params,viewandactionhold the descriptors a model declares for its parameters, its stats and its one-off actions.modelholdsSimState, the interface the runner drives.exploreplans sweeps and searches without an engine, andexportwrites a run’s results.provenanceidentifies the build of each crate and the source of each model.
A program depends on the henad facade instead. It re-exports these items under one module tree.
The authoring guide explains each trait.
Re-exports§
pub use authoring::model::field::Extent;
Modules§
- action
- One-off steps a model offers the user, run between ticks.
- authoring
- The model authoring API.
- explore
- Building blocks for parameter sweeps over a model.
- export
- Writers of a run’s stat series and final state, and a writer and reader of comma-separated values (CSV) fields.
- grid
- The double-buffered
Grid2Dthat holds a grid model’s cells. - helpers
- Builders for parameter descriptors and stat entries, parameter value readers, and
fmt_bytes. - metadata
- Model metadata the engine derives from a model’s declarations.
- model
- The
SimStateinterface the runner drives. - network
- A dynamic graph represented using CSR-like rows of neighbours, with an edge list.
- params
- Parameter descriptors, the values they describe, and the
ParamStorea running state keeps the values in. - provenance
- Identity of compiled crates and the source of each model.
- send_
sync SendandSyncbounds that relax on wasm with atomics.- spatial_
hash - The counting-sort
SpatialHashthat agents use to find their neighbours, and theHashGridcell geometry both backends share. - topology
- Display layers a model presents, and the neighbourhood a grid rule reads.
- view
- Views a state passes to the renderer, and the stat values and history the UI charts.
Macros§
- actions
- Declares a model’s actions and their indices in one place.
- buffers
- Declares a model’s storage buffers and their indices in one place.
- build_
info - Returns the
BuildInfoof the crate the macro expands in. - params
- Declares a model’s parameters and their indices in one place.