Class AbstractLocalStateOfAgent

    • Constructor Detail

      • AbstractLocalStateOfAgent

        protected AbstractLocalStateOfAgent​(LevelIdentifier level,
                                            IAgent4Engine owner)
        Builds an initialized instance of this class.
        Parameters:
        level - The level for which this local state was defined.
        owner - The agent owning this local state.
    • Method Detail

      • getOwner

        public IAgent4Engine getOwner()
        Gets the owner of the local state, i.e. the agent which public (resp. private) local state at a specific level is this object.

        This method is defined for optimization purposes, since keeping an association between local states and agents within the simulation engine would be too memory consuming.

        Specified by:
        getOwner in interface ILocalStateOfAgent4Engine
        Returns:
        The owner of this state.
      • isOwnedBy

        public boolean isOwnedBy​(IAgent agent)
        Checks if an agent is the owner of a local state.
        Specified by:
        isOwnedBy in interface ILocalStateOfAgent
        Parameters:
        agent - The agent which ownership is checked.
        Returns:
        true if an agent is the owner of a local state.
      • getCategoryOfAgent

        public AgentCategory getCategoryOfAgent()
        Gets the category of the agent owning this local state.

        It returns the category of the agent "a" within the expression φ+a(t, l), φ-a(t, l) (public and private local state of an agent).

        Specified by:
        getCategoryOfAgent in interface ILocalStateOfAgent
        Returns:
        The category of the agent owning this local state.
        See Also:
        AgentCategory