# A Local Search-Based Generalized Normal Distribution Algorithm for Permutation Flow Shop Scheduling
## 3 Standard Algorithm: Generalized Normal Distribution Optimization
### Improved Local Search Strategy (ILSS)  
Additionally, in this work, a local search strategy is used to explore the solutions around the best-so-far solution for finding better solutions. This strategy will try according to a specific probability LSP each job in the best-so-far solution in all positions within this best solution to find a permutation with better makespan than the current best-so-far one. This strategy is used with the best-so-far solution without the others because the  
\begin{table}
\begin{tabular}{c c c c c c c c} \hline \hline Position, Job & 0 & 1 & 2 & 3 & 4 & 5 & 6 \\ \hline Position, \(T_{i}^{t}\) & 0.1 & 0.5 & 0.8 & 0.2 & 0.6 & 0.7 & 0.9 \\ \hline Job, \(T_{i}^{t}\) & 6 & 4 & 1 & 5 & 3 & 2 & 0 \\ \hline \hline \end{tabular}
\end{table}
Table 1: Representation of the updated solution \(T_{i}^{t}\).  
Figure 1: Depiction of the swap mutation operator.  
best-so-far solution might be so close to the optimal solution and need only simple changes to fulfill this optimal solution. This local search is integrated with the improved GNDO using the swap mutation operator to generate a version for tackling PFSSP, abbreviated as HIGNDO. In addition, in some cases, small changes may consume a large number of iterations without any benefit, so, in this research, a new addition to this LSS is made to make more changes to the best-so-far solution in the hope of finding a better solution. This addition is based on using the scramble mutation operator additionally with the LSS to explore more permutations. This improved local search strategy is abbreviated as ILSS, and its steps are listed in Algorithm 1. In Algorithm 2, the steps of improved GNDO (IGNDO) using the swap mutation operator hybridized with the LSS without the scramble mutation operator are extensively described to produce a version for tackling PFSSP known as HIGNDO. A new version using ILSS with IGNDO is developed to verify the efficacy of our improvement to the LSS for reaching better outcomes. This version is abbreviated as IHGNDO and is depicted in Figure 2.  
Figure 2: The steps of the HIGNDO algorithm.  
```
Input:\(X^{*}\)
1. For I = 1: n
2. \(X=X^{*}\)
3. For j = 1: n
4. \(r:\) create a random number between 0 and 1.
5. If(r < LSP)
6. \(X_{j}=X_{i}^{*}\)
7. Applying scramble mutation operator on \(X\)
8. Calculate the fitness of \(X\).
9. Update \(X^{*}\) if \(X\) is better.
10. End if
11. End for
12. End for Return \(X^{*}\)
```  
**Algorithm 1 Improved LSS (ILSS).**  
```
Input:\(\mathrm{N}\), \(t_{max}\)
1. \(t=0\)
2. Initialization phase.
3. While\(t<t_{max}\)
4. For\(i=1:N\)
5. Create a number \(\alpha\) randomly between [0, 1].
6. Create a number \(\alpha_{1}\) randomly between [0, 1].
7. If\(\alpha>\alpha_{1}\)
8. Calculate M using Equation (8)
9. Calculate \(\mu_{i},\ \delta_{i},\ and\ \eta\)
10. Calculate \(T_{i}^{t}\) using Equation (6).
11. If\(f(T_{i}^{t})<f(X_{i}^{t})\)
12. \(X_{i}^{t}=T_{i}^{t}\)
13. End If
14. Else
15. Compute \(T_{i}^{t}\) according to Equation (11).
16. If\(f(T_{i}^{t})<f(X_{i}^{t})\)
17. \(X_{i}^{t}=T_{i}^{t}\)
18. End If
19. End If
20. For\(j=1:0.1*n\)
21. \(T\): Applying the swap mutation on the best-so-far solution.
22. If\(f(T)<f(X^{*})\)
23. \(X^{*}=T\)
24. End If
25. End for
26. Applying algorithm 1 without Line 7.
27. End For
28. \(t++\);
29. End while Output: return \(X^{*}\)
```  
**Algorithm 2****HIGNDO.**