Interface AgentContext

All Superinterfaces:
Context, EntityContext
All Known Implementing Classes:
AgentSimulationContext

public sealed interface AgentContext extends EntityContext permits AgentSimulationContext
Interface for providing an agent's attributes with access to their owning agent and the wider model.

This interface is the view of the simulation an agent's attributes are given, exposing the agent itself, the attribute set and attribute currently being run, and the model's environment.

  • Method Details

    • getThisEntity

      Agent getThisEntity()
      Returns the agent this context belongs to.
      Returns:
      the owning Agent instance
    • getThisAttributeSet

      AgentAttributeSet getThisAttributeSet()
      Returns the attribute set currently being run on the owning agent.
      Returns:
      the current AgentAttributeSet instance
    • getThisAttribute

      Returns the attribute currently being run on the owning agent.
      Returns:
      the current attribute instance
    • getEnvironment

      ReadOnlyEnvironment getEnvironment()
      Returns the model's environment.
      Returns:
      a read-only view of the model's Environment