Class DefaultAgentGenerator

java.lang.Object
modelarium.agents.AgentGenerator
modelarium.agents.DefaultAgentGenerator

public class DefaultAgentGenerator extends AgentGenerator
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 Details

    • DefaultAgentGenerator

      public DefaultAgentGenerator()
  • Method Details

    • generateAgent

      public Agent generateAgent(ModelSettings modelSettings)
      Generates a single agent with a unique name and a deep copy of the base attribute set.
      Specified by:
      generateAgent in class AgentGenerator
      Parameters:
      modelSettings - the model settings containing the base attribute set for agents
      Returns:
      a new Agent with copied attributes and a unique name