Package FAtiMA.Core

Class ActionLibrary

java.lang.Object
FAtiMA.Core.ActionLibrary
All Implemented Interfaces:
Serializable

public class ActionLibrary extends Object implements Serializable
Author:
Joao Dias Class that stores the STRIPS definition of the domain actions
See Also:
  • Constructor Details

    • ActionLibrary

      public ActionLibrary()
  • Method Details

    • addAction

      public void addAction(Step action)
    • checkIntegrity

      Checks the integrity of the Planner operators/Steps/actions. For instance it checks if a operator references a SpeechAct not defined, or if it uses a unbound variable (in effects or preconditions) not used in the operator's name
      Parameters:
      val - - the IntegrityValidator used to detect problems
      Throws:
      UnspecifiedVariableException - - thrown when the operator uses a unbound variable in the effects or preconditions without using the same variable in the step's name
      UnknownSpeechActException - - thrown when the operator references a SpeechAct not defined
    • getAction

      public Step getAction(int id, Name actionName)
    • getAction

      public Step getAction(String name)
      Gets the operator that corresponds to the given name
      Parameters:
      name - - the name of the step to get
      Returns:
      the searched step if it is found, null otherwise
    • getActions

      public ArrayList<Step> getActions()
    • LoadActionsFile

      public void LoadActionsFile(String xmlFile, AgentModel am) throws ActionsParsingException
      Throws:
      ActionsParsingException