{'fraction_non_alphanumeric': 0.039491401955806714, 'fraction_numerical': 0.01911657579302885, 'mean_word_length': 4.480522622792161, 'pattern_counts': {'":': 0, '<': 0, '<?xml version=': 0, '>': 0, 'https://': 1, 'lorem ipsum': 0, 'www.': 1, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
An enhanced Genetic Algorithm with an innovative encoding strategy for flexible job-shop scheduling with operation and processing flexibility

This paper considers the Flexible Job-shop Scheduling Problem with Operation and Processing flexibility (FJSP-OP) with the objective of minimizing the makespan. A Genetic Algorithm based approach is presented to solve the FJSP-OP. For the performance improvement, a new and concise Four-Tuple Scheme (FTS) is proposed for modeling a job with operation and processing flexibility. Then, with the FTS, an enhanced Genetic Algorithm employing a more efficient encoding strategy is developed. The use of this encoding strategy ensures that the classic genetic operators can be adopted to the utmost extent without generating infeasible offspring. Experiments have validated the proposed approach, and the results have shown the effectiveness and high performance of the proposed approach.

1. Introduction. Process planning and scheduling are two key functions both responsible for the efficient allocation and utilization of manufacturing resources. Process planning determines how a part is to be manufactured in accordance with its design specifications, while scheduling assigns manufacturing resources and schedules operations so that some relevant criteria are satisfied, such as minimum makespan and minimum mean flow time. Integration of these two functions can significantly enhance the performance of a flexible job-shop manufacturing system in terms of reduction of production cost, bottleneck elimination, balanced level of machine utilization, and facility productivity [14,57,35,33]. In the last few decades, more attention has been paid to the problem of the Integrated Process Planning and Scheduling (IPPS). The IPPS problem mainly stems from three types of flexibility: operation flexibility, sequencing flexibility and processing flexibility [6]. Operation flexibility refers to the possibility of performing an operation on different machines with identical or non-identical processing times. Sequencing flexibility corresponds to the possibility of interchanging the sequence in which the required manufacturing operations are performed. Processing flexibility refers to the possibility of producing the same manufacturing feature with alternative operations or sequences of operations.
IPPS aims to optimize process planning and scheduling simultaneously. This causes the IPPS problem to be strongly NP-hard and even more difficult to find an optimal solution [29,28]. Generally, there are three main types of solution approaches for the problem [56,66]: simulation-based approach [29,17], metaheuristic-based approach [31,58,40,39,55,71,72,59,44] and agent-based approach [63,64,41,45]. Among these approaches, the meta-heuristic approach has been recognized as the most important mechanism for the IPPS problem. A typical and widely-used type of meta-heuristic is Evolutionary Computation (EC), such as Genetic Algorithms (GAs), evolution strategies, evolutionary programming and co-evolutionary algorithms. EC algorithms are inspired by Darwin's evolutionary theory, where a chromosome (or individual) is used to map the target problem and generate a solution by applying an encoding/decoding strategy, and a population of individuals is modified through genetic operators, such as recombination (crossover) and mutation. ECs have been successfully adopted to solve the IPPS problem, as proven by the growing number of papers on the topic. Examples include GAs [48,35,32,34,58,55,40,39,71,72,60,10,67], Symbolic Evolutionary Algorithms (SEAs) [31,30], and hybrid approaches of EC [37,1,49]. However, the current encoding strategies for the IPPS problem reported in the literature make almost all the classic genetic operators inapplicable due to the fact that a vast of offspring will be infeasible or illegal. Most research on applying ECs to the IPPS problem devised either complicated genetic operators or extra repairing algorithms to guarantee the feasibility or legality of offspring in the evolutionary process. This makes EC-based approaches for the IPPS problem more complex and may reduce computing performance in terms of the solution quality and the computing speed.
This paper considers a Flexible Job-shop Scheduling Problem with Operation and Processing flexibility (FJSP-OP, Doh et al. [17] referred to this problem as FJSP-MPP), a common and practical case of the IPPS problem, in which each job has multiple process plans resulting from operation and processing flexibility. The FJSP-OP has been investigated by some researchers, including Baykasoglu [4], Baykasoglu et al. [5], Shao et al. [58],Özgüven et al. [51], Rajabinasab and Mansour [56], Doh et al. [17], Zhang et al. [72], Liu et al. [43] and Luo et al. [44]. To solve this problem and overcome the limitations of current encoding strategies reported in the literature, this paper first presents a new representation scheme called the Four-Tuple Scheme (FTS). The FTS models a job with operation and processing flexibility, whereby alternative process plans for a job can easily be generated. Then, an enhanced GA with an innovative encoding strategy is developed for solving the FJSP-OP, with the objective of minimizing the makespan of all jobs. The merit of the proposed encoding strategy is that it can adopt the classic genetic operators to the utmost extent without generating infeasible offspring and thus may improve the solution quality and the computing speed. This is proven by the computational experiments conducted in this paper.
The remainder of the paper is structured as follows. The next section provides a relevant literature review on EC's encoding strategy for the IPPS problem. Section 3 describes the FJSP-OP. Section 4 proposes the FTS to model jobs with operation and processing flexibility. Section 5 develops a GA-based approach for the FJSP-OP. Experimental studies and discussions are reported in Section 6, and conclusions are summarized in the final section.
2. Literature review. Since Chryssolouris and Chan [13] first proposed the preliminary idea of IPPS, numerous efforts have been devoted to solving the IPPS problem. Three primary integration models have been proposed: Non-Linear Approach (NLA), Closed Loop Approach (CLA) and Distributed Approach (DA) [5]. Reviews of the IPPS literature are available in previous publications [58,54] and not repeated here. This paper mainly focuses on encoding strategies of EC-based approaches for the IPPS problem. Encoding strategies for the IPPS problem are closely related to the representation of these three types of flexibility. This section starts with introducing representations of flexibilities.
2.1. Representations of flexibilities. Two graph-based methods are extensively adopted to represent the aforementioned three types of flexibility: network representation [25] and AND/OR graph [42,32]. These two methods are similar in terms of representing these flexibilities. Taking network representation as an example, there are three node types in the network: starting node, intermediate node and ending node [31]. The starting node and the ending node labelled 'S' and 'E' respectively, are dummy nodes that denote the beginning and the completion of a job, respectively. An intermediate node represents an operation, which contains alternative machines used to perform the operation and the corresponding processing time required. An arrow connecting two nodes represents the precedence between these two nodes. OR relationships are used to describe processing flexibility that the same manufacturing feature can be completed with different operation procedures. If the links following a node are connected by an OR symbol (called OR-connector), only one of the OR-links (the links connected by an OR-connector) must be traversed. OR-link path is an operation path that begins at an OR-link and ends as it merges with the other paths, and its end is denoted by a JOIN-connector [31]. For the links that are not connected by OR-connectors, all of them must be visited. Figure 1 presents an example containing three jobs (job 1, 2 and 3) with operation and processing flexibility. In the network of Figure 1( However, many prior research assumed that an OR relationship contains only two OR-link paths [31,62,58]. This is unrealistic and not applicable when an ORconnector contains more than two OR-link paths. For example, the OR relationship OR 32 of job 3 in Figure 1(c) has three OR-link paths: {2,3}, {4,5} and {6}. Even though, an OR relationship with more than two OR-link paths can be rewritten into a new form in which each OR relationship contains only two OR-link paths. As shown in Figure 1(d), the OR relationship OR 32 can be rewritten into two new OR relationships both with only two OR-link paths. Obviously, this will increase the complexity of the network.

2.2.
Encoding strategies for the IPPS problem. The vast majority of ECs adopt an encoding/decoding strategy with which genes on chromosomes are represented by numbers or letters [46]. Commonly used encoding approaches include binary encoding, permutation encoding, real number encoding, and general data structure encoding [22]. Encoding strategy not only plays a critical role in representing a problem but also ultimately affects the selection or design of the genetic operators.  Since Davis [16] made one of the first attempts to use GAs, as well as to design encoding/decoding strategy, for the conventional Job-shop Scheduling Problem (JSP), many encoding/decoding strategies have been proposed for the JSP, the conventional Flexible Job-shop Scheduling Problem (FJSP, FJSP is an extension of the JSP by allowing an operation to be performed on more than one machine), and the IPPS problem. For example, nine encoding strategies, such as operation-based representation, job-based representation and job pair relation-based representation, have been proposed for the JSP [11]. Among these encoding strategies, operationbased representation, one type of permutation encoding, is extensively adopted since it is the only one which keeps both information of operation sequence and precedence constraints in a chromosome [21,12]. For an n-job and m-machine JSP, operationbased representation encodes a schedule as a fixed-length chromosome containing n i=1 n i genes. Each symbol (commonly in the form of job number, hereafter use 'job number' directly) of a job appears in the chromosome exactly n i times to represent the n i ordered operations of this job and the k-th appearance of a job number from left to right stands for the k-th operation of this job. The advantage of operation-based representation is that a chromosome always corresponds to or can be decoded into a feasible schedule [8], and the classic mutation operators, such as inversion mutation, insertion mutation and reciprocal exchange mutation, are suitable for mutation operations without generating illegal offspring. However, the classic crossover operators, such as single-point crossover and two-point crossover, are not suitable for operation-based representation and will generate illegal offspring as these crossover operators cannot ensure that each job appears exactly n i times in the chromosome. Therefore, many complicated crossover operators, such as partial-mapped crossover (PMX) [23], order-based crossover (OBX) [61], positionbased crossover (PBX) [61], and precedence preservative crossover (PPX) [7], have been proposed for an operation-based representation. For more details about encoding strategies and genetic operators for the JSP, we refer readers to Cheng et al. [11,12].
Later, Gao et al. [19] and Ho et al. [24] expanded the application of operationbased representation to the conventional FJSP. They split a chromosome into two independent substrings both with a fixed length n i=1 n i : operation sequence substring and machine assignment substring. The first one is an operation-based representation standing for a list of ordered operations. The second one represents the machines selected for the operations of all jobs. This encoding strategy inherits the characteristics of the operation-based representation for the JSP. Moreover, since different operations may have different processing machine sets, most of the classic mutation operators, such as inversion mutation [26], insertion mutation [18], and reciprocal exchange mutation [3], are unsuitable for the machine assignment substring. Therefore, more complicated operators, such as permutation of two operations [27], have to be adopted or designed for the machine assignment substring.
For the IPPS problem, each job has multiple process plans, and the number of operations of the process plan selected for a job is not fixed. Therefore, it is hard to guarantee a fixed-length chromosome and thus leads to a great challenge of devising a suitable encoding strategy. Many efforts have been devoted to encoding strategies for the IPPS problem. This paper categorizes these existing encoding strategies into two types: hierarchical encoding approach and integrated encoding approach.
2.2.1. The hierarchical encoding approach. The hierarchical encoding approach encodes a chromosome as a fixed-length string(s), where some gene stands for a process plan or a processing route of a job. This means that process plans or routes for all jobs should be generated in advance. For example, Lee and Kim [35] proposed a simulation-based genetic algorithm for the IPPS problem. First, they encoded a chromosome as a fixed-length string where the i-th gene represents the index of one route selected for the i-th job. This means that a chromosome is a combination of routes of all jobs, and thus stands for a standard JSP. Then, a simulationbased scheduling model is used to obtain the scheduling performance measure (e.g. makespan) of each chromosome, and the performance measure is fed into a genetic algorithm in order to improve the solution quality. Later, Shao et al. [58] employed a two-substring based encoding strategy to represent a solution for the IPPS problem. The first substring, encoded by operation-based representation is the operation sequence substring with a fixed length n × q, where q is the number of operations of the route which has the most operations among all the alternative routes of n jobs to be scheduled. If the number of all the operations of all routes selected for all jobs, s, is not equal to n × q, n × q − s genes in the operation sequence substring are randomly filled with 0, where a 0 stands for a dummy operation to be processed on any machine with zero processing time. The second substring is the route substring. The positions from 1 to n in this substring represent the job from 1 to n, and the number in the i-th position represents the index of a route selected for the i-th job. In addition, there are some variants of the encoding strategy of Shao et al. [58], such as Qiao and Lv [55] and Li et al. [40,38,39]. For example, Qiao and Lv [55] combined these two substrings into one string. Each gene in a chromosome is made up of two positive integer numbers. The first one is the index of a route selected for the job represented by the second number in the same gene, and the second one is the job number of a job. Figure 2 shows an illustrative chromosome for the problem shown in Figure 1 by applying the encoding strategy of Shao et al. [58]. Some alternative process routes for the three jobs are listed in Figure 2(a). Each element of the process routes takes the form of (i, m), meaning the i-th operation of its corresponding job is processed on machine m. It follows that q is equal to 5 and thus the length of the operation sequence substring is equal to 15. The first number, i.e. 3, in the route substring indicates that the third process route is selected for job 1. Since the third process route of job 1 contains four operations, the number of job 1 appears four times in the operation sequence substring.  The shortcomings of the hierarchical encoding approach lie in: (1) process plans or routes for a job should be generated in advance, but for a job with high production flexibility, generating several best or all process plans or routes will result in a combinational-explosive problem; (2) an EC adopting the hierarchical encoding approach cannot simultaneously find a suitable process plan for each job and an optimal or near optimal schedule; and (3) it follows that almost all the classic genetic operators are unsuitable for the hierarchical encoding approach, and thus dedicated genetic operators have to be designed to cope with this type of encoding strategy. For instance, Shao et al. [58] designed a complicated crossover operator for the operation sequence substring by appending or deleting 0 to ensure that n × q − s genes in this substring are 0. This may reduce the optimization performance of their algorithm.

2.2.2.
The integrated encoding approach. The integrated encoding approach intends to simultaneously represent the process plans selected for all jobs and a feasible schedule for the IPPS problem. For example, Kim et al. [31] proposed an SEA-based approach for the IPPS problem. In this approach, two types of different populations are constructed and maintained during evolution: process planning populations (P op[k], k = 1, . . .?n) and scheduling population (P op[n + 1]). P op[k] (k = 1, . . .?n) consists of individuals representing process plans for job k, and P op[n + 1] consists of individuals representing schedules for n jobs to be scheduled. Each individual in population P op[k](k = 1, . . .?n) consists of three substrings: head substring, tail substring and machine assignment substring. The head substring represents all the possible operations for the k-th job in a sequential list. The tail substring encodes OR relationships in the k-th job as the binary numbers of 0 and 1, where the number 0 and the number 1 represent selecting the right and the left OR-link path of an OR relationship, respectively. The head substring and the tail substring can be decoded into a process plan for this job. The machine assignment substring is responsible for machine assignments, the i-th element of which represents the machine on which the operation corresponding to the i-th element of the head substring is processed. This means the machine assignment substring depends on the head substring. An individual in P op[n+1] is a permutation of the operations for all jobs. This encoding strategy can guarantee fixed-lengths for all the substrings. However, the authors tried to avoid generating infeasible offspring and ensure the i-th element of the machine assignment substring stands for the machine to process the operation represented by the i-th element of the head substring. To achieve this, the authors presented a variation of the classic two-point crossover both and simultaneously for crossover operations of the head and the machine assignment substrings. The encoding method of Kim et al. [31] has been widely employed in the domain of the IPPS problem. Examples include Wang and Ju [62] and Zhang et al. [72].
Considering the problem shown in Figure 1 again, Figure 3 shows illustrative chromosomes by applying the encoding strategy of Kim et al. [31]. A chromosome in P op [1] is shown in Figure 3(a), representing the process plan for job 1 (the other chromosomes in P op [2] and P op [3] are similar to that in P op [1]). Figure 3(b) shows a chromosome in P op[n + 1] with a length of 28, indicating that the problem has 28 operations in total. Operation numbers of 10-18 and 19-28 in Figure 3(b) correspond to those of 1-9 in job 2 and those of 1-10 in job 3, respectively.  Compared to the hierarchical encoding approach, the integrated encoding approach can overcome the combinational-explosive problem of generating all alternative process plans. However, it also faces the same problem as that of the hierarchical encoding approach, that is, the application of the majority of the classic genetic operators is restricted and dedicated genetic operators have to be designed.
As mentioned previously, the current encoding strategies for the IPPS problem are very complicated and unsuitable for applying the classic genetic operators. Therefore, what is expedient for solving the FJSP-OP by using EC is to design an efficient encoding strategy that can simplify the genetic operations, and avoid generating illegal chromosomes and/or offspring. In this paper, we employ a genetic algorithm and propose an innovative encoding strategy for the FJSP-OP. The proposed encoding strategy can adopt the classic genetic operators to the utmost extent.
3. Problem statement. The FJSP-OP considered in this paper may be briefly expressed as follows. There is a set of n independent jobs, Jobs = {J 1 , . . . , J n }, to be processed on a set of m machines, M achines = {M 1 , . . . , M m }. Each job has multiple process plans and multiple processing routes due to operation and processing flexibility. The aim of the FJSP-OP is to select a suitable process plan for each job (process plan selection sub-problem), assign each operation contained in the selected process plan to a machine (routing sub-problem), and order all operations selected for all jobs on the machines (scheduling sub-problem) in such a manner that some relevant criteria, e.g. minimum makespan and minimum mean flow time, are achieved. In this paper, one objective, i.e. minimizing makespan, is considered. In solving this problem, the following assumptions are made: (1) All jobs are ready for processing at time zero.
(2) Job pre-emption is not allowed and each machine can process only one operation at a time.
(3) Setup times for the jobs are sequence-independent and can thus be included in the processing times.
Several papers have systematically examined mathematical models for the IPPS problem [51,28], as well as the FJSP-OP [17]. For the sake of simplicity, this paper does not present a detail mathematical model for the FJSP-OP. Interested readers may refer to Doh et al. [17] and Jin et al. [28]. 4. A Four-Tuple Scheme for representing a job with operation and processing flexibility. In this section, the classic network representation for the FJSP-OP is rewritten into a new mathematical model, i.e., Four-Tuple Scheme (FTS).
An FTS for modelling a job J with operation and processing flexibility is defined as follows: An OR relationship OR is a set of OR-link paths OR = {P ath i |i = 1, . . . , p} and an OR-link path P ath i is an ordered set of operation(s) and/or OR relationship(s), dictating that these operation(s) and/or OR relationship(s) are processed based on the priority of their appearance in P ath i . For the sake of distinction, any OR relationship must be assigned a unique name (or label). If an OR relationship is one element of an OR-link path, it is referred to as 'embedded OR relationship'. An embedded OR relationship must appear in the form of its unique name in this OR-link path.
It is worth mentioning that any OR relationship, even the one embedded into an OR-link path, should be an element of OR S , while any embedded OR relationship should not be contained in M ap.
Take job 1 as an example (see Figure 1(a)). We have The FTS is useful for generating alternative process plans for a job. This paper presents a recursive algorithm named GENERATE-PROCESS-PLAN to generate alternative process plans for job J = {O S , M S , OR S , M ap}. To begin with, we should input an array ORArr = {b 1 , . . . , b r } (called input array), in which each element b i , called the index number of OR-link path, is an integer in the range of [1, |OR i |] (the number of OR-link paths of an OR relationship OR is denoted by |OR|), and indicates that the b i -th OR-link path of OR i will be traversed or selected. Next, an initial processing order is obtained by M ap. When the processing order contains names of OR relationships, any name of OR relationship should be replaced by the OR-link path of its corresponding OR relationship specified by the input array ORArr. The algorithm GENERATE-PROCESS-PLAN is outlined in Figure 4. For example, the initial processing order for job 1 (see Figure 1(a)) Algorithm: GENERATE-PROCESS-PLAN Input: ORArr = {b 1 , . . . , b r } // specify an OR-link path to be traversed for each OR relationship Output: P rocessP lan // a feasible process plan Procedure: obtain the initial processing order P rocessP lan by M ap; while (P rocessP lan contains a name of an OR relationship OR relation) obtain the index i of the name in P rocessP lan; obtain the index number of OR-link path, b, of OR relation by ORArr; delete the i-th element in P rocessP lan, and insert the b-th OR-link path of OR relation into P rocessP lan at the same position; end while; output P rocessP lan. At this point, the processing order does not contain any name of OR relationship and thus is a process plan generated for job 1.
We can randomly generate different input arrays, that is, each element b i of ORArr should be randomly generated in the range of [1, |OR i |]. Then, applying this algorithm, we will obtain all the alternative process plans for a job. For example, there are, in total, three alternative process plans for job 1 as follows: ( It is worth highlighting that different input arrays may generate a same process plan. For example, both input arrays {1, 1} and {1, 2} result in the same process plan, , for job 1. This is because the first elements of these two input arrays assert that OR 11 in M ap of job 1, O 11 − OR 11 − O 19 , will be replaced by the OR-link path {O 12 , O 13 , O 14 }, and thus the second elements of these two input arrays will not affect the final process plan of job 1.
Obviously, the FTS is precise and concise in terms of formulation of modelling a job with operation and processing flexibility and can easily generate all the alternative process plans for a job by randomly generating different input arrays.

5.
A GA-based approach. To solve the FJSP-OP, this paper proposes a GAbased approach. The approach adopts a simple but effective three-substring based encoding/decoding strategy, where a chromosome consists of three substrings: OR substring, machine assignment substring and operation sequence substring. The OR substring specifies an alternative process plan for each job, the machine assignment substring assigns only one machine for each operation of all jobs, and the operation sequence substring sequences the relative operations determined by the OR substring on a set of machines determined by the machine assignment substring. The maximum number of OR-link paths maxP is equal to the number of all the OR-link paths of the OR relationship that has the most OR-link paths among all the OR relationships of all jobs, i.e., maxP = max{|OR ij ||i = 1, . . . , n, j = 1, . . . , r(n)} The maximum number of machines maxM is equal to the number of all the alternative machines for the operation that has the most alternative machines among all the operations of all jobs, i.e., maxM = max{|M ij ||i = 1, . . . , n, j = 1, . . . , n(n)} These two variables maxP and maxM are used for encoding and decoding the OR substring and the machine assignment substring, respectively.

5.2.
Encoding strategy. Each chromosome consists of three substrings: OR substring, machine assignment substring and operation sequence substring.
(1) The OR substring The OR substring is responsible for selections of the OR-link path for all the OR relationships of all jobs. It is n-partitioned by jobs as follows: where each element b ij is a random integer in [1, maxP ]. In this substring, each job J i has r(i) numbers, i.e., b i1 , . . . , b i,r(i) , and the length of the OR substring is equal to n i=1 r(i).
(2) The machine assignment substring The machine assignment substring is responsible for machine assignments for all the operations of all jobs. It is also n-partitioned by jobs. Details of this substring are as follows: where each element m ij is a random integer in [1, maxM ]. In this substring, each job J i has n(i) numbers, i.e., m i1 , . . . , m i,n(i) , and the length of the machine substring is equal to n i=1 n(i).
(3) The operation sequence substring The operation sequence substring is an operation-based representation. It includes all the possible operations for each job and has the same length as the machine assignment substring. Figure 5 is an example of the chromosome for job 1, 2 and 3 as shown in Figure  1. In this example, maxP = 3 and maxM = 3. The procedure for decoding a chromosome is as follows: The first step is to decode the OR substring and the machine assignment substring of a chromosome into alternative process plans for all jobs and alternative machines for all the operations of all jobs, respectively. Then the results of the first step are used as input data for decoding the operation sequence substring into a feasible schedule.

5.3.1.
Decoding the OR substring. The OR substring of a chromosome can be decoded into a set of process plans for all jobs as follows. First, for any job J i , we obtain the number b ij of any OR relationship OR ij from the OR substring. Then, b ij will be mapped to an exact OR-link path of OR ij using the following formula: . . , n, j = 1, . . . , r(i) where x is the smallest integer greater than or equal to x, and b ij means that the b ij -th OR-link path of OR ij is selected.
It is worth emphasising that b ij ∈ [1, |OR ij |] ensures that we always get a valid OR-link path for an OR relationship by applying formula (4).
Finally, all the numbers b ij (i = 1, . . . , n, j = 1, . . . , r(i)) are used to construct the input array of the algorithm GENERATE-PROCESS-PLAN for job J i (i = 1, . . . , n). Then this algorithm generates a set of process plans for all jobs.
Take the OR substring, shown in Figure 5, as an example. The number b 11 related to OR 11 is 3, and we have b 11 = 2 by applying formula (4)

5.3.2.
Decoding the machine assignment substring. The machine assignment substring of a chromosome can be decoded into a set of machines for all the operations of all jobs. First, for any job J i , we obtain the number m ij for O ij from the machine assignment substring. Then, m ij will be mapped to an alternative machine for processing O ij using the following formula: . . , n, j = 1, . . . , n(i) where m ij means that O ij is assigned to the m ij -th machine (or element) of set M (O ij ). We also claim that m ij ∈   (1,9,8).
An operation precedence can be decoded into semi-active, active, non-delay, and hybrid schedules [8]. The active schedule is adopted in this study. For the sake of simplicity, this paper does not present details of the active schedule. Interested readers may refer to Baker [2].
Clearly, the proposed encoding and decoding strategies closely incorporate the FTS. A chromosome generated by this encoding strategy always represents a feasible solution. The three sub-problems of the FJSP-OP are simultaneously solved by decoding a chromosome, that is, the OR substring, the machine assignment substring and the operation sequence substring give answers to the process plan selection sub-problem, the routing sub-problem and the scheduling sub-problem, respectively. Furthermore, these three substrings are independent in terms of the encoding rules and the representing meaning. The independence of these three substrings will bring potential advantages in freely designing or selecting genetic operators for each substring. In order to operate evolutionary algorithm, an initial population is necessary. The generation of the initial population in GA is done randomly based on the encoding strategy as discussed in Section 5.2. This study considers only one objective function for the FJSP-OP, i.e., minimizing the makespan. Thus the makespan is used to evaluate fitness. Here we employ the well-known roulette wheel selection along with the elitist strategy for the reproduction operation. 5.5. Crossover. Due to the independence of the three substrings in a chromosome, this paper selects three independent classic crossover operators for the three substrings of chromosomes. The first and the second one adopt single-point crossover for both the OR substrings and the machine assignment substrings (actually any one of the classic crossover operators can be selected for these two substrings). The third one adopts precedence preserving order-based crossover (POX) for the operation sequence substrings. POX is also a classic crossover operator for the operation-based representation. In the evolution procedure, each crossover operator only exchanges information contained in its target substrings and is chosen randomly in every generation. Figure 8 is an example where the three crossover operators are all chosen.
The procedure of single-point crossover is described as follows [26]: First, randomly select two parent chromosomes P 1 and P 2, and initialize two empty offspring O1 and O2. Next, randomly select a crossover point. Then, copy the elements of P 1 and P 2, which appear in the left side of the crossover point, to the same positions in O1 and O2, respectively; the elements of P 1 and P 2, which are in the right side of the crossover point, are appended to the same positions in O2 and O1, respectively.
The procedure of POX is described as follows [36]: First, randomly select two parent chromosomes P 1 and P 2, and initialize two empty offspring O1 and O2. Next, the set of job numbers is randomly divided into two nonempty subsets S 1 and S 2 . Then, each element of P 1 that belongs to S 1 is copied to O1 at the same positions, and each element of P 2 that belongs to S 2 is appended to the remaining position of O1 in the same order that they appear in P 2. Another offspring (O2) can be produced by switching the roles of P 1 and P 2. 5.6. Mutation. For the same reason as selecting the crossover operators mentioned in Section 5.5, this paper selects three independent classic mutation operators. The first one adopts one-point mutation for the OR substrings, the second one adopts inversion mutation for the machine assignment substrings, and the third one adopts reciprocal exchange mutation for the operation sequence substrings. In the evolution procedure, each mutation operator only changes information contained in its target substrings and is chosen randomly in every generation. Figure 9 is an example where the three mutation operators are all chosen.
The procedure of one-point mutation is described as follows [26]: First, randomly select one chromosome. Then randomly select a point in the OR substring and change the number of this selected element to another integer number in [1, maxP ].
The procedure of inversion mutation is described as follows [26]: First, randomly select one chromosome. Then randomly select two points in the machine assignment substring and reverse the numbers between these two points.
The procedure of reciprocal exchange mutation is described as follows [3]: First, randomly select one chromosome. Then randomly select two points in the operation sequence substring and interchange these two numbers.
Because of the advantages resulting from the encoding and decoding strategies, the classic genetic operators can be directly implemented, and the offspring always represent feasible solutions. 6. Computational experiments. The proposed GA-based approach for the FJSP-OP is coded in C# language and implemented on a desktop computer with an Intel i7 2.0 GHz processor. To verify this approach, six computational experiments have been conducted. 6.1. Experiments.
6.1.1. Experiment 1. Experiment 1 is conducted for the problem shown in Figure  1. In this experiment, each job has both operation and processing flexibilities, and thus can be modelled by the FTS. The parameters for the proposed approach are as follows: Population size (P opSize) is 50, the probability of crossover (P c ) is 0.8,  To demonstrate the facticity of the experimental results, Figure 10 illustrates the Gantt chart of Experiment 1. The number on each color bar represents the index of an operation of its corresponding job. 6.1.2. Experiment 2. Experiment 2, constructed with 5 jobs and 5 machines, is adopted from Moon et al. [47]. In this experiment, each job has multiple process plans resulting from operation and sequencing flexibility. Each job can be regarded as a job with only one OR relationship, in which any OR-link path represents a different process plan for this job. Therefore, all jobs can be modelled by the FTS and then this experiment can be conducted. The parameters for the proposed approach are as follows: P opSize = 50, P c = 0.8, P m = 0.1, and IteN o = 50. In   Table 1, the results of the proposed approach (GA-OP) are compared with those of Evolutionary Algorithm (EA) by Moon et al. [47], Modified GA by Shao et al. [58], and Priority-Based Heuristic Algorithm (PBHA) by Dabney et al. [15]. As depicted in Table 1, GA-OP reaches the best solution found to date. 6.1.3. Experiment 3. Experiment 3 includes 6 jobs and 8 machines, and is taken from Shao et al. [58]. In this experiment, each job has both operation and processing flexibilities, and thus can be modelled by the FTS. In Table 2, the parameters and results of GA-OP are compared with those of Modified GA by Shao et al. [58] and the Ant Lion Optimization Algorithm (ALO) by Petroviä et al. [53]. As depicted in Table 2, under the same conditions of crossover probability, mutation probability and iteration number, GA-OP with a dramatically reduced population size significantly dominates the approaches of Modified GA and ALO. Figure 11 illustrates the Gantt chart of Experiment 3. For more details of the data and solution of Experiment 3, refer to the Appendix 1.  [39] with 10 jobs and 6 machines. In this experiment, each job contains multiple process plans caused by operation and sequencing flexibility and can be modelled by employing the same method used for Experiment 2. In Table 3, the parameters and results of GA-OP are compared with those of Active Learning Genetic Algorithm (ALGA) by Li et al. [39]. Clearly, GA-OP with only half of the population of ALGA, obtains a better solution than ALGA does. Figure 12 illustrates the Gantt chart of Experiment 4. 6.1.5. Experiment 5. Experiment 5 is taken from Brandimarte's data set (BRdata) [9](https://www.ime.usp.br/~cris/fjs/benchmark/brandimarte/). It consists of ten famous benchmark problems. In this experiment, each job has only operation flexibility and thus can be modelled by the FTS. Table 4 shows the experimental results and comparisons with the other algorithms. In Table 4, n × m denotes the jobs and machines about the each problem, and the results of GA-OP are compared with those of Two-stage Artificial Bee Colony (TABC) algorithm by Gao et al. [20], Hybrid Genetic Tabu Search (HGTS) by Palacios et al. [52], Memetic Algorithms2 (MA2) by Yuan and Xu [68], Hybrid Algorithm (HA) by Li and Gao [37], Particle Swarm Optimization (PSO) by Nouiri et al. [50] and Variable Neighborhood Search based Genetic Algorithm (VNSGA) by Zhang et al. [69]. Table 5 shows the computational time (in seconds) and the comparisons of the above algorithms. The parameters for GA-OP are as follows: P opSize = 200, P c = 0.8, P m = 0.1, and IteN o = 200. As depicted in Table 4, GA-OP reaches the best solutions found to date for all problems except for problem mk05 and mk10. the Gantt chart of problem mk06 is shown in Figure 13. One interesting point worth mentioning is that our Gantt chart of problem Mk06 is very different from that of Li and Gao [37], but both with the same makespan.  -OP  mk01  10x6  40  40  40  40  41  40  40  mk02  10x6  26  26  26  26  26  26  26  mk03  15x8  204  204  204 204 207  204  204  mk04  15x8  60  60  60  60  65  60  60  mk05  15x4  173  172  172 172 171  173  172  mk06  10x15  60  57  59  57  61  58  57  mk07  20x5  139  139  139 139 173  144  139  mk08  20x10  523  523  523 523 523  523  523  mk09  20x10  307  307  307 307 307  307  307  mk10  20x15  202  198  202 197 312  198 198  Figure 13. The Gantt chart of problem mk06 in Experiment 5 6.1.6. Experiment 6. Experiment 6, constructed with 18 jobs and 15 machines, is adopted from Kim et al. [31] (http://syslab.jnu.ac.kr/index.php?document_ srl=528&mid=board_PDAS73) and has been investigated frequently in previous studies [40,65]. In this experiment, each job has operation, sequencing and processing flexibility. Because the number of multiple process plans for each job is too large, it is difficult to model each job by employing the same method used in Experiment 2. Thus, to conduct this experiment, we need to re-model each job by the FTS based on the precedence relationships between operations of the experimental results of others. Experiments 6(a) and 6(b) are conducted based on experimental results of Wong et al. [65] and Zhang and Wong [70], respectively, and the results of GA-OP are also compared with them, respectively. The parameters for GA-OP are as follows: P opSize = 200, P c = 0.8, P m = 0.1, and IteN o = 200. In Table 6, the comparison of results is shown. As depicted in Table 6, GA-OP is effective for large-scale problems. Because GA-OP does not need to handle sequencing flexibility, the mean CPU time is substantially shorter than those of ACO and Enhanced ACO. Figure 14 shows the Gantt chart of Experiment 6(b).  Figure 15 illustrates the search capability and evolution speed of GA-OP in Experiment 4. It clearly shows that the curve decreases rapidly prior to the 50-th generation, and then the decrease rate slows down. At the 64-th generation, GA-OP obtains the same makespan as the final one of ALGA; at the 75-th generation, GA-OP obtains a better makespan than the final one of ALGA; and at the 95-th generation, GA-OP yields the final solution. Furthermore, GA-OP obtains a better makespan with only half of the population of ALGA [39]. Thus, GA-OP performs well in terms of convergence speed and solution quality.  mainly to the proposed encoding strategy. The advantages of the encoding strategy lie in: (1) we can select crossover/mutation operators independently for the three substrings in a chromosome, since these three substrings are independent; (2) almost any one of the classic crossover/mutation operators can be adopted for the OR substring and the machine assignment substring and can guarantee the legality of the offspring, since each gene in the OR substring or the machine assignment substring is randomly generated in the fixed interval [1, maxP ] or [1, maxM ]; (3) the operation sequence substring inherits the characteristics of the operation-based representation.
On the other hand, the proposed encoding strategy has an underlying shortcoming that the coding spaces of the OR substring and the machine assignment substring are expanded and the mapping from chromosomes to solutions is an nto-1 mapping. This is due to the fact that each gene in the OR substring or the machine assignment substring indirectly represents an OR-link path or a machine. It is reported that an EC-based algorithm with an encoding strategy of n-to-1 mapping may decrease computing efficiency [11]. However, this shortcoming is negligible when compared to the advantages of the proposed encoding strategy. This has been proven by the experimental results.

7.
Conclusions. The FJSP-OP is a common and practical case of the IPPS problem that can be found in various application areas. A Four-Tuple Scheme is proposed for modelling and representing a job with operation and processing flexibility. It can easily create all possible process plans for a job by randomly generating different input arrays of the algorithm, GENERATE-PROCESS-PLAN. GA is employed as the underlying framework for solving the FJSP-OP and closely incorporated with the FTS. To improve the optimization performance, an efficient encoding and decoding strategy is developed. The use of this strategy ensures that the classic genetic operators can be directly used, and there is no need for extra repairing algorithms to guarantee the feasibility or legality of offspring in the evolutionary process. Experiments of different sizes are conducted to compare the proposed approach with other previous methods. The experimental results show that the proposed approach achieves significant improvements.
The encoding and decoding strategy proposed in this study is limited to the FJSP-OP. It cannot be directly employed to solve the standard IPPS problem. While considering and settling the problems caused by the sequencing flexibility in the encoding and decoding strategy, it can be expanded to solve the standard IPPS problem. This would be a fruitful area for further work. Alternative machines of each operation performed for each job, processing times on the alternative machines of each operation, and the transportation times (the time units is same as processing time in Table A2) between the machines are given in Tables A1, A2 and A3, respectively.
The result of Experiment 3, shown in the Gantt chart of Figure 11, is given in terms of the starting and completion times of all operations as follow: