A Shufﬂed Frog-Leaping Algorithm with Cooperations for Distributed Assembly Hybrid-Flow Shop Scheduling with Factory Eligibility

: The distributed assembly scheduling problem with a hybrid-ﬂow shop for fabrication is seldom studied, and some real-life constraints such as factory eligibility are seldom handled. In this study, a distributed assembly hybrid-ﬂow shop-scheduling problem (DAHFSP) with factory eligibility is investigated, which has some symmetries on machines. A shufﬂed frog-leaping algorithm with cooperations (CSFLA) is applied to minimize makespan. A problem-related feature is used. Memeplexes are evaluated, and group 1, with the two best memeplexes, and group 2, with the two worst memeplexes, are formed. A new cooperation between memeplexes and an adaptive search strategy are implemented in groups 1 and 2, respectively. An adaptive cooperation between groups 1 and 2 is also given. Population shufﬂing is executed every T generations. A number of computational experiments are conducted. Computational results demonstrate that new strategies are effective and CSFLA is a very competitive algorithm for DAHFSP with factory eligibility.


Introduction
The distributed hybrid-flow shop-scheduling problem (DHFSP) is the extended version of the hybrid-flow shop-scheduling problem (HFSP) in multiple factories, each of which has a hybrid-flow shop.In the past decade, DHFSP has attracted much attention and a number of results have been obtained [1][2][3][4][5][6][7].
In the past decades, distributed assembly scheduling problems (DASP), being composed of a fabrication stage with parallel machines or permutation flow shop, transportation stage, and assembly stage, have been extensively considered [20][21][22][23][24][25]; however, transportation is often neglected and DAHFSP, which is DASP with a hybrid-flow shop at the fabrication stage, is seldom studied.
As stated above, many works have been carried out on DHFSP with various real-life constraints such as no wait, blocking, SDST, and assembly in the past five years.DASP with constraints such as setup time and maintenance is also frequently studied; however, some constraints, including factory eligibility, are seldom handled.Factory eligibility means that not all factories are eligible for each job.It is a typical constraint in multiple factories, which are obtained by mergers and acquisitions or given different production requirements.DHFSP with factory eligibility is also seldom investigated, let alone DAHFSP with factory eligibility.The considerations on factory eligibility will lead to high application value of the optimization results, thus, it is necessary to handle DAHFSP with factory eligibility.
SFLA is a meta-heuristic with a fast convergence speed, which models the behavior of frogs when searching for the location that has the most food [26].It has been diffusely exploited to deal with different scheduling problems [14,17,18,[27][28][29][30][31][32][33][34][35][36]; moreover, it can be found that SFLA has been successfully developed to solve DHFSP with SDST and multiprocessor tasks and DAHFSP.The promising advantages and search abilities are proved; moreover, in recent years, some new optimization mechanisms, such as reinforcement learning and dynamical adjustment, have been adopted in SFLA and the performance is notably improved with the usage of new mechanisms.However, the works on SFLA with new mechanisms are very limited, and some mechanisms such as cooperation are seldom adopted in SFLA; thus, on the basis of the above analyses, it is concluded that SFLA with a new optimization mechanism may be a potential method to solve DAHFSP with factory eligibility.
In this study, DAHFSP with factory eligibility is considered and a new shuffled frog-leaping algorithm with cooperations (CSFLA) is presented to minimize makespan.A problem-related feature is used.Memeplexes are evaluated, and group 1 (with the two best memeplexes) and group 2 (with the two worst memeplexes) are formed.Two new cooperations between memeplexes and two adaptive search strategies are implemented.An adaptive cooperation between groups 1 and 2 is also given.Population shuffling is executed every T generations.A number of computational experiments are conducted.Computational results demonstrate that new strategies are effective and CSFLA is a very competitive algorithm for the considered DAHFSP.
The problem is depicted in Section 2. CSFLA for DAHFSP with factory eligibility is described in Section 3. Computational experiments on five algorithms are explored in Section 4. The conclusions and future topics are provided in the final section.

Problem Description
DAHFSP with factory eligibility is described as follows.There are n products, the component set of product i is Ψ i according to bill of material.There are F heterogeneous factories, the factory f has a hybrid-flow shop, in which exists S component processing stages and m l identical parallel machines at stage l as well as a machine TM f for transportation and a machine AM f for assembling.M f lk denotes the k-th processing machine at stage l in factory f .All components of a product are first processed at the processing stage.When all components are processed, they are transported by TM f to AM f and the product is made.For a product i, all its components are handled as jobs in HFSP, and each component is fabricated in the same flow: stage 1, stage 2, . .., stage S. com ij denotes the jth component of product i and the processing time of com ij is p jil f at stage l in factory f .tr i f and as i f are the time for transportation and assembling of product i in factory f .At least one product i has a set Θ i ⊂ {1, 2, . . . ,F}. Product i can only be fabricated, transported, and assembled in a factory belonging to Θ i .
The constraints of DAHFSP have been introduced by Cai et al. [12].The newly analyzed DAHFSP with factory eligibility is composed of factory assignment, HFSP for all components of each product, and product scheduling.Strong coupled relations are among these sub-problems.
For each product, the number of its components is limited.HFSP for all its components is a small-scale problem with makespan minimization and can be easily solved by heuris-tics.This is a characteristic, so only factory assignment and scheduling for all products are required to be optimized.
The goal of the problem is to minimize makespan under the condition that all constraints are met.The optimization formulation is as follows: Subject to where C max indicates maximum completion time of all products and C i is the completion time of product i in formulation (1); constraint (2)-( 7) are some constraints on components; constraint (8)-( 11) are some constraints on products and constraint ( 12)-( 14) show the constraints on machines for component fabrication; constraint (15)-( 17) and ( 18)-( 20), respectively, indicate the constraints on the transportation machine and assembly machine; constraints (21)- (27) show the decision variables.Abbreviations provide the notations and their descriptions.
For the problem with makespan, on each machine M f lk at each stage there exists a job-related symmetry, that is, two adjacent components are exchanged and the maximum completion time of all components on M f lk is not changed.The maximum completion time of the fabrication stage is also not varied; however, makespan may be changed after transportation and assembly when two adjacent components are exchanged on a M f lk .
Tables 1 and 2 show an illustrative example with five products and 2 factories, each of which has two stages for component fabrication.

CSFLA for DAHFSP with Factory Eligibility
A kind of cooperation is implemented between the best and the worst memeplex [27].In this study, three cooperations are performed, two of which are between memeplexes and one of which is performed between two groups of memeplexes.The detailed steps of CSFLA are shown below.

Initialization
As analyzed above, only factory assignment and product scheduling are needed to be optimized after HFSP, for all components of each product are solved by heuristics.For DAHFSP with factory eligibility, n products and F factories, its solution consists of a factory assignment string [θ 1 , θ 2 , . . ., θ n ] and a product scheduling string [π 1 , π 2 , . . ., π n ], Algorithm 1 shows the detailed steps of decoding, where if more than one machine has the same smallest available time in line 8, a machine with the smallest subscript is chosen.
decide all assigned products by factory assignment string and obtain a permutation of these products in factory f , suppose that the permutation is π 1 , π 2 , . . ., π g 3: determine a permutation of all components for product π l by a heuristic 5: fabricate component com π l h on a machine M f jk with the smallest available time move all components of product π l by TM f to AM f and assemble all components. 12:

end for 13: end for
The heuristic for a permutation of all components of product i is described below.For each component com ij , compute ∑ S l=1 p jil f ; sort all components of product i in the ascending order of ∑ S l=1 p jil f and obtain a permutation.For the example in Tables 1 and 2, a solution is represented as [1, 2, 1, 2, 2] and [2,4,3,5,1].In factory 2, products 2, 4, 5 are assigned and their coresponding permutation is 2, 4, 5. Product 2 is first handled; for product 2, a permutation of its components is 1, 2, for component 1 of product 2, M 211 and M 221 are chosen.The final schedule is shown in Figure 1.
An initial population P with N initial solutions is randomly generated and then divided into s memeplexes M 1 , M 2 , . . ., M s according to the descriptions in [26].N = s × Msize, where Msize is the size of the memeplex.
Quality Me i of memeplex M i is evaluated by All memeplexes are sorted in the descending order of Me i ; suppose that Me 1 ≥ Me 2 ≥ . . .≥ Me s .Group 1 is composed of M 1 , M 2 and group 2 is made up of M s , M s−1 .A cooperation is applied in each group and cooperation between two groups is implemented.

Two Cooperations in the Search Process of Group 1
In the search process of group 1, the memeplex search is implemented by a cooperation between M 1 , M 2 in group 1, then, to implement cooperation between groups 1 and 2, the number η of the reinforcement search in group 1 is computed and the reinforcement searches are executed in M 1 , M 2 , respectively.Algorithm 2 shows the cooperation-based search process of M 1 , M 2 and Algorithm 3 describes the search process of group 1, where Ω is used to store some best solutions and Ψ is applied to keep historical data, and the integer V means the volume of Ω and Ψ.The initial Ω consists of the best V solutions of population P and the initial Ψ is empty.Ω is updated by a new solution that is better than the worst solution in it, and Ψ has the same update as with Ω if it is accumulated fully by solutions.NS l denotes neighborhood search, l = 1, 2, 3.
Algorithm 2 Cooperation within group 1 decide a set randomly choose x ∈ M 1 \∆ 1 and y ∈ M 2 \∆ 2 and choose a better solution from x, y as optimization object, suppose x is chosen, γ = 0 x is replaced and Ω is updated with z, γ = 1 end if 20: end for Cai and Lei [27] proposed two global search operators for a product scheduling string and factory assignment string.The global search is depicted as follows.For solutions x, y, randomly choose one of two operators with the same probability, and produce a new solution by the chosen operator.
Eight neighborhood structures are used.N 1 is shown below.Randomly decide a factory f and stochastically select products i, j assigned in factory f ; suppose that π g = j, insert product i into the position g of scheduling string.N 2 is described as follows.Randomly choose a factory f and a product i in factory f , stochastically decide a factory l, if l ∈ Θ i , then let θ i = l; otherwise, randomly choose a factory v, if v ∈ Θ i , then let θ i = v.N 3 is similar to N 1 ; products i, j are swapped in scheduling string.N 4 has similar steps to N 2 ; factories f , l are randomly decided, products i, j are randomly chosen from factories f , l, respectively, then i, j are exchanged in the scheduling string.Let end for 21: end for Suppose that factory 1 has the biggest completion time and factory 2 has the smallest completion time.When N 1 , N 3 are performed in factory 1, then N 5 and N 7 are obtained.N 6 is described as follows.Randomly select a product i in factory 1 and a product j from factory 2, if 2 ∈ Θ i , then let θ i = 2; otherwise, randomly decide a product j from factory 1, if 2 ∈ Θ j , then let θ j = 2. N 8 is shown below.Products i, j are randomly chosen from factories 1, 2, respectively, i, j are exchanged in the scheduling string, and let θ i = 2 and NS 1 for solution x is shown as follows.Randomly choose a v ∈ {1, 2, 3, 4}, sequentially execute N 2×(v−1)+1 , N 2×(v−1)+2 on x, a new solution z is obtained, if z is better than x, then z substitutes for x.
In Algorithm 3, for each x ∈ ∆ i , C x max is greater than the average makespan of ), the condition of line 6 means that C x max slightly exceeds the average makespan and the condition of line 17 denotes that C x max exceeds greatly the average makespan.The search operator is decided adaptively by one of the above conditions; moreover, the cooperation-based search process between M 1 , M 2 acts on solutions out of ∆ 1 , ∆ 2 and reinforcement search is performed on solutions in ∆ 1 , ∆ 2 , as a result, exploration ability of CSFLA is intensified greatly.if C z max < C x 3 max then 16:

