Struct AgentsConfig#

Struct Documentation#

struct AgentsConfig#

Configuration for creating an Agents

Public Functions

inline Count resolvedInitialAgentCount() const#

Get the number of initial Agent instances to be created at the beginning

inline Count resolvedGlobalAgentSlotCount() const#

Get the number of Agent slots

inline void assertValid() const#

Check whether the configuration is valid, throw an error if not valid

Public Members

RequiredConfig<EntityHandle> associatedPlacesHandle#

Handle of the Places associated with this Agents

RequiredConfig<std::variant<mass::span<const Index>, Count>> initialAgentsConfig#

Configuration of the initial Agent instances.

Can be either the number of initial instances or a span including the indices of the Place instances where each initial Agent instances should reside on.

std::optional<Count> globalAgentSlotCount#

The total number of Agent slots for storing the Agent instances

Must be larger than or equals to the result of resolvedGlobalAgentSlotCount()

If not provided, will automatically use 2 * resolvedInitialAgentCount()