Class SystemInfluenceAddAgentToLevel

  • All Implemented Interfaces:
    IInfluence

    public class SystemInfluenceAddAgentToLevel
    extends SystemInfluence
    The system influence sent to a level when the reaction of that level has to include an agent to the level. This influence implies that a public and a private local state have to be added to that agent.

    Usage

    This influence is sent to the levels where the agent is being added, to include the local states of the agent into the dynamic state of these levels as well as in the specifications of the agent.

    Author:
    Yoann Kubera
    • Constructor Detail

      • SystemInfluenceAddAgentToLevel

        public SystemInfluenceAddAgentToLevel​(SimulationTimeStamp timeLowerBound,
                                              SimulationTimeStamp timeUpperBound,
                                              ILocalStateOfAgent publicLocalState,
                                              ILocalStateOfAgent privateLocalState)
        Builds an 'Add agent to a level' system influence, adding an agent to the dynamic state of a specific level during the next reaction of that level.
        Parameters:
        timeLowerBound - The lower bound of the transitory period during which this influence was created.
        timeUpperBound - The upper bound of the transitory period during which this influence was created.
        publicLocalState - The public local state to add to the agent (and to the dynamic state of the level).
        privateLocalState - The private local state to add to the agent (and to the dynamic state of the level).
        Throws:
        IllegalArgumentException - If the public local state is null.
    • Method Detail

      • getPublicLocalState

        public ILocalStateOfAgent4Engine getPublicLocalState()
        Gets the public local state to add to the agent (and to the dynamic state of the level).
        Returns:
        The public local state to add to the agent (and to the dynamic state of the level).
      • getPrivateLocalState

        public ILocalStateOfAgent4Engine getPrivateLocalState()
        Gets the private local state to add to the agent (and to the dynamic state of the level).
        Returns:
        The private local state to add to the agent (and to the dynamic state of the level).
      • toString

        public String toString()
        Uses the category, the target level and the owner of the public local state of the influence to build a printable version of this object.
        Overrides:
        toString in class AbstractInfluence
        Returns:
        The concatenation of the category, the target level and the added owner of the public local state of the influence.