## 5 Results  
When executing the different selected heuristics and comparing them with the proposed genetic algorithm, the following results were obtained in the scenarios considering 20 and 30 jobs. Table 2 shows the efficiency of the proposed algorithm over the selected heuristics, highlighting that the proposed genetic algorithm exceeds the benchmark solution by an average of 34.56%, obtaining savings of up to 43.81% compared to the SPT heuristic when considering 20 jobs and providing savings of up to 38.57% compared to a heuristic widely used in production systems such as the EDD heuristic when considering 30 jobs. Therefore, the proposed genetic algorithm provides efficient solutions to realistic problems in flexible job shop systems with sequence-dependent setup times. Likewise, Tables 3 and 4 show the completion time of the jobs that make up the best solution obtained with the genetic algorithms when considering 20 and 30 jobs, respectively, which generated a weighted penalty value equal to 442.93 and 980.95. Figure 13a,b respectively shows the evolution of the fitness value with the genetic algorithm throughout the generations (iterations) planned for the 20 and 30 jobs within the production system of the fabric finishing plant. Therefore, the algorithm is convergent because as the number of iterations (generations) increases, the solution obtained notably improves its total weighted penalty value. For the case of 20 jobs, after 1700 iterations, the improvements are reduced, while in the case of 30 jobs, upon reaching 2000 iterations, significant advances continue appearing in the objective function. \begin{table}
\begin{tabular}{c c c c} \hline \hline \multirow{2}{*}{**Algorithm**} & \multicolumn{2}{c}{**Total Weighted Penalty**} & \multicolumn{2}{c}{**\% Savings**} \\  & _j =_ 20** & _j =_ 30** & _j =_ 20** & _j =_ 30** \\ \hline Genetic algorithm & 442.94 & 980.95 & - & - \\ Heuristic EDD & 672.33 & 1420.79 & 34.12\% & 30.96\% \\ Heuristic SPT & 788.25 & 1596.87 & 43.81\% & 38.57\% \\ Heuristic CR & 626.18 & 1423.51 & 29.26\% & 31.09\% \\ Monte Carlo Simulation & 666.94 & 1510.56 & 33.59\% & 35.06\% \\ \hline \hline \end{tabular}
\end{table} 
Table 2: Results for the GA compared to the benchmarks. Figure 12: Solution example with the Monte Carlo simulation. In addition to the analysis of the objective function of this study, Tables 5 and 6 present other performance indicators such as the number of tardy jobs (based on possibilities), and the average possibility of tardy jobs, where it is considered that a job \(j\) has tardiness possibility when \(C_{j}^{sup}>d_{jB}\). Based on the results, the solution obtained with the GA provides only one job that can be late with a 0.50% chance when considering 20 jobs, while five jobs can be late with a 10.72% chance when considering 30 jobs. Likewise, the GA provides average savings of 79.6% in the number of late jobs compared to the benchmarks considering 20 jobs and maximum savings of 83.3% compared to the SPT heuristic. Similarly, GA provides average savings of 65.0% in the number of tardy jobs compared to the benchmarks considering 30 jobs and maximum savings of 70.6% compared to the SPT heuristic. Regarding the average possibility of tardy jobs, GA provides average savings of 95.8% compared to the benchmarks considering 20 jobs and average savings of 76.2% considering 30 jobs. Thus, it is confirmed that the proposed GA, in addition to providing satisfactory solutions in the weighted tardiness and earliness penalty, also provides satisfactory solutions regarding the possibility and number of tardy jobs. Regarding computing time, the genetic algorithm requires an average of 10.5 min to find the best solution when considering 20 jobs and 2000 iterations, while it requires 17.6 min to find the best solution when considering 30 jobs and 2000 iterations. When comparing the computing time for 20 jobs against 30 jobs (50% increase in the number