Class AbstractLevel

  • All Implemented Interfaces:
    ILevel, ITimeModel
    Direct Known Subclasses:
    ExtendedLevel

    public abstract class AbstractLevel
    extends Object
    implements ILevel
    An abstract implementation of the ILevel interface, providing a default behavior to most methods.

    It also provides setters for the perception and the influence relation graph.

    Author:
    Yoann Kubera
    • Method Detail

      • getIdentifier

        public final LevelIdentifier getIdentifier()
        Gets the identifier of this level, as defined in the constructor of the level.
        Specified by:
        getIdentifier in interface ILevel
        Returns:
        The identifier of this level.
      • initializeStates

        public final void initializeStates​(ConsistentPublicLocalDynamicState lastConsistentState)
        Sets the initial value of the last consistent and the last transitory public state of the level.
        Parameters:
        lastConsistentState - The initial value of the last consistent state of this level.
      • getPerceptibleLevels

        public Set<LevelIdentifier> getPerceptibleLevels()
        Gets the levels that can be perceived by agents located in this level.

        It corresponds to the out neighborhood NP+( this )⊂𝔾P of the this level in the perception relation graph.

        Specified by:
        getPerceptibleLevels in interface ILevel
        Returns:
        The levels that can be perceived by agents located in this level.
      • addPerceptibleLevel

        public void addPerceptibleLevel​(LevelIdentifier perceptibleLevel)
        Adds a perceptible level by this level.
        Parameters:
        perceptibleLevel - The level becoming perceptible by this level.
        Throws:
        IllegalArgumentException - If the argument is null.
      • getInfluenceableLevels

        public Set<LevelIdentifier> getInfluenceableLevels()
        Gets the levels that can be influenced by agents located in this level.

        It corresponds to the out neighborhood NI+( this )⊂𝔾I of the this level in the perception relation graph.

        Specified by:
        getInfluenceableLevels in interface ILevel
        Returns:
        The levels that can be influenced by agents located in this level.
      • addInfluenceableLevel

        public void addInfluenceableLevel​(LevelIdentifier influenceableLevel)
        Adds a level to the levels that can be influenced by this level.
        Parameters:
        influenceableLevel - The level becoming influenceable by this level.
        Throws:
        IllegalArgumentException - If the argument is null.