Class ConsistentPublicLocalDynamicState

    • Constructor Detail

      • ConsistentPublicLocalDynamicState

        public ConsistentPublicLocalDynamicState​(SimulationTimeStamp time,
                                                 LevelIdentifier level)
        Builds a consistent public local state for a specific time stamp. This state still has to define the public local state of the environment, of the agents and the initial influences lying into the state dynamics, using the appropriate setting methods.
        Parameters:
        time - The time stamp for which the public local dynamic state is defined.
        level - The level of the public local dynamic state.
        Throws:
        IllegalArgumentException - If an argument is null.
    • Method Detail

      • getLevel

        public LevelIdentifier getLevel()
        Gets the level for which the public local dynamic state is defined.

        It returns the identifier of "l" in the notation δ(t, l) or δ(]t,t′[, l).

        Specified by:
        getLevel in interface IPublicLocalDynamicState
        Returns:
        The level for which the public local dynamic state is defined.
      • getTime

        public SimulationTimeStamp getTime()
        Gets the consistent time of this state.

        If this object models δ(t, l), then this method returns the value of "t".

        Returns:
        The consistent time of this state.
      • setTime

        public void setTime​(SimulationTimeStamp time)
        Sets the consistent time of this state.

        If this object models δ(t, l), then this method sets the value of "t".

        Parameters:
        time - The new consistent time of this state.
      • getPublicLocalStateOfEnvironment

        public ILocalStateOfEnvironment getPublicLocalStateOfEnvironment()
        Gets the public local state of the environment contained in this public local dynamic state.

        It returns the value φω(t, getLevel( )) or φω(]t,t′, getLevel( )).

        Specified by:
        getPublicLocalStateOfEnvironment in interface IPublicLocalDynamicState
        Returns:
        The public local state of the environment contained in this public local dynamic state.
      • getPublicLocalStateOfAgents

        public Set<ILocalStateOfAgent> getPublicLocalStateOfAgents()
        Gets the public local state of the agents lying in the level of this dynamic state.

        It returns the values φa(t, getLevel( )) (resp. φa(]t,t′, getLevel( ))) for each agent lying in the level identified by getLevel( ) at the time "t" (resp. during the transitory period ]t,t′[).

        This method has to ensure that two consecutive iterations over this set always return its items in the same order.

        Specified by:
        getPublicLocalStateOfAgents in interface IPublicLocalDynamicState
        Returns:
        The public local state of the agents lying in the level of this dynamic state.
      • getStateDynamics

        public Set<IInfluence> getStateDynamics()
        Gets the state dynamics of this public local dynamic state, i.e. the influences that are still active (being performed) when the level was in this state.

        It returns the value γ(t, getLevel( )) or γ(]t,t′[, getLevel( )).

        This method has to ensure that two consecutive iterations over this set always return its items in the same order.

        Specified by:
        getStateDynamics in interface IPublicLocalDynamicState
        Returns:
        The state dynamics of this public local dynamic state.
      • addPublicLocalStateOfAgent

        public void addPublicLocalStateOfAgent​(ILocalStateOfAgent publicLocalState)
        Adds the public local state of an agent to this public local dynamic state.

        This method does nothing if the public local state is already in this dynamic state.

        Specified by:
        addPublicLocalStateOfAgent in interface IModifiablePublicLocalDynamicState
        Parameters:
        publicLocalState - The added public local state of the agent.
      • setStateDynamicsAsCopyOf

        public void setStateDynamicsAsCopyOf​(Collection<IInfluence> toCopy)
        Sets the state dynamics of this public local dynamic state as a copy of the specified value.
        Specified by:
        setStateDynamicsAsCopyOf in interface IModifiablePublicLocalDynamicState
        Parameters:
        toCopy - The set of influences that have to be contained in the state dynamics of this local dynamic state. If null, this method sets the state dynamics of this dynamic state to an empty set.