# Hybrid Flow Shop Scheduling Problems Using Improved Fireworks Algorithm for Permutation
## 3 Fireworks Algorithm
### The Improved Fireworks Algorithm  
(1) When calculating the explosion amplitude, the radius of the fireworks with the optimal value is approximately zero, and the explosion fireworks generated by the optimal firework are the greatest in number, which undoubtedly causes a waste of resources. It is necessary to limit the range of fireworks. An exponential decreasing radius is introduced, and the minimal firework radius is replaced when the minimal radius is less than the exponential decreasing radius. The decreasing radius is shown in Equation (7):  
\[A_{i}=\left\{ \begin{array}{ll}A_{i}&if\ A_{i}>A_{\min}\\ A_{\min}=A_{final}\times(\frac{A_{initial}}{A_{final}})^{(1-\frac{t}{T})}& otherwise\end{array} \right. \tag{7}\]  
where \(T\) and \(t\) are the maximal and current number of iterations respectively, and \(A_{initial}\) and \(A_{final}\) are two parameters to limit the range of \(A_{\min}\). (2) Considering that the Gaussian operator is not sufficient for global search, the Cauchy mutation operator is added in this study. Figure 2 shows the Gaussian and Cauchy distributions. It is evident that the Cauchy distribution drops gently from the peak to the both sides, and a point after Cauchy mutation will be less affected by the local extremum point. In addition, the Cauchy distribution peak is relatively small and the ability for local search is poor, while the opposite is true for the Gaussian distribution. A Cauchy-Gauss mutation operator is proposed to adjust the role of the two operators dynamically. In the early stage, the mutation operator is mainly used for global search. The mutation ability around the extreme points is strengthened in the later stage. The hybrid mutation operator is shown as follows:  
\[\hat{x}_{ik}=x_{ik}\times\left(\frac{t}{T}\cdot Gaussian(1,1)+(1-\frac{t}{T}) \cdot Cauchy(1,1)\right) \tag{8}\]  
(3) In the traditional FWA, the calculation of the Euclidean distance between sparks inevitably reduces the running speed of algorithm when the dimension or the number of sparks is large. This  
Figure 2: Gaussian and Cauchy distributions. study proposes an elite group selection strategy. All fireworks generated in the current iteration are sorted from good to bad according to the fitness value, and the first \(N\) fireworks are chosen as the initial fireworks in the next generation. The pseudo-code of IFWA is described as follows (Algorithm 1):  
```
Initialize parameters and the location of the fireworks. Evaluate the fitness value of the fireworks. \(t=0\); while(\(t<\) iterations) Generate explosion fireworks  Calculate \(A_{\min}\) by Formula (7). for each firework \(x_{i}\) (i = 1, 2,..., N) do  Calculate the \(A_{i}\) by Formula (1). if\(A_{i}<A_{\min}\) \(A_{i}=A_{\min}\)  end for  Calculate \(S_{i}\) by Formulae (2) and (3). for j = 1: \(S_{i}\) \(q\) = round(\(d\)xrand(0,1)) (\(d\) is the dimension of sparks). Calculate the displacement \(h=A_{i}\times rand(-1,1)\) for\(p=1\):\(q\)  Randomly select \(k\)th dimension of \(x_{i}\) (Not repeating). \(x_{ik}=x_{ik}+h\) if\(x_{ik}\) is out of bounds then  Map sparks to a new location by Formula (5) end if endfor endfor  Generate mutation fireworks for\(i=1\):mutation_num (mutation_num is the number of mutation fireworks). Randomly select \(x_{i}\). \(\hat{x}_{i}=x_{i}\) \(q\) = round(\(d\)xrand(0,1)). for\(p=1\):\(q\)  Randomly select the \(k\)th dimension of \(\hat{x}_{ik}\) (Not repeating). Generate the mutation sparks by Formula (8). if\(\hat{x}_{ik}\) out of bounds then  Map sparks to a new location by Formula (5). end if endfor endfor Select fireworks in the next iteration  Select \(N\) sparks as the initial fireworks in the next iteration by the new selection strategy. Update the optimal value. \(t=t+1\) endwhile return optimization results
```  
**Algorithm 1**The pseudo-code of IFWA. The pseudo-code of IFWA is described as follows (Algorithm 1):  
```
Initialize parameters and the location of the fireworks. Evaluate the fitness value of the fireworks.