Class PassiveAgent
- java.lang.Object
-
- fr.univ_artois.lgi2a.similar.microkernel.libs.abstractimpl.AbstractAgent
-
- fr.univ_artois.lgi2a.similar.microkernel.libs.generic.PassiveAgent
-
- All Implemented Interfaces:
IAgent,IAgent4Engine
public class PassiveAgent extends AbstractAgent
Models an agent doing nothing in the simulation, i.e. having a perception, global state revision and decision process doing nothing and producing no influences.- Author:
- Yoann Kubera
-
-
Constructor Summary
Constructors Constructor Description PassiveAgent(AgentCategory category)Creates a bare instance of an agent, using a specific category.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiddecide(LevelIdentifier levelId, SimulationTimeStamp timeLowerBound, SimulationTimeStamp timeUpperBound, IGlobalState globalState, ILocalStateOfAgent publicLocalState, ILocalStateOfAgent privateLocalState, IPerceivedData perceivedData, InfluencesMap producedInfluences)Models a decision model doing nothing.IPerceivedDataperceive(LevelIdentifier level, SimulationTimeStamp timeLowerBound, SimulationTimeStamp timeUpperBound, Map<LevelIdentifier,ILocalStateOfAgent> publicLocalStates, ILocalStateOfAgent privateLocalState, IPublicDynamicStateMap dynamicStates)Models a perception model perceiving nothing.voidreviseGlobalState(SimulationTimeStamp timeLowerBound, SimulationTimeStamp timeUpperBound, Map<LevelIdentifier,IPerceivedData> perceivedData, IGlobalState globalState)Models a global state revision model doing nothing.-
Methods inherited from class fr.univ_artois.lgi2a.similar.microkernel.libs.abstractimpl.AbstractAgent
excludeFromLevel, getCategory, getGlobalState, getLevels, getPerceivedData, getPrivateLocalState, getPublicLocalState, getPublicLocalStates, includeNewLevel, initializeGlobalState, setPerceivedData
-
-
-
-
Constructor Detail
-
PassiveAgent
public PassiveAgent(AgentCategory category)
Creates a bare instance of an agent, using a specific category. The agent has then to be initialized by calls to theAbstractAgent.initializeGlobalState(IGlobalState)andAbstractAgent.includeNewLevel(LevelIdentifier, ILocalStateOfAgent, ILocalStateOfAgent)methods.- Parameters:
category- The category of the agent.This value can be the name of this class, or any other string representation modeling the equivalence class of the agent.
Examples:
- Car
- Prey
- Water drop
- Throws:
IllegalArgumentException- if the argument isnull.
-
-
Method Detail
-
perceive
public IPerceivedData perceive(LevelIdentifier level, SimulationTimeStamp timeLowerBound, SimulationTimeStamp timeUpperBound, Map<LevelIdentifier,ILocalStateOfAgent> publicLocalStates, ILocalStateOfAgent privateLocalState, IPublicDynamicStateMap dynamicStates)
Models a perception model perceiving nothing.- 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 bylevelfrom 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 bylevelfrom 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 levellevel. 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[. - See Also:
IAgent.perceive(LevelIdentifier, SimulationTimeStamp, SimulationTimeStamp, Map, ILocalStateOfAgent, IPublicDynamicStateMap)
-
reviseGlobalState
public void reviseGlobalState(SimulationTimeStamp timeLowerBound, SimulationTimeStamp timeUpperBound, Map<LevelIdentifier,IPerceivedData> perceivedData, IGlobalState globalState)
Models a global state revision model doing nothing.- 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.- See Also:
IAgent.reviseGlobalState(SimulationTimeStamp, SimulationTimeStamp, Map, IGlobalState)
-
decide
public void decide(LevelIdentifier levelId, SimulationTimeStamp timeLowerBound, SimulationTimeStamp timeUpperBound, IGlobalState globalState, ILocalStateOfAgent publicLocalState, ILocalStateOfAgent privateLocalState, IPerceivedData perceivedData, InfluencesMap producedInfluences)
Models a decision model doing nothing.- 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 bylevelIdand its perceptible levels.producedInfluences- The map where the influences resulting from the decisions are stored.- See Also:
IAgent.decide(LevelIdentifier, SimulationTimeStamp, SimulationTimeStamp, IGlobalState, ILocalStateOfAgent, ILocalStateOfAgent, IPerceivedData, InfluencesMap)
-
-