agentpy
This module offers various data structures to create and manage groups of both agents and environments. Which structure best to use depends on the specific requirements of each model.
AgentList
is a list of agentpy objects with methods to select and manipulate its entries.AgentDList
is an ordered collection of agentpy objects, optimized for removing and looking up objects.AgentSet
is an unordered collection of agents that can access agent attributes.AgentIter
andAgentDListIter
are a list-like iterators over a selection of agentpy objects.AttrIter
is a list-like iterator over the attributes of each agent in a selection of agentpy objects.
All of these sequence classes can access and manipulate the methods and variables of their objects as an attribute of the container. For examples, see AgentList
.
AgentList
AgentDList
AgentSet
AgentIter
AgentDListIter
AttrIter