Skip to main content
. 2023 Sep 20;23(18):7980. doi: 10.3390/s23187980
Algorithm 3 Bidding Strategy Based on Route Distance
Input: FTLun, WTLun, Plan, Um, CU, Udispatch, nd
Output: updated Plan, WTLun
1 Um sends FTLun, Plan to every UAV of CU
2 If Pm does not meet the constraints in Section 2.2.5
3   Um  removes the targets with time window from Pm  into WTLun
4 End if
5 Um calculates the distance of every route point to each target in FTLun, gets DTm
6 For Ui in CU do (Parallel)
7  If Pi does not meet the constraints in Section 2.2.5
8       Ui  removes the targets with time window from Pi  into WTi
9     End if
10     Ui  calculates the distance of every route point to each target in FTLun , gets DTi
11     Ui  sends DTi , WTi  to Um
12 End for
13 Um puts the targets in all received WTi into WTLun
14 Um processes all DTi, gets Assign
15 k = 1
16 While FTLun ≠ ∅ and k≤nd do
17  For j in range 1 to nftl do
18 Assign FTLun[j] to Assign[j][k]
19 End for
20   Um gets the assigned task list ASTLk and sends ALki to Ui (ALkm handled by Um)
21  For Ui in Udispatch do (Parallel)
22 For Tj in ALki do
23   Ui get BPij, mdci of inserting Tj into Pi by single-target insertion method
24  If mdci<104
25      Pi=BPij , delete Tj  from ALki
26   End if
27 End for
28 Ui sends ALki to Um
29   End for
30   k=k+1
31   Um  put the targets in all ALki  into FTLun
32 End while
33 If  FTLun=∅
34   All tasks without time window have been assigned successfully
35 Else
36      Tasks in FTLun failed to be assigned