Reference 〉 Class
funcStore

Breeds(modelHelipad, primitivestr)

A dict-like container class for storing Breed objects.

Because breeds are registered on a per-primitive basis, model.addBreed() can be used instead of Breeds.add(), with the primitive specified in the function signature if more than one primitive is registered.

Initialization Parameters

  • model Helipad, required

    The model object.

  • primitive str, required

    The primitive described by the Breeds object.

Methods

Click a method name for more detailed documentation.

  • add( name, color )

    Registers an agent breed, useful for heterogeneity within agent primitives.

    This function is aliased by Agents.addBreed() for convenience, if there exists only one primitive.

  • clear( )

    Clears all added data from the container.

  • remove( name, fname, removeall )

    Removes data stored at a certain key.

Object Properties

  • primitive str

    The primitive described by the Breeds object.

Static Properties

  • multi bool

    Whether the dict values should store a function, or a list of functions. This is a static property and should be changed only by subclassing funcStore.

    Initial value: False

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.