## 4 Proposed Method
### Coverage Hole Repair Based on Mobile Node Redeployment
#### 4.2.2 Calculate the Number of Mobile Sensors Required
```
Input:\(M,E\) Output:\(D_{T},E_{R}^{i}\)
1: Check the coordinates of the repair location
2:for each \(m_{j}\in M\)do
3: Calculate overlap coverage \(O_{j}\)
4:if\(O_{j}>O_{j+1}\)then
5: Calculate the distance between nodes, \(d_{ij}=dis\Big{(}s_{i},m_{j}\Big{)}\)
6:if\(d_{ij}<d_{i(j+1)}\)then
7: Calculate the remaining energy of the sensor
8:if\(E_{R}^{i}\geq 0.5E\)then
9: Move sensor \(m_{j}\)
10: Sum up the total distance \(D_{T}\)
11: Output \(D_{T}\)
```

**Algorithm 4** Redeploying mobile sensors

After scheduling the mobile sensors to a new location, mark all redeployed mobile sensors as immovable stationary sensors. If there are still coverage holes in the network, execute the proposed algorithm again for a new iteration until there are no available mobile sensors. It is worth noting that if there are dead nodes in the network, these nodes will no longer send data to the base station. The locations of these nodes will be considered as coverage holes, and the base station will once again execute coverage hole repair algorithms based on mobile node redeployment. First the MEP is searched for; then, it is judged whether there are available mobile nodes; and, finally, nodes are scheduled to repair holes. ### Time Complexity Analysis

Time complexity is an important performance index of algorithms. The time complexity of our proposed method consists of four components. In the rotation stationary sensor phase, the complexity of IPSO is \(O(T_{\max}*P^{2})\), where \(T_{\max}\) is the maximum number of iterations and \(P\) is the number of populations. The number of iterations required for the IPSO algorithm to converge is related to the population size. In our study, the number of population particles was set to 30 and the algorithm converged after 50 iterations. ISSA is similar to IPSO, with computational complexity mainly concentrated in the search phase. The complexity of updating positions for all individuals in the population is \(O(\max(n))\). Assuming that all individuals reach the maximum number of iterations, the overall complexity of ISSA is \(O(T_{\max}*\max(n)*n)\). When the number of sparrows in the ISSA algorithm is set to 30, the algorithm reaches convergence after 50 iterations. When calculating the number

Figure 4: Mobile node redeployment. of moving sensors, we determine it according to the length of the gap between sensors, so its time complexity is \(O(n)\). In the redeployment phase, it approximates a bipartite graph matching problem with a time complexity of \(O(n^{3})\). Therefore, the total time complexity of the proposed method is \(O(T_{\max}*P^{2})+O(T_{\max}*\max(n)*n)+O(n^{3})\), which is approximately equal to \(O(n^{3})\). In the phases of calculating the number of mobile sensors and redeployment, due to the small scale of the problem, fewer iterations are required. Based on the convergence of IPSO and ISSA, it can be concluded that the algorithm proposed in this paper achieves convergence with 50 iterations. ## 5 Simulation Result

In this section, we conduct various types of simulation experiments to verify the effectiveness and superiority of the proposed method. Simulation experiments were performed with different numbers of sensors in different ROI sizes. All experiments were conducted on the MATLAB platform under the Windows 10 system. The position information of the sensors required for the experiment is determined by advanced positioning algorithms. The message transmission between sensors and base stations refers to the WALL routing algorithm in reference [36]. This routing algorithm has the characteristics of a balanced load and low energy consumption. Because positioning and routing are not the focus of this article, we choose to only provide a brief introduction, without discussing them in detail. In order to avoid errors and improve the persuasiveness of experimental data, we conducted repeated experiments. Each experiment was run 100 times, and the average value was taken as the final experimental result.