Class SystemInfluenceRemoveAgentFromLevel
- java.lang.Object
-
- fr.univ_artois.lgi2a.similar.microkernel.influences.AbstractInfluence
-
- fr.univ_artois.lgi2a.similar.microkernel.influences.SystemInfluence
-
- fr.univ_artois.lgi2a.similar.microkernel.influences.system.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 Summary
Constructors Constructor Description 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.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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ILocalStateOfAgent4Engine
getAgentLocalState()
Gets the public local state of the agent being removed from the level.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.-
Methods inherited from class fr.univ_artois.lgi2a.similar.microkernel.influences.SystemInfluence
isSystem
-
Methods inherited from class fr.univ_artois.lgi2a.similar.microkernel.influences.AbstractInfluence
getCategory, getTargetLevel, getTimeLowerBound, getTimeUpperBound
-
-
-
-
Field Detail
-
CATEGORY
public static final String CATEGORY
The category of this influence.- See Also:
- Constant Field Values
-
-
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 isnull
.
-
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 identifierlevelId
.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 classAbstractInfluence
- Returns:
- The concatenation of the category, the target level and the added owner of the public local state of the influence.
-
-