Package modelarium.agents
Class DefaultAgentGenerator
java.lang.Object
modelarium.agents.AgentGenerator
modelarium.agents.DefaultAgentGenerator
A basic implementation of
AgentGenerator that creates agents with
deep-copied base attribute sets and assigns them unique sequential names.
The agent names follow the format Agent_0, Agent_1, and so on.
This generator is suitable for simple models where agents share the same initial configuration.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongenerateAgent(ModelSettings modelSettings) Generates a single agent with a unique name and a deep copy of the base attribute set.Methods inherited from class modelarium.agents.AgentGenerator
generateAgents, getAgentsForEachCore
-
Constructor Details
-
DefaultAgentGenerator
public DefaultAgentGenerator()
-
-
Method Details
-
generateAgent
Generates a single agent with a unique name and a deep copy of the base attribute set.- Specified by:
generateAgentin classAgentGenerator- Parameters:
modelSettings- the model settings containing the base attribute set for agents- Returns:
- a new
Agentwith copied attributes and a unique name
-