# Hybrid Flow Shop Scheduling Problems Using Improved Fireworks Algorithm for Permutation
## 3 Fireworks Algorithm
### The Improved Fireworks Algorithm
## 5 Computational Experiments

Two instances from PFSP and HFSP are selected as experimental objects. The specific description of these examples is shown in detail. The experimental environment was MATLAB 2017a under Windows 7. The frequency of the CPU of the experimental computer was 2.3 GHz, and the memory size was 8 GB. In addition, the original fireworks algorithm, PSO, and the whale optimization algorithm were used to test the performance of IFWA and experimental results are presented as follows. ### Permutation Flow Shop Scheduling Problem

A set of plastic toys consists of seven small toys. Each small toy needs to be processed through seven steps, including melting, shaping, grinding, surface decoration, dyeing, testing, and packaging. The seven jobs are processed by seven machines respectively and the processing time of each small toy is listed in Table 1.

This is a classic PFSP with seven jobs and seven machines. The four algorithms ran 20 times independently by taking the makespan as the objective function. The number of iterations was set to 200, and the search range was between 0 and 7. The specific parameters are provided in Table 2. Among them, the specific parameters were taken from the default values of the original algorithm. The statistical results are given in Table 3. The minimum completion time obtained by the exhaustive method was 6590 s. It is clear that the four algorithms could find the minimum completion time of the problem. The IFWA had the highest success rate, and achieved a significant improvement compared with the other algorithms. The improved algorithm had better stability through the analysis of the average value and standard deviation. Compared to the PSO and WOA, the FWA and the IFWA took a long time because of their structure. The improved algorithm adopts a new selection strategy to avoid calculating the Euclidean distance between particles, which greatly reduces the computational \begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline \multirow{2}{*}{**Job**} & \multicolumn{6}{c}{**Stages**} \\ \cline{2-9}  & **Melting (s)** & **Shaping (s)** & **Ginding (s)** & **Surface** & **Dyeing (s)** & **Testing (s)** & **Packaging (s)** \\  & & & & & **Decoration (s)** & **Dyeing (s)** & **Testing (s)** & **Packaging (s)** \\ \hline
1 & 692 & 310 & 832 & 630 & 258 & 147 & 255 \\
2 & 581 & 582 & 14 & 214 & 147 & 753 & 806 \\
3 & 475 & 475 & 785 & 578 & 852 & 2 & 699 \\
4 & 23 & 196 & 696 & 214 & 586 & 356 & 877 \\
5 & 158 & 325 & 530 & 785 & 325 & 565 & 412 \\
6 & 796 & 874 & 214 & 236 & 896 & 898 & 302 \\
7 & 542 & 205 & 578 & 963 & 325 & 800 & 120 \\ \hline \hline \end{tabular}
\end{table} 
Table 1: Processing time in the permutation flow shop problem (PFSP). cost. Compared to the original version, the computation time for IFWA was reduced by nearly 37%. The proposed algorithm had a good optimization performance for solving the PFSP. ### The Hybrid Flow Shop Scheduling Problem

The HFSP is more complex than the PFSP. There are \(P=\prod\limits_{i=1}^{n}n_{i}^{m}\) kinds of processing sequences when \(m\) jobs are processed through \(n\) stages, where \(n_{i}\) is the number of the machines at stage \(i\). Seven jobs are waiting to be processed at the processing plant, and each job goes through lathing, planning, and grinding processing steps. There are three lathes, two planers, and three grinders in three respective stages. The specific processing times are illustrated in Table 4.

The decoding method of the HFSP is described by a schedule matrix. Each column of the matrix represents a production stage, which is different from the PFSP. The scheduling of the different process stages can only be solved separately and then combined into a solution of the HFSP.