This PR aims to introduce the notion of priority in the task allocation framework.
In the proposed method, abstract class rmf_task::Request has a new priority attribute which takes a boolean value (true if high priority). Then, in rmf_task::agv::TaskPlanner, the total cost of a node is multiplied by a priority_penalty (arbitrary large number) if the order of assignments is invalid. Two checks are performed inside valid_assignment_priority(): 1) Check if any agent is not assigned a high priority task while other agents are assigned more than one 2) Within the assignments for an agent, check if the sequence of assigned tasks contains a high priority task after a low priority one. The entry for this function is here. The proposed method works and some tests are included to prove the same.
Opening this PR as a draft to discuss this approach or receive advice on other approaches.
Once the suitable approach is confirmed, I can make changes to rmf_task_msgs to include a priority field and relevant changes to FleetUpdateHandle.cpp
This PR aims to introduce the notion of priority in the task allocation framework.
In the proposed method, abstract class
rmf_task::Request
has a newpriority
attribute which takes a boolean value (true
if high priority). Then, inrmf_task::agv::TaskPlanner
, the total cost of a node is multiplied by apriority_penalty
(arbitrary large number) if the order of assignments is invalid. Two checks are performed insidevalid_assignment_priority()
: 1) Check if any agent is not assigned a high priority task while other agents are assigned more than one 2) Within the assignments for an agent, check if the sequence of assigned tasks contains a high priority task after a low priority one. The entry for this function is here. The proposed method works and some tests are included to prove the same.Opening this PR as a draft to discuss this approach or receive advice on other approaches.
Once the suitable approach is confirmed, I can make changes to
rmf_task_msgs
to include a priority field and relevant changes toFleetUpdateHandle.cpp