Scheduling

Mesa models advance in discrete steps. Each step, every agent's behaviors run once. Loom supports the default Mesa random activation schedule.

Step Execution

When the model steps:

  1. Mesa shuffles agents into random order
  2. Each agent's step() method runs all its behaviors
  3. Data collectors record metrics
  4. The visualization updates

Lifecycle Nodes

Mesa-specific nodes for managing the simulation lifecycle:

  • Spawn Agent — Create a new agent during the simulation (not just at init)
  • Remove Self — Remove the current agent from the simulation

Step Order

Within a single agent's step, behaviors execute in the order they appear in the archetype's behavior list, top to bottom.