Class QueueExecutionManager

java.lang.Object
edu.tufts.hrilab.action.manager.ExecutionManager
edu.tufts.hrilab.action.manager.QueueExecutionManager
All Implemented Interfaces:
ActionListener

public class QueueExecutionManager extends ExecutionManager
  • Constructor Details

    • QueueExecutionManager

      public QueueExecutionManager()
  • Method Details

    • init

      protected void init(StateMachine sm, RootContext rootContext, String priorityFile, Collection<String> groups)
      Overrides:
      init in class ExecutionManager
    • onActiveGoalUpdated

      protected void onActiveGoalUpdated(Goal g, GoalStatus status, ExecutionManager.UpdateType updateType)
      Description copied from class: ExecutionManager
      Callback triggered when an active goal's status has been updated.
      Overrides:
      onActiveGoalUpdated in class ExecutionManager
      Parameters:
      g - the goal whose status has been updated
      status - the new status
      updateType - indicates whether the active goal was newly added, already existed, or removed
    • handleConflictingLowerPriorityGoal

      protected void handleConflictingLowerPriorityGoal(Goal g, Set<Resource> necessaryResources)
      Description copied from class: ExecutionManager
      Determines what is done to an added pending goal when resources are not available to execute the action.
      Overrides:
      handleConflictingLowerPriorityGoal in class ExecutionManager
      Parameters:
      g - the goal that was added
      necessaryResources - the required resources which are unavailable
    • getRequiredResourcesForGoal

      protected Set<Resource> getRequiredResourcesForGoal(Goal goal)
      Description copied from class: ExecutionManager
      Returns the set of all Resources required to be available in order to execute the supplied goal.
      Overrides:
      getRequiredResourcesForGoal in class ExecutionManager
    • cancelGoalInQueueIndex

      public boolean cancelGoalInQueueIndex(int index)
      Remove a pending goal from the queue based on index before it is transferred to active
    • cancelCurrentGoal

      public long cancelCurrentGoal()
    • cancelCurrentGoal

      public long cancelCurrentGoal(Symbol agent)
    • suspendCurrentGoal

      public long suspendCurrentGoal()
    • suspendCurrentGoal

      public long suspendCurrentGoal(Symbol agent)
    • resumeCurrentGoal

      public long resumeCurrentGoal()
    • resumeCurrentGoal

      public long resumeCurrentGoal(Symbol agent)
    • cancelAllActiveGoals

      public void cancelAllActiveGoals()
    • getPendingGoalsPredicates

      public List<Predicate> getPendingGoalsPredicates()
    • getSystemGoalPredicates

      public List<Predicate> getSystemGoalPredicates(Symbol actor)
    • getNextGoalPredicate

      public Predicate getNextGoalPredicate()
    • getNextGoalPredicate

      public Predicate getNextGoalPredicate(Symbol agent)