|
Algorithm 7 Dynamic Event Handler |
Input:-
i: Index of the UAV that detected a dynamic event.
: UAVs’ information, including assigned task lists (a), capacity loads (L), and velocities (v).
: Information about the dynamic event.
Output:
|
-
1:
if lidarReading == Detecting a new Task then
-
2:
Newly detected task(s) by
-
3:
Assign to idle UAVs if available; otherwise, invoke Algorithm 8 for reassignment.
()
-
4:
end if
-
5:
if lidarReading == UAV failure then
-
6:
Unperformed tasks from
-
7:
Remove from U
-
8:
Assign to idle UAVs if available; otherwise, invoke Algorithm 8 for reassignment.
()
-
9:
end if
-
10:
if lidarReading == UAV idleness then ▹
-
11:
if Unassigned or newly detected tasks exist then
-
12:
Assign available tasks to .
-
13:
else if All tasks are assigned but some UAVs are overloaded then
-
14:
assists the most loaded UAV in the same cluster.
-
15:
else
-
16:
Direct to assist the nearest uncovered cluster.
-
17:
end if
-
18:
end if
|