Skip to main content

Module standard

Module standard 

Source
Expand description

Discrete-time standard model.

StandardModel is the primary model type, mirroring Julia Agents.jl StandardABM. Each tick:

  1. The scheduler produces an ordered list of agent IDs.
  2. For each agent, the agent_step function is called with a StepContext.
  3. Deferred actions (add/remove) are applied after each agent step.
  4. The model_step function is called once (if provided).
  5. Time advances by 1.

The agents_first flag controls whether agent steps run before or after the model step (default: agents first).

§Determinism

StandardModel is replayable for a fixed seed when all of the following are held constant:

  • the same crate version and user step code
  • the same initial agents and properties
  • the same scheduler semantics
  • the same store-dependent ID enumeration behavior where relevant
  • the same sequence of deferred insert/remove actions

In practice:

Structs§

StandardModel
Discrete-time agent-based model.

Traits§

HasAgentIds
Trait for types that can provide a snapshot of current agent IDs.

Type Aliases§

AgentStepFn
Type alias for the boxed agent step function.