Stores data related to agent primitives. Do not instantiate directly; instead, use model.addPrimitive()
. Most of the properties of the Primitive object correspond to arguments of that function.
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
model.addPrimitive()
.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 — dict{str:Breed}
A
dict
ofBreed
objects, storing data on the breeds of the primitive in question.breedParams — dict{str:Param}
A
dict
ofParam
objects, storing data on the per-breed parameters of the primitive in question.
Notes and Examples