Parasol Planning Library (PPL)
|
#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< MPTask > | GetMotionTask () |
Return the corresponding motion task. More... | |
void | SetGroupMotionTask (std::shared_ptr< GroupTask > _motion) |
std::shared_ptr< GroupTask > | GetGroupMotionTask () |
Return the corresponding group motion task. More... | |
SemanticTask * | GetParent () |
Return the parent of this task in the decomposition tree. More... | |
void | SetParent (SemanticTask *_parent) |
std::unordered_set< SemanticTask * > | AddDependency (SemanticTask *_task, DependencyType _type) |
DependencyMap & | GetDependencies () |
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... | |
typedef std::unordered_map<DependencyType, std::unordered_set<SemanticTask*>, std::hash<int> > SemanticTask::DependencyMap |
SemanticTask::SemanticTask | ( | ) |
SemanticTask::SemanticTask | ( | MPProblem * | _problem, |
XMLNode & | _node, | ||
Decomposition * | _decomp | ||
) |
_problem | Owning MPProblem. |
_node | XML node containing task info. |
_decomp | Owning decomposition. |
SemanticTask::SemanticTask | ( | std::string | _label, |
SemanticTask * | _parent, | ||
Decomposition * | _decomp, | ||
SubtaskRelation | _relation, | ||
bool | _decomposable, | ||
bool | _fixedAssign, | ||
std::shared_ptr< MPTask > | _motionTask = nullptr |
||
) |
_label | Label for referencing task. |
_parent | Parent task in decomposition tree. |
_decomp | Owning decomposition. |
_relation | Relationship between subtasks. |
_decomposable | Flag indicating if this task can be further decomposed. |
_fixedAssign | Flag indicating if this task has a fixed assignment. |
_motionTask | Corresponding motion task for completing this task. |
SemanticTask::SemanticTask | ( | std::string | _label, |
SemanticTask * | _parent, | ||
Decomposition * | _decomp, | ||
SubtaskRelation | _relation, | ||
bool | _decomposable, | ||
bool | _fixedAssign, | ||
std::shared_ptr< GroupTask > | _groupMotionTask | ||
) |
_label | Label for referencing task. |
_parent | Parent task in decomposition tree. |
_decomp | Owning decomposition. |
_relation | Relationship between subtasks. |
_decomposable | Flag indicating if this task can be further decomposed. |
_fixedAssign | Flag indicating if this task has a fixed assignment. |
_groupMotionTask | Corresponding group motion task for completing this task. |
SemanticTask::SemanticTask | ( | SemanticTask * | _parent, |
Decomposition * | _decomp, | ||
std::shared_ptr< MPTask > | _motionTask, | ||
bool | _decomposable = true |
||
) |
_parent | Parent task in decomposition tree. |
_decomp | Owning decomposition. |
_motionTask | Corresponding motion task for completing this task. |
_decomposable | Flag indicating if this task can be further decomposed. |
SemanticTask::SemanticTask | ( | SemanticTask * | _parent, |
Decomposition * | _decomp, | ||
std::shared_ptr< GroupTask > | _groupMotionTask, | ||
bool | _decomposable = true |
||
) |
_parent | Parent task in decomposition tree. |
_decomp | Owning decomposition. |
_groupMotionTask | Corresponding group motion task for completing this task. |
_decomposable | Flag indicating if this task can be further decomposed. |
SemanticTask::SemanticTask | ( | std::string | _label, |
SemanticTask * | _parent, | ||
Decomposition * | _decomp, | ||
std::shared_ptr< MPTask > | _motionTask = nullptr , |
||
bool | _decomposable = true |
||
) |
_label | Label for referencing task. |
_parent | Parent task in decomposition tree. |
_decomp | Owning decomposition. |
_motionTask | Corresponding motion task for completing this task. |
_decomposable | Flag indicating if this task can be further decomposed. |
SemanticTask::SemanticTask | ( | std::string | _label, |
SemanticTask * | _parent, | ||
Decomposition * | _decomp, | ||
std::shared_ptr< GroupTask > | _groupMotionTask, | ||
bool | _decomposable = true |
||
) |
_label | Label for referencing task. |
_parent | Parent task in decomposition tree. |
_decomp | Owning decomposition. |
_groupMotionTask | Corresponding group motion task for completing this task. |
_decomposable | Flag indicating if this task can be further decomposed. |
SemanticTask::~SemanticTask | ( | ) |
std::unordered_set< SemanticTask * > SemanticTask::AddDependency | ( | SemanticTask * | _task, |
DependencyType | _type | ||
) |
Add new dependency on another task.
_task | The task this one is now dependent on. |
_type | The type of dependenc relation between this and _task. |
void SemanticTask::AddSubtask | ( | SemanticTask * | _task | ) |
Add an additional subtask. _task The new subtask.
std::unordered_map< SemanticTask::DependencyType, std::unordered_set< SemanticTask * >, std::hash< int > > & SemanticTask::GetDependencies | ( | ) |
Return the map of all dependencies this task has.
std::shared_ptr< GroupTask > SemanticTask::GetGroupMotionTask | ( | ) |
Return the corresponding group motion task.
std::string SemanticTask::GetLabel | ( | ) | const |
Return referencing label for this task.
std::shared_ptr< MPTask > SemanticTask::GetMotionTask | ( | ) |
Return the corresponding motion task.
SemanticTask * SemanticTask::GetParent | ( | ) |
Return the parent of this task in the decomposition tree.
SemanticTask::SubtaskRelation SemanticTask::GetSubtaskRelation | ( | ) |
Return the relationship between this task's subtasks.
std::vector< SemanticTask * > SemanticTask::GetSubtasks | ( | ) |
Return the set of all subtasks.
bool SemanticTask::IsDecomposable | ( | ) |
Indicates if this task can be decomposed.
bool SemanticTask::IsFixedAssignment | ( | ) |
Return flag for fixed assignment status.
std::vector< SemanticTask * > SemanticTask::SetDependencies | ( | ) |
Sets the dependencies of all the semantic tasks below this in the hierarchy,.
void SemanticTask::SetGroupMotionTask | ( | std::shared_ptr< GroupTask > | _motion | ) |
Set the group motion task corresponding to this task.
_motion | New corresponding group motion task. |
void SemanticTask::SetMotionTask | ( | std::shared_ptr< MPTask > | _motion | ) |
Set the motion task corresponding to this task.
_motion | New corresponding motion task. |
void SemanticTask::SetParent | ( | SemanticTask * | _parent | ) |
Set the parent of this task within the decomposition tree.
_parent | Parent task. |