| 1 Get pi of arrival task tiP; |
| 2 Let in U that satisfies task ti’ demands; |
| 3 foreachuj in do. |
| 4 Calculate the distance dij between task ti and UAV uj; |
| 5 Sort in an increasing order by the value of dij; |
| 6 Ucandidate ⟵ top α% UAV in ; |
| 7 AllocateTag ⟵ FALSE; FT ⟵ +∞; u ⟵ NULL; |
| 8 while!all uj∈Uhas been scanneddo. |
| 9 OverlapTag ⟵ TRUE; |
| 10 foreachuj in Ucandidatedo. |
| 11 ifuj’s assigned last task can be overlapped then. |
| 12 Calculate EFTj(tiP) in overlapping mode; |
| 13 ifEFTj(tiP)<FT & EFTj(tiP) <tdithen. |
| 14 FT ⟵ EFTj(tiP); |
| 15 u ⟵ uj; |
| 16 foreachuj in Ucandidatedo. |
| 17 Calculate EFTj(tiP) in non-overlapping mode; |
| 18 ifEFTj(tiP)<FT & EFTj(tiP) <tdithen. |
| 19 OverlapTag ⟵ FALSE; |
| 20 FT ⟵ EFTj(tiP); |
| 21 u ⟵ uj; |
| 22 ifu is not null & tiB can be scheduled & OverlapTag = TRUEthen. |
| 23 AllocateTag ⟵ TRUE; |
| 24 Assign tiP on UAV u in overlapping mode; |
| 25 generate backup copy tiB based on FT; |
| 26 schedule tiB; |
| 27 break; |
| 28 ifu is not null then. |
| 29 Assign tiP on UAV u in non-overlapping mode; |
| 30 AllocateTag ⟵ TRUE; |
| 31 ifeti > etthresholdthen. |
| 32 generate tiB based on FT; |
| 33 schedule tiB; |
| 34 break; |
| 35 Ucandidate ⟵ next top α% UAV in ; |
| 36 ifallocateTag ⟵ FALSEthen. |
| 37 Reject tiP; |