Reference 〉 Class

Primitive( )

Stores data related to agent primitives. Do not instantiate directly; instead, use Primitives.add() (and see that page for details on primitives). Most of the properties of the Primitive object correspond to arguments of that function.

Object Properties

  • class_ Class

    The class used to instantiate the primitive object. Should subclass baseAgent.

  • plural str

    Stores the plural name of the primitive. Generated by appending 's' to the name unless otherwise specified in Primitives.add().

  • priority int

    The execution order of the primitive in relation to the others during the model step. Lower numbers step first.

  • order str|list[str]

    The order in which the agents within the primitive should be stepped, if different from the global agent ordering specified in model.order. Can take the same values, namely 'linear', ''random', 'match', and 'match-n', or a list of strings corresponding to the stages of the model.

  • breeds Breeds{str:Breed}

    The Breeds container, an interface for adding, storing, and removing Breed objects.

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.