# A New Modified Firefly Algorithm for Optimizing a Supply Chain Network Problem
## 2 The Proposed Modified Firefly Algorithm  
In this research, the standard FA is modified in to make a balance between exploitation and exploration to prevent stagnation and premature convergence by employing further operators in classical FA. The initial solutions of FA are ranked and sorted into two equal groups, afterward, the operators, that is, insertion, swap and reversion (Figure 1) are utilized to provide a neighbourhood search of the potential solutions in the second group. Note that these operators are chosen on a random basis. Next, the acquired solutions combined with those in the first group and FA will be used for the new potential solutions. The swap operator changes the sequence of a generated random solutions by swapping two members' position in the solutions' sequence. The inversion operator changes the position of a member by assigning it as the last member in the sequence of a generated random solutions. The reversion operator holds the first member position and reverses the rest members' positions. These operators depicted in Figure 1. It should be noted that these operators are similar to simulated annealing operators that are employed for neighbourhood searching [4].  
The proposed operators, in the beginning, create an arbitrary neighbour \(sol^{\prime}\) for the preliminary solution sol in the second group. Next, the value of fitness functions denoted by \(f(sol^{\prime})\) are calculated for all of them. In case \(f(sol^{\prime})\) has a better value compared to the \(f(sol)\) (the value of fitness function for the first group), \(sol^{\prime}\) is recognized as a new answer which means a potential solution and also is substituted with \(sol\); in any other case, the prior best solution stays in the second group as potential solutions. Lastly, the newly acquired solutions combined with a potential solution that are already  
\begin{table}
\begin{tabular}{l l} \hline \hline \multicolumn{1}{c}{**Type of Improvements**} & \multicolumn{1}{c}{**References**} \\ Parallel firefly algorithm & [PERSON] and [PERSON] [2], [PERSON], et al. [8], [PERSON] and [PERSON] [9] \\ Elitist firefly algorithm & [PERSON] and [PERSON] [10], [PERSON], et al. [11; 12; 13; 14] \\ Lévy flights randomized firefly algorithm & [PERSON] [15], [PERSON] [16] \\ Binary represented firefly algorithm & [PERSON] and [PERSON] [17], [PERSON], et al. [18], [PERSON], et al. [19; 20] \\ Gaussian randomized firefly algorithm & [PERSON], et al. [21] \\ Discrete firefly algorithm & [PERSON], et al. [22] \\ Chaos randomized firefly algorithm & [PERSON], et al. [23], [PERSON], et al. [24] \\ \hline \hline \end{tabular}
\end{table}
Table 1: Classification of modified FA in literature.  
in the first group and FA will be run to find the optimal solutions. Figure 2 depicts the graphical representation of the modified FA.  
Figure 1: Additional operators in the modified FA.  
Figure 2: Graphical representation of modified FA.  
As  
Figure 3: Pseudo code for modified FA.  
It should be noted that the proposed modified FA (depicted in Figure 3) differentiates from the classical FA by considering the additional operators (swap, reversion and inversion). In other word, the proposed modified FA sorts the population based on fitness value into two groups: potential and weak solution groups wherein classical FA, all population is considered in one group.