Package edu.tufts.hrilab.action.manager
Class QueueExecutionManager
java.lang.Object
edu.tufts.hrilab.action.manager.ExecutionManager
edu.tufts.hrilab.action.manager.QueueExecutionManager
- All Implemented Interfaces:
ActionListener
-
Nested Class Summary
Nested classes/interfaces inherited from class edu.tufts.hrilab.action.manager.ExecutionManager
ExecutionManager.UpdateType
-
Field Summary
Fields inherited from class edu.tufts.hrilab.action.manager.ExecutionManager
agentHierarchy, agentTeams, goalComparator, goalsLock, pendingGoals, pendingGoalsLock, resourceLock, rootAgent
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
long
long
cancelCurrentGoal
(Symbol agent) boolean
cancelGoalInQueueIndex
(int index) Remove a pending goal from the queue based on index before it is transferred to activegetNextGoalPredicate
(Symbol agent) Returns the set of all Resources required to be available in order to execute the supplied goal.getSystemGoalPredicates
(Symbol actor) protected void
handleConflictingLowerPriorityGoal
(Goal g, Set<Resource> necessaryResources) Determines what is done to an added pending goal when resources are not available to execute the action.protected void
init
(StateMachine sm, RootContext rootContext, String priorityFile, Collection<String> groups) protected void
onActiveGoalUpdated
(Goal g, GoalStatus status, ExecutionManager.UpdateType updateType) Callback triggered when an active goal's status has been updated.long
long
resumeCurrentGoal
(Symbol agent) long
long
suspendCurrentGoal
(Symbol agent) Methods inherited from class edu.tufts.hrilab.action.manager.ExecutionManager
actionComplete, actionStarted, activateNextValidPendingGoal, activateValidPendingGoals, addAIListener, addPendingGoal, addPendingGoal, addPendingGoal, cancelGoal, checkIgnoreTentativeAccept, configPruningMechanism, consumedResources, createInstance, endFreeze, endFreeze, executeGoal, freeze, freeze, getActionStatus, getActiveGoal, getActiveGoals, getActiveGoals, getActiveGoalStatus, getAgentTeam, getAllGoals, getCurrentGoal, getCurrentGoals, getCurrentGoals, getDescendants, getGoal, getGoalFailConditions, getGoalStatus, getLockedResourceNames, getPastGoals, getPastGoals, getPendingGoals, getPriorityForGoal, getPriorityTierForGoal, getRelevantAgents, getResourceConflictingActiveGoals, getRootContext, getStateMachine, getUntypedSymbol, joinOnGoal, joinOnGoal, joinOnPendingGoal, notifyUIActiveGoalUpdated, notifyUIPendingGoalUpdated, onPendingGoalUpdated, pruneOldData, resourceConflictInPending, resumeGoal, shouldSupersede, showEditor, shutdown, stepComplete, stepStarted, submitGoal, submitGoal, submitGoal, submitGoal, submitGoal, submitGoal, submitGoal, submitGoal, submitGoal, submitGoal, submitGoalContext, supersedeGoals, suspendGoal, transferGoalToActive, transferGoalToPastGoals
-
Constructor Details
-
QueueExecutionManager
public QueueExecutionManager()
-
-
Method Details
-
init
protected void init(StateMachine sm, RootContext rootContext, String priorityFile, Collection<String> groups) - Overrides:
init
in classExecutionManager
-
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 classExecutionManager
- Parameters:
g
- the goal whose status has been updatedstatus
- the new statusupdateType
- indicates whether the active goal was newly added, already existed, or removed
-
handleConflictingLowerPriorityGoal
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 classExecutionManager
- Parameters:
g
- the goal that was addednecessaryResources
- the required resources which are unavailable
-
getRequiredResourcesForGoal
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 classExecutionManager
-
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
-
suspendCurrentGoal
public long suspendCurrentGoal() -
suspendCurrentGoal
-
resumeCurrentGoal
public long resumeCurrentGoal() -
resumeCurrentGoal
-
cancelAllActiveGoals
public void cancelAllActiveGoals() -
getPendingGoalsPredicates
-
getSystemGoalPredicates
-
getNextGoalPredicate
-
getNextGoalPredicate
-