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.

Properties

  • 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/helipad.dev/wp-content/themes/propeller/functions.php:200 Stack trace: #0 [internal function]: {closure}(Object(WP_Comment), Object(WP_Comment)) #1 /home/dh_nzhxm7/helipad.dev/wp-content/themes/propeller/functions.php(200): usort(Array, Object(Closure)) #2 /home/dh_nzhxm7/helipad.dev/wp-includes/class-wp-hook.php(294): {closure}(Array) #3 /home/dh_nzhxm7/helipad.dev/wp-includes/plugin.php(212): WP_Hook->apply_filters(Array, Array) #4 /home/dh_nzhxm7/helipad.dev/wp-includes/comment-template.php(1518): apply_filters('comments_array', Array, 453) #5 /home/dh_nzhxm7/helipad.dev/wp-content/themes/propeller/classref.php(153): comments_template() #6 /home/dh_nzhxm7/helipad.dev/wp-includes/template-loader.php(106): include('/home/dh_nzhxm7...') #7 /home/dh_nzhxm7/helipad.dev/wp-blog-header.php(19): require_once('/home/dh_nzhxm7...') #8 /home/dh_nzhxm7/helipad.dev/index.php(17): require('/home/dh_nzhxm7...') #9 {main} thrown in /home/dh_nzhxm7/helipad.dev/wp-content/themes/propeller/functions.php on line 200