Class ExtendedAgent

    • Method Detail

      • getGlobalStateRevisionModel

        public IAgtGlobalStateRevisionModel getGlobalStateRevisionModel()
        Gets the revision model of the global state of the agent.
        Returns:
        The revision model of the global state of the agent.
        Throws:
        NoSuchElementException - If no global state revision model is defined for that agent.
      • specifyGlobalStateRevisionModel

        public void specifyGlobalStateRevisionModel​(IAgtGlobalStateRevisionModel revisionMdl)
        Defines the revision model of the global state of the agent.
        Parameters:
        revisionMdl - The revision model of the global state of the agent.
        Throws:
        IllegalArgumentException - If the argument is null.
      • getPerceptionModel

        public IAgtPerceptionModel getPerceptionModel​(LevelIdentifier levelId)
        Gets the perception model of the agent from that level.
        Parameters:
        levelId - The identifier of the level.
        Returns:
        The perception model of the agent from that level.
        Throws:
        NoSuchElementException - If no perception model is defined for that agent for the level identified by levelId.
      • getDecisionModel

        public IAgtDecisionModel getDecisionModel​(LevelIdentifier levelId)
        Gets the decision model of the agent from that level.
        Parameters:
        levelId - The identifier of the level.
        Returns:
        The decision model of the agent from that level.
        Throws:
        NoSuchElementException - If no decision model is defined for that agent for the level identified by levelId.
      • specifyBehaviorForLevel

        public void specifyBehaviorForLevel​(LevelIdentifier levelId,
                                            IAgtPerceptionModel perceptionMdl,
                                            IAgtDecisionModel decisionMdl)
        Defines the behavior of an agent from a specific level of the simulation.

        Note that this behavior will be used only if the agent is added to that level using the appropriate system influences (or if the agent initially lies in that level).

        Parameters:
        levelId - The identifier of the level for which a behavior is specified.
        perceptionMdl - The perception model of the agent from that level.
        decisionMdl - The decision model of the agent from that level.
        Throws:
        IllegalArgumentException - If an argument is null or has an inappropriate value.
      • removeBehaviorForLevel

        public void removeBehaviorForLevel​(LevelIdentifier levelId)
        Removes the behavior of the agent for the specified level.
        Parameters:
        levelId - The identifier of the level for which the behavior of the agent is removed.
      • perceive

        public IPerceivedData perceive​(LevelIdentifier level,
                                       SimulationTimeStamp timeLowerBound,
                                       SimulationTimeStamp timeUpperBound,
                                       Map<LevelIdentifier,​ILocalStateOfAgent> publicLocalStates,
                                       ILocalStateOfAgent privateLocalState,
                                       IPublicDynamicStateMap dynamicStates)
        Creates the data perceived by an agent located in a specific level.

        This method corresponds to the application perceptiona, ]t,t+dtl[, l of this agent.

        Parameters:
        level - The level from which perception is made (i.e. "l" in the notations).
        timeLowerBound - Is the lower bound of the transitory period of the level identified by level from which the perception is made by this agent (i.e. "t" in the notations).
        timeUpperBound - Is the upper bound of the transitory period of the level identified by level from which the perception is made by this agent (i.e. t+dtl in the notations).
        publicLocalStates - All the public local states of the agent.
        privateLocalState - The private local state of the agent in the level from which perception is made (i.e. φa-( t, level ) in the notations).
        dynamicStates - The dynamic state of the various levels that can be perceived from the level level. This value has previously been disambiguated by a heuristic defined in the simulation engine.
        Returns:
        The data being perceived by the agent from the level identified by level, for the transitory period ]timeLowerBound, timeUpperBound[.
      • reviseGlobalState

        public void reviseGlobalState​(SimulationTimeStamp timeLowerBound,
                                      SimulationTimeStamp timeUpperBound,
                                      Map<LevelIdentifier,​IPerceivedData> perceivedData,
                                      IGlobalState globalState)
        Revises the content of the global state of the agent, using the previous value of its global state and the data that were lastly perceived by the agent.

        This method corresponds to the application memoryReva, ]t,t+dt[ of this agent.

        As a side effect of this method call, the value μa( t ) of the argument globalState is updated to become μa(]t,t+dt[)

        Parameters:
        timeLowerBound - Is the lower bound of the transitory period for which the global state revision is made by this agent (i.e. "t" in the notations).
        timeUpperBound - Is the upper bound of the transitory period for which the global state revision is made by this agent (i.e. "t+dt" in the notations).
        perceivedData - The map containing the data that were lastly perceived from the various levels of the simulation.
        globalState - The previous value of the global state of the agent being updated by this method call.
      • decide

        public void decide​(LevelIdentifier levelId,
                           SimulationTimeStamp timeLowerBound,
                           SimulationTimeStamp timeUpperBound,
                           IGlobalState globalState,
                           ILocalStateOfAgent publicLocalState,
                           ILocalStateOfAgent privateLocalState,
                           IPerceivedData perceivedData,
                           InfluencesMap producedInfluences)
        Produces the influences resulting from the decisions of an agent from a specific level, for a specific transitory period.

        This method corresponds to the application decisiona, ]t,t+dtl[,l of this agent.

        Parameters:
        levelId - The identifier of the level from which the decision is made (i.e. "l" in the notations).
        timeLowerBound - Is the lower bound of the transitory period for which the decision is made by this agent (i.e. "t" in the notations).
        timeUpperBound - Is the upper bound of the transitory period for which the decision is made by this agent (i.e. "t+dt" in the notations).
        globalState - The revised global state of the agent when it made a decision (i.e. μa(t+dt) in the notations).
        publicLocalState - The public local state of the agent in the level from which decision is made (i.e. φa+( t, level ) in the notations).
        privateLocalState - The private local state of the agent in the level from which decision is made (i.e. φa-( t, level ) in the notations).
        perceivedData - The data that were perceived about the level identified by levelId and its perceptible levels.
        producedInfluences - The map where the influences resulting from the decisions are stored.