Package modelarium.entities.contexts
Class AgentSimulationContext
java.lang.Object
modelarium.entities.contexts.SimulationContext
modelarium.entities.contexts.AgentSimulationContext
- All Implemented Interfaces:
AgentContext,Context,EntityContext
Class for providing an agent and its attributes with access to relevant simulation resources.
This class is the concrete AgentContext implementation the model creates for each agent, combining the
shared behaviour of SimulationContext with agent-specific entity and environment access.
-
Method Summary
Modifier and TypeMethodDescriptionReturns the attribute currently being run on the owning agent.Returns the attribute set currently being run on the owning agent.Returns the agent this context belongs to.Methods inherited from class modelarium.entities.contexts.SimulationContext
addAgent, addAgents, addAgents, attribute, attributeSet, config, doesAgentExistInThisCore, entity, getAgent, getClock, getCurrentPopulationSize, getEnvironment, getFilteredAgents, getFilteredAgents, getRandom, killAgent, killAgent, killAgents, killAgents, localAgentSetMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface modelarium.entities.contexts.AgentContext
getEnvironmentMethods inherited from interface modelarium.entities.contexts.Context
doesAgentExistInThisCore, getAgent, getClock, getCurrentPopulationSize, getFilteredAgents, getFilteredAgents, getRandom, killAgent, killAgent, killAgents, killAgentsMethods inherited from interface modelarium.entities.contexts.EntityContext
addAgent, addAgents, addAgents
-
Method Details
-
getThisEntity
Returns the agent this context belongs to.- Specified by:
getThisEntityin interfaceAgentContext- Specified by:
getThisEntityin classSimulationContext- Returns:
- the owning
Agentinstance
-
getThisAttributeSet
Returns the attribute set currently being run on the owning agent.- Specified by:
getThisAttributeSetin interfaceAgentContext- Specified by:
getThisAttributeSetin classSimulationContext- Returns:
- the current
AgentAttributeSetinstance
-
getThisAttribute
Returns the attribute currently being run on the owning agent.- Specified by:
getThisAttributein interfaceAgentContext- Specified by:
getThisAttributein classSimulationContext- Returns:
- the current attribute instance
-