Parasol Planning Library (PPL)
SemanticTask Class Reference

#include <SemanticTask.h>

Public Types

Local Types
enum  SubtaskRelation { XOR , AND }
 
enum  DependencyType {
  Completion , Initiation , Synchronous , Asynchronous ,
  None
}
 
typedef std::unordered_map< DependencyType, std::unordered_set< SemanticTask * >, std::hash< int > > DependencyMap
 

Public Member Functions

Construction
 SemanticTask ()
 
 SemanticTask (MPProblem *_problem, XMLNode &_node, Decomposition *_decomp)
 
 SemanticTask (std::string _label, SemanticTask *_parent, Decomposition *_decomp, SubtaskRelation _relation, bool _decomposable, bool _fixedAssign, std::shared_ptr< MPTask > _motionTask=nullptr)
 
 SemanticTask (std::string _label, SemanticTask *_parent, Decomposition *_decomp, SubtaskRelation _relation, bool _decomposable, bool _fixedAssign, std::shared_ptr< GroupTask > _groupMotionTask)
 
 SemanticTask (SemanticTask *_parent, Decomposition *_decomp, std::shared_ptr< MPTask > _motionTask, bool _decomposable=true)
 
 SemanticTask (SemanticTask *_parent, Decomposition *_decomp, std::shared_ptr< GroupTask > _groupMotionTask, bool _decomposable=true)
 
 SemanticTask (std::string _label, SemanticTask *_parent, Decomposition *_decomp, std::shared_ptr< MPTask > _motionTask=nullptr, bool _decomposable=true)
 
 SemanticTask (std::string _label, SemanticTask *_parent, Decomposition *_decomp, std::shared_ptr< GroupTask > _groupMotionTask, bool _decomposable=true)
 
 ~SemanticTask ()
 
Accessors
std::string GetLabel () const
 Return referencing label for this task. More...
 
std::vector< SemanticTask * > SetDependencies ()
 Sets the dependencies of all the semantic tasks below this in the hierarchy,. More...
 
bool IsDecomposable ()
 Indicates if this task can be decomposed. More...
 
void SetMotionTask (std::shared_ptr< MPTask > _motion)
 
std::shared_ptr< MPTaskGetMotionTask ()
 Return the corresponding motion task. More...
 
void SetGroupMotionTask (std::shared_ptr< GroupTask > _motion)
 
std::shared_ptr< GroupTaskGetGroupMotionTask ()
 Return the corresponding group motion task. More...
 
SemanticTaskGetParent ()
 Return the parent of this task in the decomposition tree. More...
 
void SetParent (SemanticTask *_parent)
 
std::unordered_set< SemanticTask * > AddDependency (SemanticTask *_task, DependencyType _type)
 
DependencyMapGetDependencies ()
 Return the map of all dependencies this task has. More...
 
bool IsFixedAssignment ()
 Return flag for fixed assignment status. More...
 
void AddSubtask (SemanticTask *_task)
 
std::vector< SemanticTask * > GetSubtasks ()
 Return the set of all subtasks. More...
 
SubtaskRelation GetSubtaskRelation ()
 Return the relationship between this task's subtasks. More...
 

Member Typedef Documentation

◆ DependencyMap

typedef std::unordered_map<DependencyType, std::unordered_set<SemanticTask*>, std::hash<int> > SemanticTask::DependencyMap

Member Enumeration Documentation

◆ DependencyType

Enumerator
Completion 
Initiation 

Task A must be complete to start task B.

Synchronous 

Task A must be started to start task B.

Asynchronous 

Task A and task B must be start simultaneously.

None 

TODO::Might be the same as none?

◆ SubtaskRelation

Enumerator
XOR 
AND 

Any subtask can be complete to satisfy this task.

All subtasks must be complete to satisfy this task.

Constructor & Destructor Documentation

◆ SemanticTask() [1/8]

SemanticTask::SemanticTask ( )

◆ SemanticTask() [2/8]

SemanticTask::SemanticTask ( MPProblem _problem,
XMLNode _node,
Decomposition _decomp 
)
Parameters
_problemOwning MPProblem.
_nodeXML node containing task info.
_decompOwning decomposition.

◆ SemanticTask() [3/8]

SemanticTask::SemanticTask ( std::string  _label,
SemanticTask _parent,
Decomposition _decomp,
SubtaskRelation  _relation,
bool  _decomposable,
bool  _fixedAssign,
std::shared_ptr< MPTask _motionTask = nullptr 
)
Parameters
_labelLabel for referencing task.
_parentParent task in decomposition tree.
_decompOwning decomposition.
_relationRelationship between subtasks.
_decomposableFlag indicating if this task can be further decomposed.
_fixedAssignFlag indicating if this task has a fixed assignment.
_motionTaskCorresponding motion task for completing this task.

◆ SemanticTask() [4/8]

