Reference 〉Function

Helipad.addBreed( str name, str color, str prim = None )

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

Parameters

  • name str, required

    The name of the breed.

  • color str, required

    A hex value (without the initial #) representing the color that ought to represent the breed in the control panel and graphs.

  • prim str, optional

    The agent primitive which this breed will be a type of. NOTE: This parameter is required if more than one primitive has been registered, in which case addBreed() will raise a KeyError if prim is not specified. Otherwise it is optional.

    Default value: None

Return Value Breed

The newly created Breed object.

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.

History