## 3 Implementation of pdABC for TT-WSN Relay Node Deployment
### Introduction of pdABC Algorithm  
#### 3.2.1 Search Equation Based on Problem Dimension and Fitness  
When using Equation (7) in the ABC algorithm, \(x_{i}\) is randomly selected. This results in ABC having strong global search capability, poor local search capability, and slow convergence speed [27]. To solve this problem, a new Artificial Bee Colony algorithm, GABC, has been proposed in the literature [27]. The search equation of the algorithm is provided below:  
\[v_{ij}=x_{ij}+\phi_{ij}(x_{ij}-x_{kj})+\varphi_{ij}(y_{j}-x_{ij}) \tag{9}\]  
where \(\varphi_{ij}\) is a random number between [0, C], C is a non-negative constant, and \(y_{j}\) is the \(j\)th component of the global optimal solution. The search equation enhances the local search ability of the algorithm to an extent without affecting its global search ability. According to the general optimization process, the algorithm requires a strong global search ability in the early stage of optimization to ensure that the region where the optimal solution is located can be detected, as well as a strong local search ability in the later stagein order to converge quickly. It can be seen from Equation (9) that the randomness of \(\varphi_{ij}\) further improves the convergence speed of the GABC algorithm [28]. In addition, in the process of testing other ABC variants [28; 29; 30], it is often apparent that different optimization strategies only perform better on some benchmark functions. Therefore, it is necessary to redesign the search equation to ensure that it can better balance the exploration and development capabilities of the algorithm, thereby improving its adaptability to different problems. To achieve the above purpose, we propose the pdABC algorithm for the following search equation:  
\[v_{ij}=x_{ij}+\phi_{ij}\cdot f_{g}\cdot(x_{ij}-x_{kj})+\mathrm{C}\cdot f_{ best}^{l}\cdot(y_{j}-x_{ij}) \tag{10}\]  
where \(f_{g}\) is a variable used to balance the global search and local search of the algorithm, and is defined specifically in the equation below:  
\[f_{g}=(1-l)^{1/D} \tag{11}\]  
where \(D\) is the dimension of the problem and \(l\) is a linearly varying parameter, which is defined as follows:  
\[l=Curitr/\mathrm{Maxitr} \tag{12}\]  
where \(\mathrm{Maxitr}\) is the maximum number of iterations of the algorithm and \(Curitr\) is the number of iterations where the algorithm is currently located. The part \(f_{best}^{l}\) is used to adjust the search speed of the algorithm elastically in order to adapt the algorithm to different problems, as expressed in the equation below:  
\[f_{best}^{l}=(1+e^{-(fitness_{i}/fitness_{\min})})^{l} \tag{13}\]  
where \(fitness_{i}\) is the fitness of individual \(i\) and \(fitness_{\min}\) is the minimal fitness. It can be noticed that \(l\) belongs to [0, 1] due to Equation (12) gradually approaching \(1\) as the iterations increase, while \(f_{best}^{l}\) gradually becomes bigger. This means that the second part in Equation (10) has an increasing impact with increasing iterations. The exploitation ability of the algorithm is gradually increased, speeding up the convergence of the algorithm. In addition, the introduction of the fitness values serves to adjust for different problems. It is worth noting that the fitness value in this work refers to the network lifetime. We introduce \(fitness_{\min}\), which means the current best lifetime. Through the ratio of \(fitness_{i}\) to \(fitness_{\min}\), the value in the \(f_{best}^{l}\) is greatly reduced to meet the needs of practical purposes. In summary, we are able to find that with this part of the equation the algorithm tends to converge faster when the number of iterations increases or the lifetime acquired by a particular bee is larger. It can be seen from Equation (10) that increased \(l\) leads to the decrease of \(f_{g}\); the increase of \(f_{best}^{l}\) means that the algorithm has a strong global search ability in its early stage,which is attenuated in the later stage, and its local search ability is enhanced to accelerate its convergence.