# Robust Clustering Routing Method for Wireless Sensor Networks Considering the Locust Search Scheme
## 3 The Locust Search (LS-II) Method
### Solitary Process  
Candidate solutions in the solitary process move in distinct trajectories examining promising areas of food sources (good solutions). During this process, search agents avoid concentrating on other elements. This mechanism is designed considering a model of attraction and repulsion forces undergone among solutions within the popula \begin{table}
\begin{tabular}{l l} \hline \hline
**Acronym** & **Meaning** \\ \hline WSNs & Wireless Sensor Networks \\ HWSNs & Heterogeneous Wireless Sensor Networks \\ CHs & Cluster Heads \\ CH & Cluster Head \\ BS & Base Station \\ LEACH & Low Energy Adaptive Clustering Hierarchy \\ SEP & Protocol \\ P-SEP & Stable Election Protocol \\ DEEC & Distributed Energy-Efficient Clustering \\ M-SEP & Modified Stable Election Protocol \\ EC-PSO & Energy Centers using Particle Swarm \\  & Optimization \\ GAEEC & Genetic-Algorithm-Based Energy-Efficient \\  & Clustering \\ VCH & Vice-CH-enabled \\ LS-II & Locust Search II \\ LS & Locust Search \\ DE & Differential Evolution \\ GA & Genetic Algorithms \\ PSO & Particle Swarm Optimization \\ ABC & Artificial Bee Colony \\ GSA & Gravitational Search Algorithm \\ GWO & Grey Wolf Optimizer \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Acronyms/abbreviations. tion **P**. Under such conditions, at each iteration \(t\), the resultant attraction and repulsions forces (called social force) experimented by a specific search agent \(\mathbf{x}_{i}\) is modeled by the following formulation:  
\[\mathbf{S}_{i}^{t}=\sum_{ \begin{array}{c}j=1\\ i\
eq j\end{array} }^{N}\mathbf{s}_{i,j}^{t} \tag{1}\]  
where \(\mathbf{s}_{i,j}^{t}\) represents the pairwise attraction-repulsion between the candidate solutions \(\mathbf{x}_{i}\) and \(\mathbf{x}_{j}\) which is modeled by the following expression:  
\[\mathbf{s}_{i,j}^{t}=\rho\big{(}\mathbf{x}_{i},\mathbf{x}_{j}\big{)}\,L\big{(} r_{i,j}\big{)}\mathbf{h}_{i,j}+rand(-1,1) \tag{2}\]  
where the function \(\rho\big{(}\mathbf{x}_{i},\mathbf{x}_{j}\big{)}\) denotes the dominance value between \(\mathbf{x}_{i}\) and \(\mathbf{x}_{j}\). The value \(L\big{(}r_{i,j}\big{)}\) corresponds to the social factor while \(r_{i,j}\) symbolized the Euclidian distance \(\|\mathbf{x}_{i}-\mathbf{x}_{j}\|\). The vector is the unit vector from \(\mathbf{x}_{i}\) to \(\mathbf{x}_{j}\). \[\mathbf{h}_{i,j}=\frac{\mathbf{x}_{i}-\mathbf{x}_{j}}{\|\mathbf{x}_{i}- \mathbf{x}_{j}\|} \tag{3}\]  
\(rand(-1,1)\) symbolizes a random vector of dimension \(n\) whose values are uniformly distributed. The social factor \(L\big{(}r_{i,j}\big{)}\) is defined by the following relationship:  
\[L\big{(}r_{i,j}\big{)}=Fe^{-r_{i,j}/G}-e^{-r_{i,j}} \tag{4}\]  
where the elements \(F\) and \(G\) represent the attraction-repulsion factor and influence size, respectively. The function \(\rho\big{(}\mathbf{x}_{i},\mathbf{x}_{j}\big{)}\) expresses the relative dominance between search agents. To implement \(\rho\big{(}\mathbf{x}_{i},\mathbf{x}_{i}\big{)}\), each search agent \(\mathbf{x}_{i}\) is ranked with a number within the interval \([0,N-1]\). The best candidate solution is associated with the rank 0 while the worst element with the rank \(N-1\). The concepts of best or worst are considered in terms of the produced fitness value. Once assigned the ranks for each candidate solution, the dominance value is modeled as follows:  
\[\rho\big{(}\mathbf{x}_{i},\mathbf{x}_{j}\big{)}= \begin{cases}e^{-(\frac{r\min (\mathbf{x}_{i})}{N})}&\text{if }rank(\mathbf{x}_{i})\leq rank(\mathbf{x}_{i})\\ e^{-(\frac{r\min(\mathbf{x}_{j})}{N})}&\text{if }rank(\mathbf{x}_{i})> rank(\mathbf{x}_{j})\end{cases}  \tag{5}\]  
Therefore, due to the influence of the total social force \(\mathbf{S}_{i}^{t}\), each search agent \(\mathbf{x}_{i}\) present a determined tendency of being attracted or repelled to or from other elements within the population **P**.