Package FAtiMA.ReactiveComponent
Class Action
- java.lang.Object
-
- FAtiMA.ReactiveComponent.Action
-
- All Implemented Interfaces:
FAtiMA.Core.IIntegrityTester,FAtiMA.Core.wellFormedNames.IGroundable,java.io.Serializable,java.lang.Cloneable
public class Action extends java.lang.Object implements FAtiMA.Core.IIntegrityTester, java.io.Serializable, FAtiMA.Core.wellFormedNames.IGroundable, java.lang.CloneableRepresents a Reactive Action Tendency- Author:
- Joao Dias
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description Action(FAtiMA.Core.wellFormedNames.Name name)Creates a new Action (Action Tendency)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidAddPreCondition(FAtiMA.Core.conditions.Condition cond)Adds a precondition to the ActionTendency (that must be verified in order for the action to be executed)voidCheckIntegrity(FAtiMA.Core.IntegrityValidator val)Checks the integrity of the Action Tendency, it checks if the action references a SpeechAct that is not defined, in that case it throws an exceptionjava.lang.Objectclone()FAtiMA.Core.emotionalState.BaseEmotionGetElicitingEmotion()Get's the Action Tendency's eliciting emotionFAtiMA.Core.wellFormedNames.NamegetName()Gets the Action's namejava.util.ArrayList<FAtiMA.Core.conditions.Condition>GetPreconditions()booleanisGrounded()voidMakeGround(FAtiMA.Core.wellFormedNames.Substitution subst)voidMakeGround(java.util.ArrayList<FAtiMA.Core.wellFormedNames.Substitution> bindings)voidReinforceAction(int value)Reinforces the likelihood of an action tendency to be activated, by lowering the minimum emotional intensity necessary to activate the AT by a given valuevoidReplaceUnboundVariables(int variableID)voidSetElicitingEmotion(FAtiMA.Core.emotionalState.BaseEmotion emotion)Sets the emotion that elicits this action tendency.voidSuppressAction(int value)Suppresses the likelihood of an action tendency to be activated, by increasing the minimum emotional intensity necessary to activate the AT by a given valuejava.lang.StringtoString()FAtiMA.Core.ValuedActionTriggerAction(FAtiMA.Core.AgentModel am, java.util.Iterator<FAtiMA.Core.emotionalState.ActiveEmotion> emotionsIterator)
-
-
-
Method Detail
-
getName
public FAtiMA.Core.wellFormedNames.Name getName()
Gets the Action's name- Returns:
- - the Name of the ActionTendency
-
GetElicitingEmotion
public FAtiMA.Core.emotionalState.BaseEmotion GetElicitingEmotion()
Get's the Action Tendency's eliciting emotion- Returns:
- the BaseEmotion that may trigger the Action Tendency
-
GetPreconditions
public java.util.ArrayList<FAtiMA.Core.conditions.Condition> GetPreconditions()
-
AddPreCondition
public void AddPreCondition(FAtiMA.Core.conditions.Condition cond)
Adds a precondition to the ActionTendency (that must be verified in order for the action to be executed)- Parameters:
cond- - the Condition to add as precondition
-
CheckIntegrity
public void CheckIntegrity(FAtiMA.Core.IntegrityValidator val) throws FAtiMA.Core.exceptions.UnknownSpeechActExceptionChecks the integrity of the Action Tendency, it checks if the action references a SpeechAct that is not defined, in that case it throws an exception- Specified by:
CheckIntegrityin interfaceFAtiMA.Core.IIntegrityTester- Throws:
FAtiMA.Core.exceptions.UnknownSpeechActException
-
SetElicitingEmotion
public void SetElicitingEmotion(FAtiMA.Core.emotionalState.BaseEmotion emotion)
Sets the emotion that elicits this action tendency. For example, the victim's action tendency to cry is elicited by a strong distress emotion- Parameters:
emotion- - the emotion that will elicit this action
-
ReinforceAction
public void ReinforceAction(int value)
Reinforces the likelihood of an action tendency to be activated, by lowering the minimum emotional intensity necessary to activate the AT by a given value- Parameters:
value- - the ammount to lower the minimum intensity
-
SuppressAction
public void SuppressAction(int value)
Suppresses the likelihood of an action tendency to be activated, by increasing the minimum emotional intensity necessary to activate the AT by a given value- Parameters:
value- - the ammount used to increase the minimum intensity
-
TriggerAction
public FAtiMA.Core.ValuedAction TriggerAction(FAtiMA.Core.AgentModel am, java.util.Iterator<FAtiMA.Core.emotionalState.ActiveEmotion> emotionsIterator)
-
toString
public java.lang.String toString()
- Overrides:
toStringin classjava.lang.Object
-
MakeGround
public void MakeGround(java.util.ArrayList<FAtiMA.Core.wellFormedNames.Substitution> bindings)
- Specified by:
MakeGroundin interfaceFAtiMA.Core.wellFormedNames.IGroundable
-
MakeGround
public void MakeGround(FAtiMA.Core.wellFormedNames.Substitution subst)
- Specified by:
MakeGroundin interfaceFAtiMA.Core.wellFormedNames.IGroundable
-
ReplaceUnboundVariables
public void ReplaceUnboundVariables(int variableID)
- Specified by:
ReplaceUnboundVariablesin interfaceFAtiMA.Core.wellFormedNames.IGroundable
-
isGrounded
public boolean isGrounded()
- Specified by:
isGroundedin interfaceFAtiMA.Core.wellFormedNames.IGroundable
-
clone
public java.lang.Object clone()
- Overrides:
clonein classjava.lang.Object
-
-