## 2 Modeling of PFSSP
### Clustering-Optimization Approach  
In traditional GA, the elite population survives each generation as they represent the best solution. Majority of the offspring are generated using crossover which has a high probability of selecting individuals with better fitness values. Though these operations ensure that the population would converge towards an optimal solution, they also reduce the diversity of the population significantly. This strategy is applicable when the objective is to obtain a single optimal solution. However, it is severely lacking when multiple optimal or near optimal solutions are required.  
To achieve MMO, the diversity of the elite population and the remainder of the population must be maintained throughout the iterations of GA. In the proposed approach, this is achieved by splitting the population of GA in multiple niches, based on similarity and dissimilarities. Since cluster algorithms maximize the distance between different clusters and by assuming that different optimal solutions have high dissimilarity, we can utilize the cluster algorithms to split the search space into different clusters and find multiple optimal solution in each cluster. By limiting crossover and optimization within each niche, we can maintain the high diversity of the population, as we can avoid exposure from other clusters. Finally, to search the solution space more effectively, mutation is performed after every iteration. The basic procedure of the proposed algorithm is given below and is also shown in Figure 4.  
Figure 4: Flow chart of the proposed algorithm.  
Define the fitness function of the specific case study. In this study, the maximum completion time (makespan) was used as the fitness value.
2. Define the parameters for the k-means clustering algorithm (\(k\) value) as well as population size, crossover rate, mutation rate, generation limit, and initialize the best solution set.
3. Generate the initial population.
4. Evaluate the current population, calculate the feature matrix of every solution, and update the best solution set.
5. Using the k-means clustering algorithm, divide the current population into k clusters, based on the features calculated in step 4.
6. Within each cluster, select elite individuals that would be a part of the next generations population.
7. Within each cluster, select individuals for crossover using roulette wheel selection to produce offspring for the next generation.
8. Randomly select individuals (based on mutation probability) and mutate them.
9. Repeat Steps 4-8 until the generation limit is reached. Output the final population and the best solution set.  
To cluster solutions together, a feature matrix must be defined. Typically, in MMO, the distance between two individuals is used as a feature to cluster the solutions together. However, in PFSSP, a distance cannot be defined using the proposed encoding method, therefore, the feature matrix used to cluster the solutions together in the proposed algorithm is defined as the sequence of jobs on a particular machine. For example, the feature matrix for Parent A shown in Figure 2 would be (1,3,2,4,9,5,8,6,7). An example of applying the proposed algorithm is shown in Figure 5. It should be noted that clustering would not improve the algorithm efficiency. However, that is not the top priority in this study. The focus is to obtain multiple and different solutions with the same objective value.