Cooperation-Based
x 1 = x 3 and x 3 = z 17: execute a chosen one from NS 2 and NS 3 with the same probability on x 3 21: end if choose one NS i with the same probability from NS 1 , NS 2 , NS 3 and execute the chosen NS i on the replaced solution 36: end for The similar steps with lines 4-18 of Algorithm 2 are shown below.x is optimization object, which is randomly chosen from x 1 , x 2 , y is x 3 in all lines except lines 5-9, in which x, y is changed into x 1 , x 2 , respectively.
In Algorithm 4, M s and M s−1 are combined into a new memeplex TE and search process in TE is executed by an adaptive search strategy based on δ.The search times of group 2 is 2µ − η, the reinforcement search of group 1 is executed η times in Algorithm 3, and M s , M s−1 are updated by using solutions from M 1 , M 2 or Ω.This is an adaptive cooperation between two groups.

Algorithm Description
Algorithm 5 describes the detailed steps of CSFLA, where T is the integer.When gen is divided exactly by T, all evolved memeplexes are formed into a new population P.
Unlike the previous SFLA [14,17,18,27,35], CSFLA has some new features.(1) Memeplexes are evaluated and two groups are formed by using M 1 , M 2 , M s−1 , M s .(2) A cooperation between two memeplexes is performed in groups 1 and 2, respectively, and an adaptive cooperation between groups 1 1 and 2 is implemented, so three cooperations are used.(3) An adaptive search strategy is applied in groups 1 and 2, respectively, and population shuffling is executed every T generations; as a result, memeplexes and groups can exist in T generations and can be evolved well by using the same solution structure in each memeplex.

Computational Experiments
All experiments are implemented by using Microsoft Visual C++ 2019 and run on 8.0G RAM 2.4 GHz CPU PC.

Test Instances and Comparative Algorithms
112 instances are used, each of which is depicted as . All of the above data are integers.
HVNS is used to solve the distributed assembly flow shop-scheduling problem.HVNS can be applied to address DAHFSP after heuristics for HFSP for all components of each product in Section 3.1 is used.IWOA is to solve distributed assembly flow shop scheduling with transportation.It can be used to solve our DAHFSP after the heuristic for HFSP of Section 3.1 is adopted.
IDCOA with only product permutation is handled to deal with the three-stage assembly flow shop-scheduling problem.To solve DAHFSP, heuristics for HFSP for all components of each product is added, factory assignment and N 5 are adopted, and a global search of CSFLA substitutes for the immigration operator of IDCOA is carried out.
SFLA is used to test the effect of the new strategies in CSFLA.The search process within each memeplex has similar steps with the search process of M 3 SFLA, however, y is the second best solution in M i and the random way of Section 3 substitutes for the random selection from NS 1 , NS 2 , NS 3 , no cooperations are used and T is 1.

Parameter Settings
CSFLA has following parameters: N, s, µ, T, V, and a stopping condition.It can be found that CSFLA can converge well when time reaches 0.1 × n × S seconds CPU; moreover, when 0.1 × n × S seconds CPU time is applied, all comparative algorithms also converge well, so this time is chosen as stopping condition.
The taguchi method [40] is used to decide the settings for other parameters by using the instance 60 × 4 × 4. Table 3 shows the levels of each parameter.The orthogonal array L 16 (4 5 ) is tested.CSFLA with each combination runs 10 times independently, for instance 60 × 4 × 4. Figure 2 shows the results of MI N and S/N ratio, which is defined as −10 × log 10 (MIN 2 ).It can be found from Figure 2 that CSFLA with following combination N = 60, s = 10, µ = 50, T = 5, V = 4 can obtain better results than CSFLA with other combinations, so the above parameter settings are chosen.SFLA has N = 60, s = 10, µ = 50, and the above stopping condition.The parameter settings of the three comparative algorithms are directly selected from the references, except for the stopping condition, because of the effectiveness of these settings of each comparative algorithm.

