## 2 Rescue Process of TPM for SRP
### Dividing the PDTs into Multiple Clusters by K-Means\({}^{*}\)  
Assuming that the position of the PDTs at the initial moment, \(T_{0}\), could be collected, the movement of the PDTs between \(T_{0}\) and a short time, \(\Delta T\), after \(T_{0}\), was along a straight  
Figure 2: Four examples of average trajectory prediction over 24 h.  
line. Then, based on the arrival time of the amphibious aircraft, the drift position of the PDTs at \(T_{0}+T_{arrive}\) could be obtained with the initial position by Equations (1) and (2).  
After determining the probable drift trajectory of the PDTs, the arrival time of the amphibious aircraft was calculated. Then, the lifeboat which was on the amphibious aircraft was sent out to rescue the PDTs after the amphibious aircraft landed. The lifeboat was used for rescuing and transferring the PDTs to the amphibious aircraft. Considering that the PDTs had different positions, and considering the limitation of rescue capability, it was necessary to determine where to land. In order to reduce the rescue time and increase the rescue performance of the amphibious aircraft, k-means* was used to divide the location of the PDTs in this study. Different from the typical k-means clustering algorithm [42; 43; 44], the k-means* clustering algorithm could adjust the optimal number of clustering through iteration based on the rescue capability of the amphibious aircraft as well as that of the lifeboat. Based on k-means*, the optimal number of clustered PDTs could be automatically obtained after iterative optimization.  
The detailed optimization process of the k-means* clustering algorithm is shown as follows:  
Step 1: give \(k_{cluster}\) as follows. Based on the maximum rescue capability of the amphibious aircraft, \(A_{num}\), the lifeboat voyage, \(SL_{max}\), means the maximum distance it can travel without returning to the amphibious aircraft for resupply. The maximum rescue capability of the lifeboat, \(S_{mn}\), means the maximum number of the PDTs carried, and the number of PDTs is \(N_{input}\):  
\[k_{cluster}=\left[\frac{N_{input}[n]}{A_{num}}\right] \tag{4}\]  
Step 2: randomly select \(k_{cluster}\) points as initial centers.  
Step 3: calculate the distance to each center \(k_{cluster}\) for each PDT in turn, and classify the PDTs to the nearest center \(k_{cluster}\).  
Step 4: calculate the new center of each cluster using the mean value method.  
Step 5: if the position of the center changes, return to Step 3, otherwise, continue to Step 6.  
Step 6: output the maximum distance \(maxdis[cluster]\) of each PDT from the center of each cluster. If the maximum of \(maxdis[cluster]\) is less than \(SL_{max}/S_{mn}\), continue to Step 7, otherwise, assign \(k_{cluster}+1\) to and return to Step 2.  
Step 7: output the position of the cluster centroids, \(C[cluster]\), the number of the PDTs, \(C_{num}\), and the position, \(C_{location}\), for each category.  
The flowchart of k-means is shown in Figure 3. As seen in Figure 3, the detailed process of k-means* is given. The pseudo code of k-means* is shown in Appendix A. In addition, Figure 4 shows the results of the clustering of the PDTs by k-means*. The number of the PDTs is 40 in Figure 4 (left) and 65 in Figure 4 (right).