Class 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.Cloneable
    Represents 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
      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)
      void CheckIntegrity​(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 exception
      java.lang.Object clone()  
      FAtiMA.Core.emotionalState.BaseEmotion GetElicitingEmotion()
      Get's the Action Tendency's eliciting emotion
      FAtiMA.Core.wellFormedNames.Name getName()
      Gets the Action's name
      java.util.ArrayList<FAtiMA.Core.conditions.Condition> GetPreconditions()  
      boolean isGrounded()  
      void MakeGround​(FAtiMA.Core.wellFormedNames.Substitution subst)  
      void MakeGround​(java.util.ArrayList<FAtiMA.Core.wellFormedNames.Substitution> bindings)  
      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
      void ReplaceUnboundVariables​(int variableID)  
      void SetElicitingEmotion​(FAtiMA.Core.emotionalState.BaseEmotion emotion)
      Sets the emotion that elicits this action tendency.
      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
      java.lang.String toString()  
      FAtiMA.Core.ValuedAction TriggerAction​(FAtiMA.Core.AgentModel am, java.util.Iterator<FAtiMA.Core.emotionalState.ActiveEmotion> emotionsIterator)  
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Constructor Detail

      • Action

        public Action​(FAtiMA.Core.wellFormedNames.Name name)
        Creates a new Action (Action Tendency)
        Parameters:
        name - - the name of the action
    • 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.UnknownSpeechActException
        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 exception
        Specified by:
        CheckIntegrity in interface FAtiMA.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:
        toString in class java.lang.Object
      • MakeGround

        public void MakeGround​(java.util.ArrayList<FAtiMA.Core.wellFormedNames.Substitution> bindings)
        Specified by:
        MakeGround in interface FAtiMA.Core.wellFormedNames.IGroundable
      • MakeGround

        public void MakeGround​(FAtiMA.Core.wellFormedNames.Substitution subst)
        Specified by:
        MakeGround in interface FAtiMA.Core.wellFormedNames.IGroundable
      • ReplaceUnboundVariables

        public void ReplaceUnboundVariables​(int variableID)
        Specified by:
        ReplaceUnboundVariables in interface FAtiMA.Core.wellFormedNames.IGroundable
      • isGrounded

        public boolean isGrounded()
        Specified by:
        isGrounded in interface FAtiMA.Core.wellFormedNames.IGroundable
      • clone

        public java.lang.Object clone()
        Overrides:
        clone in class java.lang.Object