## 4 Selected Optimization Methods
\[v_{i}^{(g)}=x_{r_{1}}^{(g)}+F\cdot\left(x_{r_{2}}^{(g)}-x_{r_{3}}^{(g)}\right) \tag{9}\]  
\[v_{i}^{(g)}=x_{r_{1}}^{(g)}+F\cdot\left(x_{r_{2}}^{(g)}-x_{r_{3}}^{(g)}\right) +F\cdot\left(x_{r_{4}}^{(g)}-x_{r_{5}}^{(g)}\right) \tag{10}\]  
\[v_{i}^{(g)}=x_{best}^{(g)}+F\cdot\left(x_{r_{2}}^{(g)}-x_{r_{3}}^{(g)}\right) \tag{11}\]  
After that, crossover is performed according to (12). \[u_{i}^{(g)}=\left\{ \begin{array}{ll}v_{i,j}^{(g)}&\text{if }r_{j}\leq\ CR\, \text{or}\,j=j_{rand}\\ x_{i,j}^{(g)}&\text{otherwise}\end{array} \right. \tag{12}\]  
The new population is obtained using the selection written by (13), which is made after crossover. \[x_{i}^{(g+1)}=\left\{ \begin{array}{ll}u_{i}^{(g)}&\text{if }f\left(u_{i}^{(g)} \right)\leq f\left(x_{i}^{(g)}\right)\\ x_{i}^{(g)}&\text{otherwise}\end{array} \right. \tag{13}\]  
For the ABC method, a new candidate is generated by (14) (foragers phase). \[v_{ij}=x_{ij}+\phi_{ij}\cdot\left(x_{ij}-x_{kj}\right) \tag{14}\]  
\(\Phi_{\text{ij}}\) is a random number between \(-1\) and \(1\) and \(k\
eq i\). The foragers phase is followed by the onlooker phase, which represents the probability of selecting a solution, expressed by (15). \[P_{i}=\frac{f_{i}}{\sum\limits_{j=1}^{n}f_{j}} \tag{15}\]  
If a solution does not improve after a predefined number of iterations (limit), it is abandoned and replaced (abandonment and scout phase). The TLBO method starts with the teacher phase, expressed by (16). \[X_{new}=X_{current}+r\cdot\left(X_{ teacher}-T_{F}\cdot\overline{X}\right) \tag{16}\]\(T_{\text{F}}\) is the teaching factor, which is commonly 1 or 2, and \(r\) is a random number. The teaching phase is followed by the learning phase, expressed by (17). \[X_{new}=\left\{ \begin{array}{l}X_{i}+r\cdot\left(X_{j}-X_{i}\right)\text{ if }f\left(X_{j}\right)<f(X_{i})\\ X_{i}+r\cdot\left(X_{i}-X_{j}\right)\text{ \ \ \ otherwise}\end{array} \right. \tag{17}\]  
The lowercase letters \(x\), \(v\), and \(u\) represent the individual members of the population, while the uppercase \(X\) represents a population vector. The analysis in the remainder of this article is based on the use of the three-layered model, whose parameters are shown in Figure 2b. The limits of specific resistivity of the soil are set between the lowest resistivity of wet, well-conducting soil (5 \(\Omega\)m) and the highest specific resistivity of story ground (3500 \(\Omega\)m). In the Wenner method, the current only penetrates to a certain depth, so it makes sense to define layers only to a certain depth. The parameters' limits are shown in Table 1.  
All five metaheuristics, DE/rand/1/exp, DE/rand/2/exp, DE/best/1/bin, ABC, and TLBO, were tested under the same conditions, and the tests were performed following the guidelines presented in [69]. We used 18,000 OFEs as the stopping criteria. In the case of ABC, we also counted scouts, and in the case of TLBO, we considered both phases of the algorithm, the Teaching and Learning phases. Six times the number of the parameters was used for the population number (NP). The parameters for different optimization methods are presented in Table 2.  
The algorithm of the calculation procedure considering the presented problem is shown in Figure 7.  
Numerical integration is the most time-consuming part of the algorithm presented in Figure 7. As it is necessary to repeat the soil parameters' determination procedure for nine subareas, it would be advantageous if the calculation time were as short as possible. \begin{table}
\begin{tabular}{c c c} \hline \hline
**Parameter** & **Lower Limit** & **Upper Limit** \\ \hline Resistance of the first soil layer \(\rho_{1}\) (\(\Omega\)m) & 3 & 3500 \\ \hline Thickness of the first soil layer \(h_{1}\) (m) & 0.1 & 60 \\ \hline Resistance of the second soil layer \(\rho_{2}\) (\(\Omega\)m) & 3 & 3500 \\ \hline Thickness of the first soil layer \(h_{2}\) (m) & 0.1 & 60 \\ \hline Resistance of the third soil layer \(\rho_{3}\) (\(\Omega\)m) & 3 & 3500 \\ \hline \hline \end{tabular}
\end{table}