SemanticTask::SemanticTask ( std::string  _label,
SemanticTask _parent,
Decomposition _decomp,
SubtaskRelation  _relation,
bool  _decomposable,
bool  _fixedAssign,
std::shared_ptr< GroupTask _groupMotionTask 
)
Parameters
_labelLabel for referencing task.
_parentParent task in decomposition tree.
_decompOwning decomposition.
_relationRelationship between subtasks.
_decomposableFlag indicating if this task can be further decomposed.
_fixedAssignFlag indicating if this task has a fixed assignment.
_groupMotionTaskCorresponding group motion task for completing this task.

◆ SemanticTask() [5/8]

SemanticTask::SemanticTask ( SemanticTask _parent,
Decomposition _decomp,
std::shared_ptr< MPTask _motionTask,
bool  _decomposable = true 
)
Parameters
_parentParent task in decomposition tree.
_decompOwning decomposition.
_motionTaskCorresponding motion task for completing this task.
_decomposableFlag indicating if this task can be further decomposed.

◆ SemanticTask() [6/8]

SemanticTask::SemanticTask ( SemanticTask _parent,
Decomposition _decomp,
std::shared_ptr< GroupTask _groupMotionTask,
bool  _decomposable = true 
)
Parameters
_parentParent task in decomposition tree.
_decompOwning decomposition.
_groupMotionTaskCorresponding group motion task for completing this task.
_decomposableFlag indicating if this task can be further decomposed.

◆ SemanticTask() [7/8]

SemanticTask::SemanticTask ( std::string  _label,
SemanticTask _parent,
Decomposition _decomp,
std::shared_ptr< MPTask _motionTask = nullptr,
bool  _decomposable = true 
)
Parameters
_labelLabel for referencing task.
_parentParent task in decomposition tree.
_decompOwning decomposition.
_motionTaskCorresponding motion task for completing this task.
_decomposableFlag indicating if this task can be further decomposed.

◆ SemanticTask() [8/8]

SemanticTask::SemanticTask ( std::string  _label,
SemanticTask _parent,
Decomposition _decomp,
std::shared_ptr< GroupTask _groupMotionTask,
bool  _decomposable = true 
)
Parameters
_labelLabel for referencing task.
_parentParent task in decomposition tree.
_decompOwning decomposition.
_groupMotionTaskCorresponding group motion task for completing this task.
_decomposableFlag indicating if this task can be further decomposed.

◆ ~SemanticTask()

SemanticTask::~SemanticTask ( )

Member Function Documentation

◆ AddDependency()

std::unordered_set< SemanticTask * > SemanticTask::AddDependency ( SemanticTask _task,
DependencyType  _type 
)

Add new dependency on another task.

Parameters
_taskThe task this one is now dependent on.
_typeThe type of dependenc relation between this and _task.

◆ AddSubtask()

void SemanticTask::AddSubtask ( SemanticTask _task)

Add an additional subtask. _task The new subtask.

◆ GetDependencies()

std::unordered_map< SemanticTask::DependencyType, std::unordered_set< SemanticTask * >, std::hash< int > > & SemanticTask::GetDependencies ( )

Return the map of all dependencies this task has.

◆ GetGroupMotionTask()

std::shared_ptr< GroupTask > SemanticTask::GetGroupMotionTask ( )

Return the corresponding group motion task.

◆ GetLabel()

std::string SemanticTask::GetLabel ( ) const

Return referencing label for this task.

◆ GetMotionTask()

std::shared_ptr< MPTask > SemanticTask::GetMotionTask ( )

Return the corresponding motion task.

◆ GetParent()

SemanticTask * SemanticTask::GetParent ( )

Return the parent of this task in the decomposition tree.

◆ GetSubtaskRelation()

SemanticTask::SubtaskRelation SemanticTask::GetSubtaskRelation ( )

Return the relationship between this task's subtasks.

◆ GetSubtasks()

std::vector< SemanticTask * > SemanticTask::GetSubtasks ( )

Return the set of all subtasks.

◆ IsDecomposable()

bool SemanticTask::IsDecomposable ( )

Indicates if this task can be decomposed.

◆ IsFixedAssignment()

bool SemanticTask::IsFixedAssignment ( )

Return flag for fixed assignment status.

◆ SetDependencies()

std::vector< SemanticTask * > SemanticTask::SetDependencies ( )

Sets the dependencies of all the semantic tasks below this in the hierarchy,.

◆ SetGroupMotionTask()

void SemanticTask::SetGroupMotionTask ( std::shared_ptr< GroupTask _motion)

Set the group motion task corresponding to this task.

Parameters
_motionNew corresponding group motion task.

◆ SetMotionTask()

void SemanticTask::SetMotionTask ( std::shared_ptr< MPTask _motion)

Set the motion task corresponding to this task.

Parameters
_motionNew corresponding motion task.

◆ SetParent()

void SemanticTask::SetParent ( SemanticTask _parent)

Set the parent of this task within the decomposition tree.

Parameters
_parentParent task.

The documentation for this class was generated from the following files: