Package modelarium.agents
Class Agent
java.lang.Object
modelarium.ModelElement
modelarium.agents.Agent
- All Implemented Interfaces:
DeepCopyable<ModelElement>
Represents an agent in the agent-based model.
An agent is a simulation entity with a unique name and a collection of attributes that define its behaviour and internal state. The agent's `run()` method delegates to its attribute set, allowing attribute-driven logic to control execution.
-
Constructor Summary
ConstructorsConstructorDescriptionAgent(String name, AttributeSetCollection attributeSets) Constructs an agent with the given name and attribute set collection. -
Method Summary
Methods inherited from class modelarium.ModelElement
getAttributeSetCollection, getModelElementAccessor, getName, setModelElementAccessor, setup
-
Constructor Details
-
Agent
Constructs an agent with the given name and attribute set collection.- Parameters:
name- the unique name of the agentattributeSets- the attribute set defining the agent's internal state and behaviour
-
-
Method Details
-
run
public void run()Executes one simulation step for this agent by invoking the `run()` method of its attribute set collection.This method is called once per tick during the model execution.
- Specified by:
runin classModelElement
-
deepCopy
-