## 4 Problem and Algorithm Description
### Algorithm Description
#### 4.2.2 PSA Process Description
Finally, \(s_{k}\) regards the ratio of the deployment energy consumption to the increase in the network coverage as the fitness function \(\mathit{fitness_{2}}\) on the premise that \(s_{i}\) can connect with at least one node in \(S_{\mathit{CD}}\) after \(s_{i}\) moves to the deployment position. The fitness functions \(\mathit{fitness_{2}}\) is formulated as follows:  
\[\min\quad\mathit{fitness_{2}}=\left\{ \begin{array}{ll}\frac{d\big{(}p_{ \mathit{Explylogt}}(s_{i}).\mathit{Period}(s_{i})\big{)}}{\gamma(p_{\mathit{ original}}(s_{i}))-\gamma\big{(}p_{\mathit{Adapylogt}}(s_{i})\big{)}}&\text{denominator values greater than 0}\\ \text{inf}&\text{else}\end{array} \right. \tag{19}\]  
Figure 4: Flowchart of network layering and clustering. where the numerator is the moving distance and the denominator is the network coverage gain when the node moves from the original position to the current deployed position. The constraint conditions of this fitness function are as follows:  
The node \(s_{i}\) connects with at least one node in \(S_{CD}\) after it moves to the deployment position:  
\[\sum_{s_{j}\in S_{CD}}bool\left(s_{i},s_{j}\right)\geq 1 \tag{20}\]  
where  
\[bool\left(s_{i},s_{j}\right)=\left\{ \begin{array}{ll}1&d\left(p_{deployd}(s _{i}),p_{deployd}(s_{j})\right)\leq R_{c}^{\max}\\ 0&d\left(p_{deployd}(s_{i}),p_{deployd}(s_{j})\right)>R_{c}^{\max}\end{array} \right. \tag{21}\]  
The deployment position of \(s_{i}\) is in the target area:  
\[ \begin{array}{l}c_{border}\leq x_{deployd}(s_{i})\leq x(\text{sink})-c_{border}\\ c_{border}\leq y_{deployd}(s_{i})\leq y(\text{sink})-c_{border}\\ c_{border}\leq z_{deployd}(s_{i})\leq z(\text{sink})-c_{border}\end{array}  \tag{22}\]  
(3) Solving the Fitness Function by PSOA  
For the selection of the optimal deployment position of a cluster-in node, the pigeon swarm is initialized on the basis of the fitness function and solution space. A description of pigeon swarm initialization follows. Rule for initializing the pigeon swarm: Each pigeon represents a possible deployment position of the current calculating node, namely, the coordinates of the position in the target area. Thus, the initial position of each pigeon \(j\) can be expressed as \(X_{j}=[x\),\(y\),\(z]\). The solution space of the deployment location may consist of multiple intersecting spheres. Thus, the same amount of pigeons is produced in every sphere because pigeons search for the solution space thoroughly to obtain the optimal solution as much as possible. On the assumption that \(\mid S_{CD}\mid\) nodes whose deployment positions have been calculated in the cluster of \(s_{k}\), the rule for producing the initial population is as follows: \(N_{p}/\mid S_{CD}\mid\) random points (i.e., the position of the pigeon) are produced in each sphere, with each node in \(S_{CD}\) as its center and \(1.25\)\(R_{c}^{\max}\) as its radius; all the random points form the initial population of the pigeon. The initial speed of the pigeon is derived randomly in the interval \(0-V_{max}\). The steps to derive the optimal solution by PSOA are as follows:  
1. The pigeons are initialized. The \(N_{p}\) initial positions of the pigeons are determined using the rule for initializing the pigeon swarm. 2. The fitness of each individual is calculated. The fitness values are sorted according to the following rule: the fitness values of the individuals beyond the solution space are less than those in the solution space. The individual with the minimum fitness is selected as the global optimal solution, \(X_{g}\), in the current iteration. When several individuals have the same minimum fitness, the individual with the minimum distance to the sink node is selected as \(X_{g}\). 3. The position of the pigeon is updated using Equations (8) and (9), the fitness value is calculated, and \(X_{g}\) is updated according to Step (2). 4. If the value of the current iteration is not equal to the maximum number of iterations, \(N_{1}\), then Step (3) is repeated. 5.