{'fraction_non_alphanumeric': 0.027665538203924138, 'fraction_numerical': 0.00993775253904117, 'mean_word_length': 5.033823852405008, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An Integrated Solution Approach for Flow Shop Scheduling

: This study seeks to integrate Random Key Genetic Algorithm (RKGA) and Technique for Order Preference by Similarity to an Ideal Solution (TOPSIS) to compute makespan and solve the Flow Shop Scheduling Problem (FSSP). FSSP is considered as a Multi Criteria Decision Making Problem (MCDM) by setting machines as criteria and jobs as alternatives. RKGA is employed to determine the best weights for the criteria that directly affect the robustness of the solution. The proposed methodology is presented with illustrative example and applied to benchmark problems. The solutions are compared to well-known construction heuristics. The proposed methodology provides the best or reasonable solutions in acceptable computational times.


INTRODUCTION
Scheduling is a systematic approach for planning execution of activities using assets under defined constraints to satisfy defined objectives. It is adopted to solve many types of production and service problems and has many real-world applications [1,2]. Sequencing tasks over a CPU, crane operations, railway operations etc. are common examples. Scheduling has also a wide range of application in manufacturing from supply chain activities to production operations [3,4]. From manufacturing point of view, scheduling seeks for an optimum execution sequence of given jobs on a set of machines to optimize defined objective(s) such as makespan, flow time, tardiness, idle time, etc. Scheduling function deals with the determination of time-sequence of jobs, orders, tasks, and operations as well as the allocation of the required resources to accomplish the related set of jobs, orders, operations, and tasks. The Flow Shop Scheduling Problem (FSSP) seeks an order of execution for defined n jobs at m machines with an unchanging path on machines by satisfying defined objective function(s). A single job can be processed concurrently only on one machine and likewise a single machine can process only one job at a time. Most common and widely studied objective function for FSSP is known as makespan [5,6].
FSSP is a complex problem in its nature. A FFSP with makespan objective on two machines (F 2 C max ) can be solved in polynomial time [7]. However, the problem turns into a minimal NP-Hard problem if the number of machines is increased by only one (F 3 C max ) [8]. The problem is NP-Complete where number of machines is greater than three [9]. At these circumstances, no algorithm is known to solve the problem optimally in polynomial time. Numerous algorithms are proposed to provide reasonable solutions to this hard problem. Approximation algorithms in literature prove the complexity to achieve favorable solutions [10]. Hence, many hybrid or integrated algorithms are suggested to obtain better solutions in less runtime. The combinations involve hybridization or integration of metaheuristics, mathematical programming models and metaheuristics, construction heuristics and metaheuristics, construction heuristics and mathematical programming models, hyper heuristics, etc. In this context, construction heuristics assumes an important role by providing initial solutions and parameters for further steps.
In the literature, many construction heuristics have been proposed for providing favorable initial solutions for metaheuristic algorithms [11]. However, combination of Multi Criteria Decision Making Problem (MCDM) methods and metaheuristic algorithms rarely appear to solve FSSP. In this study, a MCDM process is proposed as a construction heuristic. The proposed methodology involves integration of Random Key Genetic Algorithm (RKGA) and Technique for Order Preference by Similarity to an Ideal Solution (TOPSIS) method to solve the FSSP and provide a robust initial solution. TOPSIS is used to calculate the makespan and RKGA is deployed to hint weights required by TOPSIS. To the best of our knowledge, integration of RKGA and TOPSIS for computation of makespan and solution of FSSP has not been handled in the literature yet. There are studies that apply MCDM methods to solve FSSP problems in the literature. However, lack of optimized criteria weights avoids MCDM algorithms to achieve favorable solutions. Apart from studies in the literature, the proposed algorithm in this study calculates the best criteria weights automatically and provides favorable solutions.The rest of the study is organized as follows: In section 2, literature review is summarized including TOPSIS and RKGA. In section 3, methodology is explained. In section 4, application and computational results are presented. In the final section, conclusion and recommendations are given.

LITERATURE REVIEW
According to Ruiz and Stützle [12], a flow shop consists of n jobs and m machines, where all jobs are processed in the same order. More clearly, jobs follow the same processing order from Machine 1 to Machine m. The aim is to find processing sequence of jobs that optimizes the objective function(s).
FSSP is a well-defined real-life problem and has many application areas. However, the problem still preserves its complexity. Many algorithms are proposed to solve the problem for providing an initial solution or an exact solution. Rather than dealing with complex algorithms, actual interlocutors of the problem tend to handle the problem solution methods that contain easy implementation and user-friendly interface. Thus, many construction heuristics are introduced to literature that promise comprehensive algorithms and acceptable solutions. NEH (Nawaz, Enscore and Ham) [13] algorithm is known as the best polynomial time algorithm to provide convenient solutions in practice [14]. In addition to NEH algorithm, algorithms like Palmer [15], Gupta [16], Campbell, Dudek and Smith (CDS) [17] and Rapid Access (RA) [18] are prominent methods that appear in many studies and real-life applications. This study proposes an analogous construction heuristic by integrating the popular MCDM method TOPSIS with RKGA.

MCDM
Concluding to a decision for real life problems may require evaluation from many aspects. In many cases, decision makers are forced to peruse many possible choices, reveal their strengths and weaknesses as per defined measures and choose the best candidate. With a scientific focus, such a complex process is called as MCDM. To solve a MCDM problem, decision makers should compare available alternatives according to specified criteria and conclude with the best decision. Many MCDM solution algorithms are proposed to simplify the decision process. However, minority of them are broadly acknowledged and practiced. Weighted Sum Model (WSM) and its extension Weighted Product Sum are among foremost algorithms and have great reputation [19]. Famous Analytical Hierarchical Process (AHP) by Saaty [20] allowed revealing mutual pros and cons of alternatives according to defined scales by pairwise comparisons with group decision making capability [21]. A search for popular MCDM methods returns algorithms like TOPSIS by Hwang and Yoon [22], ELECTRE by Benayoun [23] and its novel variants, Preference Ranking Organization Method for Enrichment Evaluations (PROMETHEE) by Brans [24] and its family, Data Envelopment Analysis by Charnes [25], Goal Programming by Charnes [26], etc.

TOPSIS
Hwang and Yoon [22] introduced TOPSIS in 1981 as an alternative MCDM method. According to this method, alternatives are evaluated by their distances to Positive Ideal Solution (PIS) and Negative Ideal Solution (NIS). Thus, alternatives are aligned according to their distances to PIS and NIS. The most preferable alternative would be the one that is closest to PIS and naturally farthest from the NIS, where PIS contains the best achievable values for all criteria and NIS contains the worst values. Rather than examining k-dimensional criteria vs. alternatives, TOPSIS enables to figure relative sequence of alternatives with 2dimensional distances. The steps and notation of TOPSIS algorithm are described in methodology section.
TOPSIS has many real-world applications since it can be simply customized and adapted to fit many decision problems. Chamodrakas et al. [27] evaluated customer selection process where suppliers produce make-to-order [MTO] rather than make-to-stock [MTS] with an agile manufacturing policy to compete with their opponents and satisfy part of their customers considering their capacity. Goyal et al. [28] recommended a tuning model for configuring reconfigurable manufacturing system. Karatas et al. [29] assessed energy management performance of Turkey by an integrated model. Gungor and Kocamis [30] evaluated financial performance of UK soccer clubs. The samples may be diversified by surveying the studies in the literature. This study utilizes TOPSIS conducive to assigning process order of jobs to minimize makespan.

RKGA
Bean [31] introduced Random Key Genetic Algorithm (RKGA) as a variant of Genetic Algorithm. The algorithm is aimed to solve a wide sort of sequencing and general optimization problems. The method proposes a novel technique for representation to handle infeasibility issues of Genetic Algorithm that occurs during transition from parent to offspring. This novel technique, namely random keys, has an inherent coding system by demonstrating the solution via random numbers. Sorting the vector of these random numbers composes a natural encode/decode system. As advantage of the algorithm, searching the space by random numbers provides a robust exploration which cannot be achieved by binary numbers. Another advantage is the feasibility of crossover operation. Crossover is carried out over random numbers, not on sequential numbers. Hence, no additional logic is required to keep the feasibility of emergent chromosome.
RKGA still preserves its value today and many researchers benefit from its robust structure in various studies. Leonhart et al. [32] implied biased version to solve protein-ligand docking problem where molecular docking is a valuable tool for drug discovery. Ruiz et al. [33] implemented biased model to overcome the complexity of open vehicle routing problem with capacity and distance constraints. Faria et al. [34] studied electric distribution network reconfiguration problem that is widely studied in power system analysis. Famous Travelling Salesman Problem (TSP) is extensively handled with RKGA. Samanlioglu et al. [35] suggested a memetic RKGA to solve symmetric multi-objective TSP. Andrade et al. [36] utilized a biased version to solve k-Interconnected Multi-Depot Multi TSP that is a novel problem where k-terminal vertices are selected from base graph and connected with a cycle. A detailed survey and notation for the algorithm has been reviewed by Gonçalves and Resende [37].
RKGA is also applied to scheduling problems. Gonçalves et al. [38] deployed a hybrid genetic algorithm to solve Job Shop Scheduling Problem in which chromosomes are represented by random keys. Lei [39] addressed an approach for solving Job Shop Scheduling Problem with fuzzy processing times. Dauzère-Pérès and Mönch [40] proposed two mixed integer linear programming models for the weighted and unweighted number of tardy jobs on a single batch processing machine with incompatible job family problems and deployed RKGA methodology to solve these problems.
In this paper, a variant of RKGA is applied to supply best weights for TOPSIS algorithm rather than solving whole FSSP problem.

Solving FSSP with MCDM
As stated in literature review section, MCDM algorithms may be customized to solve many types of reallife problems. An example for this customization is the study by Subramaniam [41]. Rather than focusing on objective function(s), the study deals with dynamical selection of the best dispatching rule by Analytic Hierarchy Process AHP Method so that objection function(s) is/are ideally satisfied. A similar study is proposed by Singh [42] for multi-criteria dynamic job shop scheduling problems by integration of TOPSIS and goal programming. Leu and Yang [43] adopted an integration of Genetic Algorithm and TOPSIS, in which Genetic Algorithm processes overall calculations to solve the problem and TOPSIS strives to balance multiple cost and time consumption objectives. Kiran Kumar [44] integrated AHP and TOPSIS methods, where AHP calculates weights of the criteria (objective functions) according to the assessments of decision makers and supplies the weights to TOPSIS method, and TOPSIS sorts priority dispatching rules according to their ranks. In their study, Jadhav and Bajaj [45] had a different approach, so that TOPSIS is determining the processing orders jobs. Their featured assumption was efficiency of machines. As criteria of TOPSIS method, machines have been weighted according to their efficiency. Nakhaeinejad and Nahavandi [46] integrated interactive resolution and TOPSIS method to solve multi objective FSSP in fuzzy environment. The purpose of integrating TOPSIS was to handle multiple objectives more efficiently so that they are ensured to be satisfied in balance. Lin [47] integrated AHP and Genetic Algorithm to solve FSSP with re-entrant jobs to satisfy multi criteria of the problem and expedite convergence to a near optimal solution by better chromosome selection. Rohaninejad [48] presented a nonlinear model for capacitated flexible job shop scheduling problem with multiple objectives and tried to solve the problem with integration of Genetic Algorithm and ELECTRE. Braglia and Grassi [49] announced a novel algorithm, namely MOGI algorithm, by integrating NEH Heuristic and TOPSIS to optimize FSSP with makespan and maximum tardiness objective functions.
Gupta and Kumar [50] tried to solve the problem solely with TOPSIS. In their study, machines represent criteria and jobs stand for alternatives. As an output, alternatives are sorted according to their scores which indicates the order of production to provide minimum makespan. They also applied several weight schemes to obtain better results. However, the results are not robust enough to outrival known algorithms.
From this standpoint, FSSP is considered as MCDM problem by setting machines as criteria and jobs as alternatives in this study. RKGA is conducted to determine the best weights for the criteria that directly affect the robustness of the solution.

METHODOLOGY
Intuitive solution approaches to hard problems provide reasonable solutions in acceptable computational times. Many of these approaches iteratively update initial solutions that are supplied for the corresponding problem. Finding makespan for FSSP with more than two machines are examples of NP-Hard problems. Many construction heuristics are proposed to provide favorable initial solutions for metaheuristic algorithms. In this study, a MCDM process is proposed as a constructive heuristic. The proposed methodology is illustrated in Fig. 1.
This study integrates RKGA and TOPSIS method to solve the single objective FSSP. FSSP is considered as decision making problem in which optimum sequence is determined for processing order of jobs. MCDM algorithms comprise the selection of best alternative(s) from a set of alternatives according to a given set of criteria. A MCDM process has three components, which are alternatives, criteria, and weights.
Alternatives are any collection of selectable items, objects, actions, etc. In this case, jobs to be processed are alternatives in FSSP and ranking order of alternatives in MCDM methods is the sequence, which is required to calculate the makespan.
Criteria are the factors that influence the selection of alternatives. The criteria should affect evaluations that may yield to an objective ranking of alternatives. For the considered FSSP, the criteria are derived from the machines. The characteristic of FSSP has a comprehensive assumption that is valid for most of the problems in the class. To minimize the makespan in FSSP, the best approach is to allocate the jobs with longer process times on earlier machines and shorter process times on the following machines toward the end of the sequence [51]. The idea behind the rule is quite simple. The jobs with shorter process times on earlier machines rapidly clear the machines for the upcoming jobs. Hence, the number of jobs in the queue is reduced to avoid unnecessary delays. The criteria for FSSP are the machines. The machines are grouped into two equal partitions so that the machines, which are visited earlier, are included in the first partition. It is obvious that the process times for machines in first partition should be minimized and the ones in second partition are to be maximized.
Weights are assigned to criteria representing importance of each criterion. Usually, the weights symbolize the priorities of decision-makers. In fact, FSSP is dealing with makespan rather than the weights, several parameters and algorithms are tried to find appropriate weights. The best alternative between these approaches is a modification of RKGA. Typical RKGA uses randomly generated keys to encode and decode solutions. It fits well to problems in which solutions are permutation of "integers" [52]. However, weights of a MCDM problem are fractions rather than sequences.
In this study, random keys are not encoded/decoded. Instead, the random keys are used as solutions without any conversion. Thus, every criterion (machine) has its own weight within interval [0, 1). This interval provides adequate distinction between the values of weights. In addition, all three RKGA operators (elitism, crossover and new generation) described by Bean [31] are used for our proposed methodology.
Positive and negative ideal solutions for all alternatives are calculated as output of TOPSIS algorithm. Determination of closeness to the ideal solution is performed. Then, ranking the alternatives according to relative closeness values in descending order is completed. This order provides the sequence of jobs. The fitness value of a chromosome in RKGA is the makespan calculated using this sequence. The proposed methodology requires nxm number of TOPSIS runs and makespan calculation with different weights provided by RKGA, where n is the number of generations, m is the new chromosomes (m excludes the number of elite chromosomes, which are directly relocated to the new generation). Upon termination of RKGA, the sequence with the best (minimum) fitness (makespan) is returned as solution.
The steps of the proposed methodology are clarified in the following items: Step 1: Define the FSSP with Step 2: Define Jobs of the FSSP as Alternatives of MCDM Problem.
Step 3: Define Machines of the FSSP as Criteria of MCDM Problem.
Step 4: Create decision matrix by processing times.
Step 5: Create normalized decision matrix. 11 Step 4: Create chromosomes of the RKGA in the form of decimal vector with m elements. Step 5: Select an unevaluated chromosome k Ch from population. Set the chromosome as the next weight to be evaluated in MCDM. 1 [ ,.., ] Step 6: Calculate weighted normalized decision matrix. 11 1 Step 7: Determine negative ideal and positive ideal solutions.
Step 8: Calculate the separation measures for each Job.
Step 9: Calculate closeness to positive ideal solution.
Step 10: Order the Jobs according to their closeness value in ascending order.
Step 11: Calculate fitness   Step 12: The evaluation steps of the algorithm can be seen in Fig. 1.

APPLICATION AND COMPUTATIONAL RESULTS
The proposed algorithm was developed as well as implemented and compared to popular construction heuristic algorithms via C#. The weights of TOPSIS method is normally provided manually by the decision maker. Unlike the studies in the literature, the weights are determined by using a genetic algorithm with random key coding in this study. The purpose of this approach is to evolve the weights to converge to the best sequence of the jobs so that minimum makespan value can be achieved. RKGA depends on several parameters in parallel to many other stochastic algorithms in which these parameters affect the evolution, thereby the result of the algorithm. The preferred evolution provides smart evaluation of promising regions of the solution space and ensures a smooth convergence that prevents rapid sticking to local optima. Parameters suggested by Bean [31] for RKGA have been slightly changed in this methodology. Since this study uses directly random keys, generation of new decimals gains more importance. Hence, generation percentage of new chromosomes is updated as 10% instead of generating 1% at each iteration. Percentage of Elite Operator that delegates elite chromosomes to new population keeps its percentage as 20%. Percentage of Crossover Operator that creates new offspring from existing population is decreased to 70% of new offspring except existing chromosomes. Another challenging parameter is gene inheritance probability for crossover operator. Instead of a fair selection, a biased inheritance of genes selected from a more fit chromosome to a new offspring is preferred to form better populations. This probability value is set to 70% for better chromosomes.
Tab. 1 assures convenient solutions that lead to converged makespan values for this study.
Termination criteria and number of chromosomes in population are not fixed but changing according to the size of the problem.

Illustrative Example
This part includes a small-sized illustrative example with 5 jobs and 5 machines. For benchmark purposes, the considered problem is taken from the paper of Gupta and Kumar [50]. The processing times of jobs on machines are shown in Tab. 2. Since the problem is a permutation FSSP, no further problem data is required.
Step-1: In this step, the RKGA is initialized by predetermined parameters and initial population is created. A typical chromosome of the population consists of 5 real valued numbers from interval [0, 1). An illustrative chromosome that will be used as weights (w k ) within example is [0.841, 0.556, 0.021, 0.516, 0.536]. Step-2: Each chromosome should be evaluated with the fitness function. The procedure of evaluation in this methodology contains finding a job processing order using TOPSIS and calculating makespan.
Step-2.a: The processing times should be normalized as the first step of TOPSIS algorithm. Normalization assists scaling each dimensional attribute vectors into new vectors that are in the scale. Normalized matrix is demonstrated in Tab. 3. Step-2.b: The weighted normalized matrix is obtained by multiplying each M j vector with corresponding weight factor (w j ) as shown in Tab. 4. Thus, the new matrix includes the importance of each machine. In this example, the weight factors are obtained from chromosome that is generated in Step 1. Step-2.c : The positive and negative ideal-solution vectors are presented in Tab. 5. For each machine, Gupta and Kumar [50] considered positive ideal solutions (PIS) as the minimum weighted normalized values and negative ideal solutions (NIS) as the maximum weighted normalized values. However, due to property of the good sequences of FSSP [51], we have divided the machines into two groups in which PIS in the first group are the minimum weighted normalized values and NIS in the second group are the minimum weighted normalized values. Notably, the machines in the first group should be visited by each job before the machines in the second group. Step-2.d: This step requires the calculation of separation of alternatives (Jobs) from PIS and NIS. Step-2.e: The final step of TOPSIS algorithm contains calculation of relative closeness of each job to PIS and finds the sequence of jobs. The ascending order of relative closeness values returns the sequence of processing.
Step-2.f: The result in Tab. 7 grants the sequence of processing as J 5 , J 4 , J 2 , J 3 and J 1 . The matrix in the Tab. 8 demonstrates the completion times of jobs on each machine. The makespan is calculated as 74. This final substep of Step-2 provides evaluation of the selected chromosome. Step-3: If the best makespan is higher than 74, it is updated as 74 and current weight factors are kept in memory as the best weight factors.
Step-4: If all chromosomes are not evaluated and termination criteria are not met, go to step 2  Step-5: If all chromosomes are evaluated and termination criterion is not met, then the new population is generated. Fig. 2 shows crossover operation in RKGA described as in Bean [31]. Rand Two random numbers are generated to determine the parent chromosomes, from which the genes are inherited to offspring. As demonstrated in Tab. 1, Gene Inheritance Probability from a better chromosome used in this study is 70%. In Fig. 2, Chromosome 1 represents a chromosome with better fitness value. A random number is generated for each gene. If the random number is smaller than 0.7, the corresponding gene is inherited from Chromosome 1. Otherwise, Chromosome 2 is used for inheritance.
Step-6: If termination criterion is met, then STOP.
With the best weights provided by RKGA, the proposed approach returns a makespan of 74 for the sample problem. Gupta and Kumar [50] applied TOPSIS with 5 different weighting schemes to obtain weights. The best makespan was 80, which was provided by the scheme of "decreasing order". Decreasing order imposed weights as (5, 4, 3, 2, 1) for machines. However, the weight set (0.841, 0.556, 0.021, 0.516, 0.536) provided the makespan as 74, as shown in the illustrative example. The results revealed the importance of weight assignment for a MCDM problem.
In the literature, several construction heuristics were presented and used extensively. The solutions of the proposed methodology are compared to these well-known heuristics. Initially, the algorithms provided by Palmer, Gupta, CDS, RA and NEH found the makespan as 85, 82, 82, 79 and 79, respectively for the considered problem.
Benchmarks problems created by Carlier (CARXX), Reeves (RECXX), and Taillard (TAIXXX) are used to compare our proposed method with the above-mentioned construction heuristics.
The solutions for the benchmark datasets of Reeves and Carlier are shown in Tab. 9. and Tab. 10 contains benchmark values for Taillard dataset. Our proposed methodology provides the best solutions for almost every problem. The results support the robustness of MCDM on FSSP and the heuristic approach that stipulates early processing of jobs with shorter process times on earlier machines.

CONCLUSION
The study is based on the study of Gupta and Kumar [50] in which they propose simple weighting schemes whereas we try to find out optimized weights using RKGA. In this study, an integrated methodology is proposed combining RKGA and TOPSIS. Our proposed methodology provides better solutions than the compared construction algorithms for most of the benchmark problems. Since the proposed methodology is a MCDM process, the solution is achieved in reasonable times. Hence, the proposed methodology provides the best or reasonable solutions in acceptable computational times.
As a result, the proposed method shows that the impact of MCDM techniques can be improved by determining the parameters (weights) using heuristics rather than assigning subjectively or arbitrarily.
Considering the problem with other objective functions associated with the scheduling problems and devising other solution methods by means of other MCDM approaches is recommended for future extensions of this research.