Results and Discussions
CSLFA, SFLA, and three comparative algorithms are compared.Each algorithm randomly runs 10 times for each instance.MI N (MAX) denotes the best (worst) solution's C max found in the 10 runtimes and AVG denotes the average C max of solutions in 10 runtimes.Tables 4-6 describe the corresponding results of five algorithms.Figures 3 and 4 show convergence curves and box plots of all algorithms.The relative percentage deviation (RPD) between the best-performing algorithm and the other four algorithms is used in Figure 4 and Table 7 gives the results of the paired-sample Wilcoxon test.As shown in Table 4, CSFLA obtains smaller MI N than SFLA on all instances and MI N of CSFLA is lower than that of SFLA by at least 50 of 101 instances.CSFLA converges better than SFLA.It can be found from Table 5 that MAX of CSFLA is better than that of SFLA in 111 of 112 instances and SFLA is worse MAX than CSFLA in at least 50 of 91 instances.CSFLA possesses better stability than SFLA.Table 6 show that CSFLA obtains smaller AVG than SFLA on all instances and AVG of CSFLA is better than SFLA in at least 50 f 96 instances.CSFLA has a better average performance than SFLA.The significant performance differences between CSFLA and SFLA also can be seen from Table 7 and Figures 3 and 4. The new strategies such as the three cooperations really have a positive impact on the performance of CSFLA, so the new strategies are effective.
Table 4 show that CSFLA performs better than IDCOA, HVNS, and IWOA on MI N. CSFLA produces smaller MI N than with three comparative algorithms on 104 of 112 instances; moreover, MI N of CSFLA is less than that of IDCOA by at least 50 in 26 instances, HVNS by at least 50 in 45 instances, and IWOA by at least 50 in 88 instances.CSFLA converges better than the three comparative algorithms.The results in Table 7, Figures 3 and 4 also reveal the convergence advantage of CSFLA.
As stated in Table 5, CSFLA produces smaller MAX than three comparative algorithms in 102 instances.CSFLA obtains smaller MAX than IDCOA by at least 50 in 20 instances; MAX of CSFLA is less than that of HVNS by at least 50 in 95 instances and IWOA produces a larger MAX by at least 50 in 86 instances.CSFLA performs better than its comparative algorithms on stability performance.Figure 4 and Table 7 also depict the obvious stability performance difference between CSFLA and its comparative algorithms.
It also can be found from Table 6 that CSFLA outperforms its three comparative algorithms on AVG.CSFLA generates better AVG than its comparative algorithms in 107 instances.The advantages of CSFLA on average performance can also can be drawn from Table 7 and Figure 4.
CSFLA possesses three cooperations, two of which are used between two memeplexes of groups 1 and 2, and one of which is performed between group 1 and group 2. The adaptive search strategy is also used in search process of each group.These cooperations can make full use of the good solutions in memeplexes of group 1 and avoid the computing resource waste in group 2; as a result, exploration is intensified effectively and high diversity can be kept.The periodical population shuffling can result in good solution structure of memeplexes in T generations.The exploitation ability is also enhanced, so the new strategies of CSFLA can make a good balance between exploration and exploitation, and CSFLA produces promising results on DAHFSP with factory eligibility, which enriches the optimization algorithm mechanism to solve the analyzed production scheduling problem.

Conclusions and Future Topics
DAHFSP with transportation and factory eligibility is seldom considered.In this study, a new algorithm named CSFLA and based on three cooperations is presented to solve DAHFSP with factory eligibility.The problem-related feature is used.Memeplexes are evaluated, group 1 (with the two best memeplexes) and group 2 (with the two worst memeplexes) are formed.A new cooperation between memeplexes and an adaptive search strategy are implemented in each group.An adaptive cooperation between groups 1 and 2 is also given.Population shuffling is executed every T generations.Extensive computational experiments are conducted on 112 instances.Computational results demonstrate that new strategies are effective and CSFLA is a very competitive algorithm for the considered DAHFSP with makespan minimization.However, in real-life manufacturing exists complex processing environments and constraints, which may cause limitations for this research.
Production scheduling problems exist in the real-life manufacturing processes such as the casting process and engine assembly plant, and these problems have some special features.For example, batch processing machines exist in the last stage of HFSP in the steelmaking continuous-casting process.We will focus on production scheduling problems in the casting process or other real-world manufacturing issues, and try to solve them by applying the characteristics of the problems and the new optimization mechanisms of meta-heuristics.

Figure 1
describes a schedule of the example.

Figure 1 .
Figure 1.A schedule of the example.

4 :
execute global search between x and y and obtain a new z 5:

