Reference 〉Class

MultiLevel( str breed, int id, Helipad model )

A class allowing multi-level agent-based models to be constructed, where the agents at one level are themselves full models with sub-agents. This class inherits all the methods and properties from both Agent and Helipad, which will not be reproduced here. See the Deme Selection sample model for an example.

To use a multi-level model, import the class and register it with model.addPrimitive().

Initialization Parameters

  • breed str, required

    The breed of the newly created agent.

  • id int, required

    A unique (at the top level) ID for the agent. Unexpected results may occur if non-unique ids are used.

  • model Helipad, required

    The model object of which this agent is a child.


  • dontStepAgents bool

    By default, all sub-agents are stepped each stage of the main model. This property can be set on a per-stage basis to prevent the sub-agents from being stepped. It is reset to False at the beginning of each stage.

    Initial value: False

Fatal error: Uncaught TypeError: Unsupported operand types: string - string in /home/dh_nzhxm7/ Stack trace: #0 [internal function]: {closure}(Object(WP_Comment), Object(WP_Comment)) #1 /home/dh_nzhxm7/ usort(Array, Object(Closure)) #2 /home/dh_nzhxm7/ {closure}(Array) #3 /home/dh_nzhxm7/ WP_Hook->apply_filters(Array, Array) #4 /home/dh_nzhxm7/ apply_filters('comments_array', Array, 453) #5 /home/dh_nzhxm7/ comments_template() #6 /home/dh_nzhxm7/ include('/home/dh_nzhxm7...') #7 /home/dh_nzhxm7/ require_once('/home/dh_nzhxm7...') #8 /home/dh_nzhxm7/ require('/home/dh_nzhxm7...') #9 {main} thrown in /home/dh_nzhxm7/ on line 200