Reference 〉Hook

agentStep( Agent agent, Helipad model, int stage )

Runs when the model activates an agent. The main logic of an agent-based model should be hooked here.

This hook generalizes to [primitive]Step, e.g. the step function of an agent with primitive 'bank' would be hooked with bankStep. To hook the step function of agents of all primitives, use baseAgentStep.

Required Parameters

  • agent Agent

    The agent being activated.

  • model Helipad

    The model object.

  • stage int

    The current stage of the model. For single-stage models, this parameter will always pass 1.

Notes and Examples

  1. Contribute a Note

    Your email address will not be published. Required fields are marked *

    You may use limited HTML for formatting. Please embed blocks of code in <pre><code> </code></pre> tags.