Algorithm 5 CSFLA 1 : 8 :
randomly produce initial population P, let gen = 1 2: divide population P into s memeplexes 3: while stopping condition is not met do 4: compute Me i for each memeplex M i and construct groups 1 and 2 5: execute cooperation within group 1 and reinforcement search process in group 1 6: perform search process of each memeplex M i , i = 1, 2, s − 1, s 7: execute cooperation-based search process of group 2 if gen is exactly divided by T then 9: perform memeplex shuffling and divide population P into s memeplexes 10: end if 11: gen = gen + 1 12: end while The search process ofM i , i = 1, 2, s − 1, s is depicted below.x b ∈ M i is the optimization object, a solution y ∈ Ω is randomly decided, aglobal search is performed between x b and y, if C z max < C x b max , then x b = z; otherwise, execute a global search between x b , gbest and produce a new z , if C z max < C x b max , then x b = z ; otherwise, perform a chosen one of NS 1 , NS 2 , NS 3 with the same probability on x b .

Figure 2 .
Figure 2. Main effect plot for mean MI N and S/N ratio.

Figure 4 .
Figure 4. Box plots of five algorithms.

Table 1 .
The example information of products.

Table 2 .
The processing information of components.
are exchanged in the scheduling string and let θ i = v and θ j = f .Reinforcement search process in group 11: execute cooperation-based search process of M 1 , M 2 in Algorithm 2 2: compute u 1 = η × Me 2 (Me 1 + Me 2 ) and u 2 = η − u 1 3: for i = 1 to 2 do 4: for v = 1 to u i do 5:decide sets ∆ i , randomly choose a x ∈ ∆ i , x = x w and compute λ x otherwise, randomly choose a y ∈ Ω, select one of NS 2 and NS 3 with the same probability, execute the chosen one on y and y substitutes for x execute global search between y and gbest, obtain a new z and replace x with z, γ = 1 if if γ = 0 or Ψ is empty then 15: randomly choose a y ∈ Ω, perform global search between x, y, produce a new z , if z is better than x, x = z , otherwise, perform NS 1 on y, x = y 16: end if 17: else 18: perform global search between x, gbest and obtain a new z, if C z max < C x max , then replace x with z; Search Process of Group 2Algorithm 4 describes the cooperation-based search process of group 2, where δ and num are defined.two best solutions x 1 , x 2 ∈ TE, suppose x 1 is chosen, C x 1 max < C x 2 max , a randomly chose solution x 3 ∈ Ω decide randomly choose one of x 1 , x 2 ,let γ = 0 7: if Ψ is not empty then 8:randomly select y ∈ Ψ, if y is better than x 1 , then x 1 = y, γ = 1; otherwise, if y is better than x 2 , then x 2 = y and γ = 1 9: end if 10: if Ψ is empty or γ = 0 then perform global search between x 3 , gbest and obtain a new z 15: ∈ M 1 and replace the worst solution in TE with x ∈ M 2 and replace the worst solution in TE with x ∈ Ω and replace the worst solution in TE with x

Table 3 .
Parameters and their levels.

Table 4 .
Computational results of instances of five algorithms on MIN.

Table 5 .
Computational results of instances of five algorithms on MAX.

Table 6 .
Computational results of instances of five algorithms on AVG.

Table 7 .
Results of Wilcoxon test.