1 #ifndef PPL_SEMANTIC_TASK_H_
2 #define PPL_SEMANTIC_TASK_H_
7 #include <unordered_map>
8 #include <unordered_set>
33 typedef std::unordered_map<DependencyType, std::unordered_set<SemanticTask*>,
56 std::shared_ptr<MPTask> _motionTask =
nullptr);
68 std::shared_ptr<GroupTask> _groupMotionTask);
75 std::shared_ptr<MPTask> _motionTask,
bool _decomposable=
true);
83 std::shared_ptr<GroupTask> _groupMotionTask,
bool _decomposable=
true);
91 std::shared_ptr<MPTask> _motionTask =
nullptr,
bool _decomposable=
true);
100 std::shared_ptr<GroupTask> _groupMotionTask,
bool _decomposable=
true);
182 std::shared_ptr<MPTask> m_motionTask;
185 std::shared_ptr<GroupTask> m_groupMotionTask;
188 bool m_fixedAssignment{
false};
191 bool m_decomposable{
true};
194 std::vector<SemanticTask*> m_subtasks;
Definition: Decomposition.h:9
Definition: MPProblem.h:34
Definition: SemanticTask.h:13
std::shared_ptr< GroupTask > GetGroupMotionTask()
Return the corresponding group motion task.
Definition: SemanticTask.cpp:284
void SetParent(SemanticTask *_parent)
Definition: SemanticTask.cpp:296
bool IsFixedAssignment()
Return flag for fixed assignment status.
Definition: SemanticTask.cpp:317
SemanticTask * GetParent()
Return the parent of this task in the decomposition tree.
Definition: SemanticTask.cpp:290
void SetGroupMotionTask(std::shared_ptr< GroupTask > _motion)
Definition: SemanticTask.cpp:278
std::unordered_set< SemanticTask * > AddDependency(SemanticTask *_task, DependencyType _type)
Definition: SemanticTask.cpp:302
std::shared_ptr< MPTask > GetMotionTask()
Return the corresponding motion task.
Definition: SemanticTask.cpp:272
SubtaskRelation GetSubtaskRelation()
Return the relationship between this task's subtasks.
Definition: SemanticTask.cpp:335
bool IsDecomposable()
Indicates if this task can be decomposed.
Definition: SemanticTask.cpp:260
~SemanticTask()
Definition: SemanticTask.cpp:164
void AddSubtask(SemanticTask *_task)
Definition: SemanticTask.cpp:323
std::vector< SemanticTask * > SetDependencies()
Sets the dependencies of all the semantic tasks below this in the hierarchy,.
Definition: SemanticTask.cpp:211
std::unordered_map< DependencyType, std::unordered_set< SemanticTask * >, std::hash< int > > DependencyMap
Definition: SemanticTask.h:34
DependencyType
Definition: SemanticTask.h:25
@ Initiation
Task A must be complete to start task B.
Definition: SemanticTask.h:27
@ Asynchronous
Task A and task B must be start simultaneously.
Definition: SemanticTask.h:29
@ None
TODO::Might be the same as none?
Definition: SemanticTask.h:30
@ Synchronous
Task A must be started to start task B.
Definition: SemanticTask.h:28
@ Completion
Definition: SemanticTask.h:26
void SetMotionTask(std::shared_ptr< MPTask > _motion)
Definition: SemanticTask.cpp:266
std::string GetLabel() const
Return referencing label for this task.
Definition: SemanticTask.cpp:205
SemanticTask()
Definition: SemanticTask.cpp:11
SubtaskRelation
Definition: SemanticTask.h:20
@ AND
Any subtask can be complete to satisfy this task.
Definition: SemanticTask.h:22
@ XOR
Definition: SemanticTask.h:21
DependencyMap & GetDependencies()
Return the map of all dependencies this task has.
Definition: SemanticTask.cpp:311
std::vector< SemanticTask * > GetSubtasks()
Return the set of all subtasks.
Definition: SemanticTask.cpp:329