论文名字:Path planning of multiple UAVs with online changing tasks by an ORPFOA algorithm.(基于ORPFOA算法的多无人机在线变任务路径规划。)
作者:Kun Li ∗, Fawei Ge, Ying Han ∗, Yi’an Wang, Wensu Xu
Algorithm 1 Determination of number of UAVs and initial task assignment
Require: The priority of the initial tasks is , = 1,2,3,..., the number of the initial task is , the number of tasks with the first priority is 1;【初始任务的优先级为a,a=1,2,3,…,初始任务的个数为n,具有第一优先级的任务的个数为n1;】
Ensure: The task sequence of each UAV and the number of UAVs.
1: Calculate the distances from all task points with the first priority to the start point, and then assign the task point closest to the start point to the task sequence for UAV1;【计算所有具有第一优先级的任务点到起始点的距离,然后将最接近起始点的任务点分配给UAV1的任务序列】
2: for = 1 : 1-1 do %Task assignment for the first priority.【第一优先级的任务分配。】
3: Choose the task point closest to the current task point with the same priority;【选择与当前任务点最接近的具有相同优先级的任务点】
4: if 1 < then
5: Assign this task point to the task sequence of UAV1;【将此任务点分配给UAV1的任务序列】
6: else
7: = + 1; %Obtain an initial .
8: Assign this task point to the task sequence of next UAV (UAV2) ;【将该任务点分配给下一个UAV(UAV2)的任务序列;】
9: end if
10: end for
11: for = 2 : do % All tasks with the th priority are assigned to the task sequences of UAVs.【所有优先级为a的任务都分配给无人机的任务序列】
12: if < then
13: Calculate the total distance of all task sequences, and then assign the rest task points to the groups of task sequences which have smaller total distances;【计算所有任务序列的总距离,然后将剩余的任务点分配给总距离较小的Nr组任务序列】
14: else
15: for = 1 : do
16: Calculate the distance between all task points in the task set with the current priority and the last task point in each task sequence, and assign the task to the task sequence with the smallest distance;【计算当前优先级任务集中所有任务点与每个任务序列中最后一个任务点的距离,并将任务分配给距离最小的任务序列;】
17: if <= then %All task points in the task sequence should be inspected within .【应在ta内检查任务序列中的所有任务点】
18: Assign current task points to the current UAV task sequence until a group of task assignment is completed; % At one time only a new task point is assigned to each UAV task sequence.【将当前任务点分配给当前无人机任务序列,直到一组任务分配完成;%一次只有一个新的任务点分配给每个无人机任务序列。】
19: else % No matter which UAV task sequence a task point with the current priority is assigned to, it cannot meet the required time.【无论当前优先级的任务点分配给哪个UAV任务序列,都不能满足所需时间。】
20: Choose a new UAV to complete this task;
21: = + 1;
22: end if
23: end for
24: end if
25: end for