## 4 Description of Search Algorithms
### Overview of Moth-Flame Optimization Algorithm  
The moth-flame optimization algorithm (MOA) was developed by [PERSON] [44] taking as inspiration the moth's way of traveling during the night. The way of moving from the month-flame is known as transverse orientation. The two most important elements in the MOA are moths and light sources (flame). However, in each iteration of the optimization algorithm moths and flames are part of different processes for its update. For this reason, they can fly in a 1-dimensional, 2-dimensional, 3-dimensional or hyperdimensional area by changing the position vectors. In the MOA algorithm, each moth is assumed to have a position in a D-dimensional solution space. The set of search agents can be expressed as a matrix, just as follows:  
\[\mathbf{M}= \begin{bmatrix}m_{1,1}&m_{1,2}&\cdots&m_{1,d}\\ m_{2,1}&m_{2,2}&\cdots&m_{2,d}\\ \vdots&\vdots&\ddots&\vdots\\ m_{n,1}&m_{n,2}&\cdots&m_{n,d}\end{bmatrix}  \tag{25}\]  
where \(\mathbf{M}\) is the position matrix of moths, \(m_{i,j}\) is the value of \(j\)-th parameter of the \(i\)-th moth, \(j=1,2,\,...\,,\,d\) and \(i=1,2,\,...\,\,n\), \(n\) is the number of moths and \(d\) indicates number of dimensions (problem's variables) in the solution space. The corresponding fitness function values for the moths are sorted in an array represented by \[\mathbf{OM}= \begin{bmatrix}OM_{1}\\ OM_{2}\\ \vdots\\ OM_{n}\end{bmatrix}  \tag{26}\]  
Flame matrix is in the same dimension as moth matrix. Flame also stores the fitness value accordingly as number of flames. Moth and flame are both solutions but moth is the search agent and flame is the best position of moth. Flames are the flag which dropped by moth during the search process and move around that position and update accordingly. Due to this, the moths never lose the best solution. Moths update its position with respect to flame according to the next equation  
\[\mathbf{M_{i,j}=}\mathbf{S}\left(\mathbf{M_{i}},\mathbf{F_{j}}\right) \tag{27}\]  
where \(\mathbf{M_{i}}\) represents the \(i\)-th moth, \(\mathbf{F_{j}}\) represents the \(j\)-th flame and \(\mathbf{S}\) is the spiral function. The logarithmic spiral function for the movement can be defined as:  
\[\mathbf{S}\left(\mathbf{M_{i}},\mathbf{F_{j}}\right)=\mathbf{D_{i}}e^{bt}. \cos\left(2\pi t\right)+\mathbf{F_{j}} \tag{28}\]  
where \(b\) is a constant to define the shape of the logarithmic spiral, \(t\) is a random number between \([-1,1]\) and \(\mathbf{D_{i}}\) is the distance between the \(i\)-th moth and the \(j\)-th flame, which is defined as:  
\[\mathbf{D_{i}}=\left|\mathbf{F_{j}}-\mathbf{M_{i}}\right| \tag{29}\]  
To avoid the exploitation degradation of the best promising solutions, the following equation is expressed for the number of flames about this problem  
\[\text{Flame no }=\text{round}\left(N-l*\frac{N-l}{T}\right) \tag{30}\]  
where \(l\) = current number of iterations, \(N\) = maximum number of flames and \(T\) = maximum number of iterations. The steps of the MOA algorithm are given in Algorithm 5:  
``` Begin  Initialize the positions of moths and evaluate their fitness values While (the stop criterion is not satisfied )  Update flame no. OM = Fitness Function(M) if iteration = 1  F = sort(M) OF = sort(OM) Else F = sort(M\(t-1,\mathbf{M}t\)) OF = sort(M\(-1,\mathbf{M}t\)) End if For\(i=1:N\) For\(j=1:D\) Update \(r\) and \(t\) Calculate D with respect to the corresponding moth  Update \(\mathbf{M}(i,j)\) with respect to the corresponding moth End for\(j\) End for\(i\) End While Post-processing the results and visualization. End Begin

### Overview of MOD-FPA

In [31], the pollination process is replaced by the generation during each iteration of a set of complete random orientations under conditions similar to FPA [43]. The main objective of MOD-FPA is to improve the performance of FPA in terms of intensification, diversification, and speed of convergence properties.