## 4 Problem and Algorithm Description
### Algorithm Description
#### 4.2.2 PSA Process Description
The solution space based on Equations (10)-(12) is searched locally, and \(X_{g}\) is updated. 6. If the number of iterations is not \(N_{2}\), then Step (5) is repeated. 7. \(X_{g}\) is the deployment location of node \(s_{i}\). When \(s_{k}\) has calculated the deployment positions of its cluster-in nodes, each node moves to the corresponding position and broadcasts its new position. The other nodes whose deployment positions are not calculated update their \(S_{ND}\). The cluster head node \(s_{k}\) inquires its last-hop node (s\({}_{k}\)'s child node) whether the deployment positions of its cluster-in nodes have been calculated. If not, the last-hop node of \(s_{k}\) begins to calculate the deployment positions of its cluster-in nodes according to Stage (3) \"Optimizing the Position of the Cluster-in Nodes\" in Section 4.2.2. Otherwise, \(s_{k}\) transmits the information that the deployment positions of the node in its cluster have been calculated to its next-hop node (s\({}_{k}\)'s father node), and its next-hop node finds the next cluster where the deployment positions of cluster-in nodes need to be calculated, following the procedure described above in the current paragraph. When all of the clusters in the network have completed the process \"Optimizing the Position of the Cluster-in Nodes\", the algorithm ends. The following Algorithm 1 provides the main steps of the process of optimizing the position of the cluster-in nodes. ```
1:set of cluster-in nodes \(S_{c}(s_{k})\), original position of the cluster-in nodes \(P_{o}(s_{k})\). 2:deployed position of the cluster-in node \(P_{d}(s_{k})\). 3:Initialize \(P_{d}(s_{k})=zeros(\,1\,S_{c}(s_{k})\,|\,\text{, }3)\), \(S_{ND}\), \(S_{CD}=s_{k}\);
4:while \(S_{c}(s_{k})\
eq\varnothing\)
5: calculate the CRR of the node in \(S_{c}(s_{k})\);
6:\(s_{i}=\) the node with the minimum CRR;
7:\(p_{original}(s_{i})=[x_{original},y_{original},z_{original}]\) according to \(P_{o}(s_{k})\);
8: assuming that \(p_{deployed}(s_{i})=[x_{deployed,y_{deployed},z_{deployed}}]\) and build the fitness function;
9: initialize \(N_{1}\), \(N_{2}\), \(N_{p}\), \(G\), and the search range;
10: initialize the position \(X_{j}\) and the speed \(V_{j}\) of each pigeon individual \(j\);
11: calculate the \(fitness_{2}\) of each pigeon individual;
12:\(X_{g}=\arg\,min[fitness_{2}(X_{j})]\);
13: for \(N_{t}=1\) to \(N_{1}\) do
14: for i = 1 to \(N_{p}\) do
15: calculate \(V_{i}\) and \(X_{i}\) according to Equations (8) and (9);
16: end for
17: evaluate \(X_{i}\), and update \(X_{g}\);
18: end for
19: for \(N_{t}=1\) to \(N_{2}\) do
20: if \(N_{p}>1\)
21: rank the \(fitness_{2}\);
22:\(N_{p}=N_{p}/2\);
23: removed the half of pigeons with a lower \(fitness_{2}\);
24: calculate \(X_{c}\) according to Equation (11);
25: for i = 1 to \(N_{p}\) do (remaining pigeons)
26: calculate \(V_{i}\) and \(X_{i}\) according to Equation (12);
27: end if
28: end for
29: record \(X_{g}\) into \(P_{d}(s_{k})\), namely, update the value of corresponding row in \(P_{d}(s_{k})\);
30:\(S_{c}(s_{k})=S_{c}(s_{k})-s_{i}\);
31:\(S_{ND}=S_{ND}\cup s_{i}\);
32:\(S_{CD}=S_{CD}\cup s_{i}\);
33: end while;
```  
**Algorithm 1**Optimizing the Position of the Cluster-in Nodes.