## 3 Proposed Mix Optimizer
### Firefly Algorithm (FA)  
FA [50] is one of the most powerful and creative algorithms inspired by firefly insect behavior and flashing light. There are roughly 2000 different kinds of fireflies, and most of them generate brief, repetitive flashes. Bioluminescence produces the flashing light, and the pattern of flashes is frequently unique to a species. However, two primary purposes of such flashes are to reach prospective prey and attract powerful mates. Furthermore, flashing can be used as a safety warning system. The signal system that draws both sexes together includes the rhythmic flash, the pace of flashing, and the length of time. Females react to a male's distinctive flashing pattern within the same kind. In contrast, female fireflies of different kinds, such as photuris, can replicate the mating flashing pattern to attract and consume male fireflies who may misinterpret the flashes as an appropriate prospective partner.  
The inverse square law governs the light intensity at a given distance r from the light source. In other words, as the distance r rises, the light intensity \(I\) drops in terms of \(l\!\!\!\!\!\!\!\!\!\!\!\!  
The change in light intensity and attraction construction are two significant concerns in the firefly algorithm. With the help of the above information, the FA rules are:  
In the simplest form, the firefly's brightness I of a firefly at a specific point x may be written as \(I(x)\propto f(x)\). Nevertheless, attractiveness \(\beta\) is not absolute; it is better to be assessed by other fireflies or seen in the eyes of the beholder, as follows:  
\[I(r)=\frac{I_{s}}{r^{2}} \tag{15}\]  
The light intensity \(I\) alters with the distance \(r\) for an assumed medium with a permanent light absorption coefficient \(\gamma\):  
\[I=I_{0}e^{-\gamma r} \tag{16}\]  
Therefore, a function that considers both the effects of absorption and distance can be approximated as follows:  
\[I(r)=I_{0}e^{-\gamma r^{2}} \tag{17}\]  
Furthermore, due to the direct relationship between the attractiveness and flashing of each firefly, we have:  
\[\beta=\beta_{0}e^{-\gamma r^{2}} \tag{18}\]  
In order to reduce the fluctuation rate in the attractiveness function and for faster calculations, this function can be approximated by:  
\[\begin{array}{c}e^{-\gamma r^{2}}\approx 1-\gamma r^{2}+\frac{1}{2}\gamma^{2}r^ {4}+\ldots,\\ \frac{1}{1+\gamma r^{2}}\approx 1-\gamma r^{2}+\gamma^{2}r^{4}+\ldots,\\ \beta=\frac{\beta_{0}}{1+\gamma r^{2}}\end{array} \tag{19}\]  
These two above equations have a characteristic distance \(\Gamma=1/\sqrt{\gamma}\), in which the exponential function changes from \(\beta_{0}\) to \(\beta_{0}e^{-1}\) and in the second function from \(\beta_{0}\) to \(\beta_{0}/2\). The actual form of the attractiveness function in the implementation can be any declining function depending on the type of problem.  
In this case, the characteristic distance can be as follows:  
\[\beta(r)=\beta_{0}e^{-\gamma r^{m}},(m\geq 1) \tag{20}\]  
\[\Gamma=\gamma^{-\frac{1}{m}}\to 1,(m\rightarrow\infty) \tag{21}\]  
However, if this characteristic distance is known in an optimization problem, the attractiveness coefficient can be easily defined. Finally, the length between any two populations, in FA, \(i\) and \(j\) at \(x_{i}\) and \(x_{j}\) is:  
\[r_{ij}=||x_{i}-x_{j}||=\sqrt{\sum_{k=1}^{d}\left(x_{i,k}-x_{j,k}\right)^{2}} \tag{22}\]  
When an \(i\)th firefly is fascinated by a more brilliant one (\(j\)th), its movement is controlled by:  
\[x_{i}=x_{i}+\beta_{0}e^{-\gamma r_{ij}^{2}}\left(x_{j}-x_{i}\right)+\alpha \in_{i} \tag{23}\]  
Another rule is owing to attraction, whereas the third rule is randomness, with \(\alpha\) as the randomized parameter, and \(\in_{i}\) is a uniformly distributed random number in the range \([0,1]\). In most applications, we can consider \(\beta_{0}=1\) and \(\alpha\in[0,1]\)[50].  
It should be noted that the third term actually refers to a random step towards a brighter firefly, so if it is equal to zero, the firefly takes a simple random step.