Interface IAgent4Engine

  • All Superinterfaces:
    IAgent
    All Known Implementing Classes:
    AbstractAgent, ExtendedAgent, PassiveAgent

    public interface IAgent4Engine
    extends IAgent
    Models an agent contained in the simulation, which specifications include engine optimization related methods.

    Usage

    This is the pragmatic interface of an agent instance, including implementation constraints. In practice, the methods defined in this interface are used by the simulation engine. Therefore, simulation designers will only manipulate methods from the IAgent parent interface.

    Author:
    Yoann Kubera
    See Also:
    IAgent
    • Method Detail

      • includeNewLevel

        void includeNewLevel​(LevelIdentifier levelIdentifier,
                             ILocalStateOfAgent publicLocalState,
                             ILocalStateOfAgent privateLocalState)
        Include a new level in the specification of this agent.

        If the agent already lies in the specified level when this method is called, then this method does nothing.

        Parameters:
        levelIdentifier - The identifier of the specified level.
        publicLocalState - The public local state of the agent in that level.
        privateLocalState - The private local state of the agent in that level.
      • excludeFromLevel

        void excludeFromLevel​(LevelIdentifier levelIdentifier)
        Removes a level from the specification of this agent.

        Usage and safety

        A call to this method is safe as long as:

        • It is made in the context of the reaction to the system influence removing the agent from the level identified by levelIdentifier (simulation engine).
        Parameters:
        levelIdentifier - The identifier of the level from which the agent has to be removed.
      • getPerceivedData

        Map<LevelIdentifier,​IPerceivedData> getPerceivedData()
        Gets the data that were lastly perceived by the agent, for all the levels where it lies.

        This method returns a map containing the identifier of a level "l" as a key, and the element pa(]tl,tl+dtl[, l) as a value, where ]tl,tl+dtl[ is the most recent transitory period of the level "l" during the call of this method.

        Returns:
        The data that were lastly perceived by the agent, for all the levels where it lies.
      • setPerceivedData

        void setPerceivedData​(IPerceivedData perceivedData)
        Sets the data that were lastly perceived by the agent from a specific level where it lies.

        This method defines the value of an item of the map containing the identifier of a level "l" as a key, and the element pa(]tl,tl+dtl[, l) as a value, where ]tl,tl+dtl[ is the most recent transitory period of the level "l" during the call of this method.

        Parameters:
        perceivedData - The data that were lastly perceived by the agent from the levelIdentifier level.
      • getPublicLocalStates

        Map<LevelIdentifier,​ILocalStateOfAgent> getPublicLocalStates()
        Gets the public local states of the agent.

        This method returns all the values φa+(t, l) or φa+(]t,t′[, l) ∈Φa+, where the value of ]t,t′[ is defined by the context in which this method is called.

        Usage and safety

        This method has to be used only in the simulation engine.

        Returns:
        The public local states of the agent.