Skip to main content
. 2019 May 29;19(11):2461. doi: 10.3390/s19112461
Algorithm 1 A heuristic for min-max TDHTSP
1: W1=W2=0.5;
2: Determine a heterogeneous spanning forest using the proposed primal-dual heuristic.
3: for k=1,2 do
4:  Let the connected targets reachable from the depot be a partition and label it as Pk.
5: end for
6: For k=1,2, derive TourCostk and Tourk for rk within Pk (using an existing routing algorithm).
7: Gmax(TourCostk)
8: if TourCost1TourCost2 then
9: while TourCost1TourCost2 do
10:   W1W1+ϵ;W21W1
11:   Redetermine a target assignment using the proposed primal-dual heuristic and obtain the partitions Pk.
12:   for k=1,2 do
13:    Derive TourCostk and Tourk within Pk.
14:   end for
15:   if Tour is infeasible then
16:    break, {comment: W1×costij1>W2×costij2 for some (i,j)}
17:   else
18:    Gmax(TourCostk)
19:    if G<G then
20:     GG
21:     for k=1,2 do
22:      TourCostkTourCostk;TourkTourk
23:     end for
24:    end if
25:   end if
26: end while
27: else
28: while TourCost1TourCost2 do
29:   W1W1ϵ;W21W1
30:   Redetermine a target assignment using the proposed primal-dual heuristic and obtain the partitions Pk.
31:   for k=1,2 do
32:    Derive TourCostk and Tourk within Pk.
33:   end for
34:   Gmax(TourCostk)
35:   if G<G then
36:    GG
37:    for k=1,2 do
38:     TourCostkTourCostk;TourkTourk
39:    end for
40:   end if
41: end while
42: end if
43: return Tourk,TourCostk