Class SystemInfluenceRemoveAgentFromLevel

  • All Implemented Interfaces:
    IInfluence

    public class SystemInfluenceRemoveAgentFromLevel
    extends SystemInfluence
    The system influence sent to a level when the reaction of that level has to remove an agent from the level. This influence implies that the public and the private local state of the agent also have to be removed from the agent itself.

    Usage

    This influence is sent to the levels from which the agent is being removed, to exclude the local states of the agent from the dynamic state of these levels as well as from the specifications of the agent.

    Author:
    Yoann Kubera
    • Constructor Detail

      • SystemInfluenceRemoveAgentFromLevel

        public SystemInfluenceRemoveAgentFromLevel​(SimulationTimeStamp timeLowerBound,
                                                   SimulationTimeStamp timeUpperBound,
                                                   ILocalStateOfAgent4Engine publicLocalState)
        Builds a 'Remove agent from a level' system influence, removing an agent from 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 identifying both the agent and the level from which it has to be removed.
        Throws:
        IllegalArgumentException - If the public local state is null.
      • SystemInfluenceRemoveAgentFromLevel

        public SystemInfluenceRemoveAgentFromLevel​(SimulationTimeStamp timeLowerBound,
                                                   SimulationTimeStamp timeUpperBound,
                                                   IAgent4Engine agent,
                                                   LevelIdentifier levelId)
        Builds a 'Remove agent from a level' system influence, removing an agent from 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.
        agent - The agent being removed from the level having the identifier levelId.
        levelId - The identifier of the level from which the agent is removed.
    • Method Detail

      • getAgentLocalState

        public ILocalStateOfAgent4Engine getAgentLocalState()
        Gets the public local state of the agent being removed from the level.
        Returns:
        The public local state of the agent being removed from 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.