Research on Green Reentrant Hybrid Flow Shop Scheduling Problem Based on Improved Moth-Flame Optimization Algorithm

: To address the green reentrant hybrid ﬂow shop-scheduling problem (GRHFSP), we performed lifecycle assessments for evaluating the comprehensive impact of resources and the environment. An optimization model was established to minimize the maximum completion time and reduce the comprehensive impact of resources and the environment, and an improved moth-ﬂame optimization algorithm was developed. A coding scheme based on the number of reentry layers, stations, and machines was designed


Introduction
The reentrant scheduling problem was first studied by Graves et al. [1] in 1983.The underlying assumption of the traditional scheduling problem is that each workpiece can be processed on one machine at most once.However, during actual production, a workpiece may be processed on the same machine multiple times.For example, in semiconductor or wafer manufacturing, each component must be machined one or more times to ensure reliability.This presents the reentrant scheduling problem.
Lifecycle assessment (LCA) is an evaluation technique for environmental attributes [2]; it is widely used for quantitative analysis and obtaining evaluation characteristics, so it is applied in various fields.First, the energy consumption and environmental release throughout the lifecycle of a product are quantified.Then the environmental impact of such consumption and release is evaluated.Finally, opportunities to reduce such impacts are identified and evaluated.In this study, LCA was applied to the green reentrant hybrid flow shop-scheduling problem (GRHFSP) to construct an environmental impact assessment model for resource scheduling and to analyze the impact of pollutant discharge during production on the environment.Recently, the problem of reentry shop scheduling has attracted considerable attention from scholars worldwide.To simultaneously improve the green performance indices and economic performance indices of enterprises, we examined the GRHFSP.
The main contributions of this study are as follows:

Literature Review
We present a literature review from three perspectives: the GRHFSP, LCA, and algorithms.

GRHFSP
When solving the reentrant scheduling problem, Dugardin et al. [3], Ying et al. [4], and Geng et al. [5] studied the multi-objective reentrant mixed-flow shop-scheduling problem, and the optimization objectives were to minimize the maximum completion time, maximize the utilization rate of bottleneck equipment, minimize the number of delays, and minimize the idle power consumption.To increase the production rate and improve the service quality, Rifai et al. [6] studied distributed reentrant permutation flow shop scheduling.Chamnanlor [7] studied the reentrant mixed-flow shop-scheduling problem with time-interval constraints.However, the environment has been irreversibly damaged owing to economic development, and recent studies have failed to consider such environmental impacts.Therefore, the concept of green manufacturing has been proposed to achieve economic growth while reducing the negative impact on the environment [8].Most scholars who have studied reentrant scheduling did not consider the problem of green manufacturing.Therefore, this paper proposes a method for achieving green scheduling and solving the reentrant scheduling problem simultaneously.
With the development of the manufacturing industry, problems such as environmental pollution and resource shortages have emerged.Thus, green shop-scheduling problems have been proposed [9], and in recent years, scholars worldwide have conducted several studies on green shop-scheduling.Guo et al. [10] proposed a novel ultra-low idle state for machine tools, which is realized by switching off a part of the power load in an idle status.Accordingly, an energy-efficient model for a flow shop was developed considering three machine-tool statuses.In addition, a hybrid genetic algorithm (GA) was proposed to solve this problem.Dong et al. [11] developed a distributed two-stage reentrant hybrid flow shop-bilevel-scheduling model that considered the makespan, total carbon emissions, and total energy consumption costs as the optimization objectives.An improved hybrid salp swarm algorithm and nondominated sorting GA II (NSGA-III) have also been proposed, and these algorithms have been proven to have significant advantages in solving such problems.Ghorbani et al. [12] considered the permutation flow shop-scheduling problem and aimed to minimize the total tardiness and total carbon emissions.Xiuli et al. [13] considered a multi-objective flexible flow shop-scheduling problem with variable processing times.Subsequently, a hybrid nondominated sorting GA with variable local search was proposed to solve the problem.Lu et al. [14] were the first to study this distributed permutation flow shop problem with limited buffers, with the objectives of minimizing the makespan and total energy consumption.They proposed a Pareto-based collaborative multi-objective optimization algorithm and designed a speed-scaling strategy based on the problem.Experimental results indicated that the algorithm could be used to solve this problem.Mansouri et al. [15] weighed the relationship between the energy consumption and the maximum completion time for the green flow job shop-scheduling problem and investigated the energy-saving potential in the manufacturing industry by using different speeds of machining operations to produce different energy-consumption levels.Tang et al. [16] studied energy-saving flexible job shop-scheduling under uncertain conditions and designed an improved particle swarm optimization algorithm to solve this problem.Relevant research results for batch processing problems [17,18] and the carbon efficiency optimization scheduling of an assembly shop have also been reported [19,20].Yin et al. [21] proposed a low-carbon mathematical scheduling model that could optimize the production efficiency, energy efficiency, and noise for a flexible job shop environment and proposed a multi-objective GA to efficiently solve this mixed-integer programming model.In the present study, LCA was used to evaluate the environmental impact of the job shop-scheduling process, determine the primary environmental impact types of the process, and establish a green scheduling model based on the green indicator.

LCA
LCA is widely used in the agricultural and industrial food industries [22], in the building energy sector [23], and for offshore wind turbines [24].It is also applied to research on green manufacturing-related problems.Basbagill et al. [25] proposed a method for performing LCA during early decision-making to significantly reduce the implied carbon footprint.Loiseau et al. [26] developed a green economy framework based on LCA and cost effectiveness.In the present study, LCA was applied to the GRHFSP.

Algorithms
The GRHFSP is an NP-hard problem, and exact methods and heuristics are unsuitable for large-scale complex problems.By contrast, metaheuristics can be used to obtain near-optimal solutions within a certain time.In recent years, various metaheuristics have been developed and applied to shop floor scheduling problems.Common metaheuristics include GAs [27], the gray wolf optimizer [28], the artificial bee colony algorithm [29], the MFO algorithm [30], particle swarm optimization [31], the imperialist competitive algorithm [32], and variable neighborhood search [33].The MFO algorithm is a bionic algorithm.Mirjalili et al. [34] proposed the basic MFO algorithm in 2015, tested 29 basic functions and 7 practical engineering problems, and verified its rationality.Since its introduction, the MFO algorithm has been widely used in power scheduling [35], economic scheduling [36], agricultural production [37], and surgical scheduling [38] and has achieved good results.It can appropriately coordinate the global search and local search processes and avoid falling into a local optimum.In addition, it has the advantages of fast convergence, a high search accuracy, and strong robustness.Therefore, in this study, the MFO algorithm was used to solve the GRHFSP.The GRHFSP can be explained as follows: N workpieces are processed at S stations.There are m i (m i ≥ 1) unequal parallel machines at station i, and each workpiece goes through all the stations in the same order.Any machine belonging to a station can be selected for processing.After each workpiece visits the last station of the current layer, it revisits the first station to start the processing of the next layer, and this process is repeated L times until the workpiece processing is complete.Figure 1 presents a schematic of reentrant machining with N workpieces and S stations, where each station has m i parallel machines.through all the stations in the same order.Any machine belonging to a station can be selected for processing.After each workpiece visits the last station of the current layer, it revisits the first station to start the processing of the next layer, and this process is repeated L times until the workpiece processing is complete.Figure 1 presents a schematic of reentrant machining with N workpieces and S stations, where each station has mi parallel machines.The scheduling problem has the following basic assumptions:

Problem Description and Mathematical Modeling
(1) The machine is available at time zero, and all workpieces can be machined at time zero.(2) Special circumstances, such as machine failures, are not considered.
(3) A workpiece can be processed at most on a single machine at any time.The workpieces do not affect each other.(4) The number of reentrant layers per workpiece, processing time of the sequence, and specific energy consumption of the machine are known and constant.(5) The buffer zone of each station is infinite.(6) The processing time and path of the workpiece are deterministic.

LCA for Environmental Impact
In this study, the following four impact categories were considered in the LCA: climate change, atmospheric acidification, photochemical smog, and resource consumption.The environmental impact assessment model for the lifecycle of a reentrant workshop production process is depicted in Figure 2. The scheduling problem has the following basic assumptions: (1) The machine is available at time zero, and all workpieces can be machined at time zero.(2) Special circumstances, such as machine failures, are not considered.
(3) A workpiece can be processed at most on a single machine at any time.The workpieces do not affect each other.(4) The number of reentrant layers per workpiece, processing time of the sequence, and specific energy consumption of the machine are known and constant.(5) The buffer zone of each station is infinite.(6) The processing time and path of the workpiece are deterministic.

LCA for Environmental Impact
In this study, the following four impact categories were considered in the LCA: climate change, atmospheric acidification, photochemical smog, and resource consumption.The environmental impact assessment model for the lifecycle of a reentrant workshop production process is depicted in Figure 2.

Figure 2.
Environmental impact assessment model.
After classifying the impact of each emission substance, the environmental load index method was used to determine the contributions of various substances to the same environmental impact type and to determine the comprehensive environmental load of each impact type.The total amount of emissions resulting from each substance was thus obtained.According to factory data, the standard values for global warming, acidification, After classifying the impact of each emission substance, the environmental load index method was used to determine the contributions of various substances to the same environmental impact type and to determine the comprehensive environmental load of each impact type.The total amount of emissions resulting from each substance was thus obtained.According to factory data, the standard values for global warming, acidification, photochemical pollution, and resource consumption are 2.902, 3.268, 0.048, and 5.903, respectively.Therefore, climate change, acidification, and resource consumption were deemed to be the main sources of the pollution caused by reentrant workshops.

Variable Definitions
(1) Indices and collection I: Station serial number, i ∈ {1, 2, . . . . . . ,S} j: Workpiece serial number, j ∈ {1, 2, . . . . . . ,N} q: Machine code, q ∈ {1, 2, . . . . . . ,M} a: Machine serial number at station i, a ∈ {1, 2, . . . . . . ,mi} k: Process number of workpiece j, a ∈ {1, 2, . . . . . . ,mi} O jk : k th process of workpiece j U i : Set of all operations processed at station i L j : L j th -layer operation of workpiece j W qj : Machining power of machine q for processing workpiece j W p : Startup energy consumption of machine q W s : Idling power of machine q t sj : Idling time after machine q completes the processing of workpiece j EIe: Resources and environmental impact of electricity generation (unit: (KWh) −1 ) EIr: Resources and environmental impact of raw materials (unit: (kg) −1 ) EIp: Resources and environmental impact of thermal processing (unit: (kg) −1 ) A: Sufficiently large positive number (3) Decision variables Y qt : If machine q is in the processing state at processing time t, it is 1; otherwise, it is 0. r ijka : If operation O jk is processed on the a th machine at station i, it is 1; otherwise, it is 0. According to the characteristics of the GRHFSP problem examined in this study, minimizing the makespan and minimizing the comprehensive resource and environmental impacts were selected as the targets.
(1) Minimizing the makespan: The time at which the last workpiece is processed is referred to as the maximum completion time of the entire process.
(2) Minimizing the comprehensive resource and environmental impacts: These include the impacts of raw material lifecycle emissions, the environmental impacts of electricity consumption, and the environmental impacts of resources in the production process.The minimization of the comprehensive resource and environmental impacts is a measure of the impact of resource consumption during the entire production process and pollutant discharge on environmental resources and can be expressed as Among these impacts, the resource and environmental impact of raw materials f EIr is as follows: The resource and environmental impact of thermal processing f EI p is The effects of energy consumption cover the machine state, idling state, and energy consumption at startup.The resource and environmental impact of electricity consumption f EIe is expressed as follows: Therefore, the comprehensive resource and environmental impact, i.e., EIL, is expressed as Hence, r ijN j a S jN j + P jN j ; ∀j (13) Constraint (7) ensures that the start processing time of operation O j(k+1) is not earlier than the processing completion time of operation O jk .Constraint (8) ensures that each process can be processed on only one machine at the corresponding station.Constraints ( 9)-( 11) ensure that each machine can simultaneously process at most one process.Constraint (12) specifies the start and finish times of operation O jk .Constraints ( 13) and ( 14) express the maximum makespan.

Algorithm Design
where n represents the number of moths, d denotes the dimension of a variable, m nd represents the position of the nth moth, and F nd represents the position of the nth flame.

Encoding and Decoding
The MFO algorithm is often used for the optimization of continuous-function problems but is rarely used for the optimization of discrete problems.However, the GRHFSP is a typical discrete problem that involves multiple processing instances of workpieces, multiple stations, and multiple machine selections.Therefore, in this study, we designed a coding rule based on the number of reentrant layers, stations, and machines.For example, let X = [X p | X m ] represent a feasible solution to the scheduling problem.Herein, the vector X p represents process ordering based on the number of reentrant layers, the vector X m represents machine selection, and a one-to-one correspondence exists between each vector.A problem with two workpieces and two stations is considered as an example.Herein, the number of reentrant layers per workpiece is three, and the number of nonequivalent parallel machines at each station is two.The specific coding steps are as follows: Step 1: Process-layer coding.The coding of the process ordering layer adopts processbased integer coding rules; the element in the X p vector represents the workpiece number, and the total number of occurrences of this element is equal to the product of the number of stations S and the number of reentrant layers L. Each occurrence of S represents a layer of operations, and the order in which the elements appear in any layer of operations indicates to the process and station of the workpiece.Herein, X p = [1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2], as shown in Figure 3. Considering Workpiece 1 as an example, the "1" in the first position indicates that Process 1 of the first layer operation of Workpiece 1 is performed on a certain machine at Station 1.The "1" in the second position indicates that Process 2 of the first layer operation of Workpiece 1 is performed on a certain machine at Station 2. After Process 2 is performed, the first layer operation of Workpiece 1 terminates.The value of "1" in the third position indicates that the second operation of Workpiece 1 is processed on a certain machine at Station 1.The "1" in the sixth position indicates that Process 2 of the third layer operation of Workpiece 1 is performed on a certain machine at Station 2.
as shown in Figure 3. Considering Workpiece 1 as an example, the "1" in the first position indicates that Process 1 of the first layer operation of Workpiece 1 is performed on a certain machine at Station 1.The "1" in the second position indicates that Process 2 of the first layer operation of Workpiece 1 is performed on a certain machine at Station 2. After Process 2 is performed, the first layer operation of Workpiece 1 terminates.The value of "1" in the third position indicates that the second operation of Workpiece 1 is processed on a certain machine at Station 1.The "1" in the sixth position indicates that Process 2 of the third layer operation of Workpiece 1 is performed on a certain machine at Station 2.   Step 2: Machine-layer encoding.The element in the machine-selection layer X m the machine number of the processing machine at the corresponding station of the corresponding process of X p .Elements 1 and 2 represent Machines 1 and 2, respectively.As shown in Figure 3 According to the above coding process, a feasible solution can be obtained as X = [1, 1, 1, 2, 2, 1, 1, 2, 1, 2, 2, 2|1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2].The decoding of X involves the inverse process of encoding X p and X m , and O jkd represents the k th process of workpiece j for the d th layer.

Population Initialization
The GRHFSP has a large space for generating solutions during population initialization.To ensure the speed and quality of the algorithm, we used a combination of random generation and strategy selection to generate the initial solutions.Specifically, 50% of the initial population was randomly generated, and the remaining 50% was generated using the strategy-selection method based on the optimized completion time.In addition, the M and F matrices must be initialized.First, an M matrix containing n moths is randomly generated.Thereafter, the position elements of each moth and the process layer elements of each initial solution are sequentially obtained.The fitness value of each individual is determined, and nondominated sorting is performed.The position element of the moth corresponding to the individual with the best fitness value is placed in the first row of matrix F. The position element of the moth corresponding to the individual with a suboptimal fitness value is placed in the second row of matrix F. By the time the position element of the moth corresponding to the individual with the worst fitness value is placed in the last row of matrix F, a complete initial F matrix is generated.

Moth Location Update Strategy
In the MFO algorithm, updating the moth position significantly affects the feasible solution.Herein, both the moth and flame can be considered feasible solutions.The difference between them lies in the manner in which they are processed and updated in each iteration.The moth constitutes the main body of the actual search, moving in the search space, and the flame denotes the best position reached by the moth.Flames can be considered markers discarded by moths while searching the search space, and each moth updates the flame when it finds a better solution.According to this mechanism, the moth cannot miss its best solution.
A logarithmic spiral is selected to update the operating mechanism of moths and is defined as follows: where M i represents the i th moth, F j represents the j th flame, b is the logarithmic spiral shape constant, t represents a random number in the range [-1, 1], and D i represents the distance between the i th and j th flames.
Equation ( 17) describes the spiral flight path of the moths and determines the next position of the moth relative to the flame.The parameter t indicates the closeness of the moth's next position to the flame (t = −1 indicates the position where the moth is closest to the flame, and t = 1 indicates the position where the moth is farthest from the flame.) As different coding methods were used in the process ordering layer and machineselection layer, to avoid the use of the same update method for both and to avoid producing inferior solutions, in this study, different update strategies were selected for updating according to the above coding rules.For the process sorting layer, the process sorting was changed by updating the M matrix in an ascending order.The machine-selection layer was updated using swaps and transformations.
Step 1: Equation ( 17) is used to update the matrix M. If this is the first iteration, the initial matrices M and F are used.Each successive iteration then uses the updated matrices M and F after the previous iteration to calculate the distance between the moth and the flame.
Step 2: For the process layer in the individual, the position of the smallest random number in the position element of the moth is recorded and marked.The value of this position in the offspring individual is equal to the value of the first position in the parent individual.The value at the position of the child, where the second-smallest random number appears in the moth position element, is equal to the value at the second position of the parent.Sequential updates are performed until the process layer in the offspring is updated.As shown in Figure 4, for the machine layer in the individual, exchange and deformation operations are used between parent individuals to generate the machine layer of the child individual.The specific operation is illustrated in Figure 5. First, two machine parent individuals from the population are selected randomly and denoted as X m1 and X m2.Thereafter, machine = {1, 2, 3} is randomly assigned to two nonempty and complementary sets MachineSet1 = {1} and MachineSet2 = {2, 3}.Finally, the machine serial number contained in MachineSet1 is selected from parent X m1 ; the order is maintained, and it is copied into child X m1 .The machine number contained in MachineSet2 is selected from parent X m2 and then inserted sequentially into the vacant position in child X m .After the exchange operation, a deformation operation is performed on the generated offspring X m , which can increase the diversity of the population.complementary sets MachineSet1 = {1} and MachineSet2 = {2, 3}.Finally, the machine serial number contained in MachineSet1 is selected from parent Xm1; the order is maintained, and it is copied into child Xm1.The machine number contained in MachineSet2 is selected from parent Xm2 and then inserted sequentially into the vacant position in child Xm.After the exchange operation, a deformation operation is performed on the generated offspring Xm, which can increase the diversity of the population.complementary sets MachineSet1 = {1} and MachineSet2 = {2, 3}.Finally, the machin number contained in MachineSet1 is selected from parent Xm1; the order is main and it is copied into child Xm1.The machine number contained in MachineSet2 is s from parent Xm2 and then inserted sequentially into the vacant position in child X the exchange operation, a deformation operation is performed on the generated of Xm, which can increase the diversity of the population.Step 3: The fitness value of the offspring individuals is calculated, and the fitness values of the offspring and parent individuals are sorted.The fitness values of the offspring and parent are Pareto nondominated.If they belong to the same Pareto rank, they are sorted according to the crowding distance [39].
Step 4: According to the sorting results, n individuals with the best fitness values are selected to create a new population.To arrange the population in accordance with the rules, the position element of the moth corresponding to the individual with the best fitness value is placed in the first row of the matrix F, and the position element corresponding to the moth with the second-best fitness value is placed in the second row of the matrix F. A new matrix F is thus generated, as the position element of the moth corresponding to the individual with the worst fitness value is placed in the last row of F.
Step 5: Next, it is determined whether the system has reached the maximum number of iterations.If this is true, updating is terminated, and the optimal solution is output.Otherwise, Steps 1-4 are repeated until the maximum number of iterations is reached.

Flame Number Update
In the moth update mechanism, moths are only allowed to move in the direction of the flame, which causes the MFO algorithm to fall quickly into a local optimum.To avoid this situation, each moth can only use one flame in Equation (17) to update its position, after which the moths are sorted according to the fitness values of the corresponding individuals, and the positions of the moths are updated relative to their corresponding flames.Allowing them to move around different flames improves the update efficiency of moths in the search space and reduces the local optimal stagnation rate.
Consequently, moths are required to update their positions around different flames, which facilitates global exploration.However, this is not conducive to the development of an optimal solution.To solve this problem, Equation ( 19) is used to reduce the number of flames in the iterative process, and moths that exceed the number of flames must update their positions relative to the last flame.
Here, l represents the number of current iterations, N represents the maximum number of flames, and T represents the maximum number of iterations.

IMFO Algorithm Flowchart
According to the above description, a flowchart of the IMFO algorithm used in this study is presented in Figure 6.

Parameter Settings
To address the reentrant mixed-flow workshop-scheduling problem, 10 examples of standard gas manufacturing plants were introduced for testing.The parameters of the tests are presented in Table 1, and the names of the examples consist of letters and numbers.For example, "L2i10j20-2" indicates that the number of reentrant layers is 2, the number of locations is 10, the number of jobs is 20, each station has two processing machines, and the processing time is a random number that obeys the discrete uniform distribution of [1,10]

Parameter Settings
To address the reentrant mixed-flow workshop-scheduling problem, 10 examples of standard gas manufacturing plants were introduced for testing.The parameters of the tests are presented in Table 1, and the names of the examples consist of letters and numbers.For example, "L2i10j20-2" indicates that the number of reentrant layers 2, the number of locations is 10, the number of jobs is 20, each station has two processing machines, and the processing time is a random number that obeys the discrete uniform distribution of [1, 10] [40].For multi-objective problems, three evaluation criteria are used to evaluate the quality and diversity of nondominated solutions.The specific methods are as follows.
(1) Convergence index: The approximation degree between the obtained Pareto front and the optimal Pareto front is evaluated.A smaller value indicates better convergence of the algorithm and better diversity of noninferior solutions.
(2) Diffusion of nondominant solutions, SNS: When quantifying the diversity of nondominant solutions, a larger SNS value corresponds to richer diversity of nondominant solutions and better quality of the solutions.
(3) The dominance rate POD quantifies the ability of an algorithm to dominate other algorithms.A higher POD value corresponds to better performance of the algorithm.

Discussion
To verify the effectiveness of the IMFO algorithm, it was compared with the improved gray wolf optimization algorithm, improved NSGA-II, multi-objective particle swarm optimization, and discrete artificial bee colony algorithm.To ensure the validity of the comparisons, the operating environment for all experiments comprised a 2.7-GHz CPU, 8 GB of random access memory, and a 64-bit Windows 7 system computer, and the programming environment was MATLAB 2016.To avoid the chance of an experiment, each algorithm was run 20 times independently, and the mean values of the three aforementioned evaluation indicators were calculated to verify the quality of the nondominated solution obtained by the algorithm.In this paper, the optimal value of each index is marked in bold.As indicated by Table 2, the IMFO algorithm is superior to the other algorithms with regard to index analysis, as indicated by its better convergence and diversity of noninferior solutions.From the perspective of the SNS index, the IMFO algorithm achieved better results than the other algorithms for most examples, indicating that the nondominated solutions obtained by the IMFO algorithm were more diverse.Regarding the POD index, the dominant power of the nondominant solution obtained by the IMFO algorithm was the best in most cases.In general, as shown in Table 2, the γ, SNS, and POD parameters of the IMFO algorithm were For L2I6J14-2, the green reentry mixed-flow shop-scheduling problem was solved using the IMFO algorithm.The solution obtained is presented in Figure 8. Herein, the abscissa indicates the processing time, and the ordinate indicates the processing station, wherein numbers 1-6 correspond to the first process and 6-12 correspond to the second process.The processing time for obtaining the solution was 518 h.For L2I6J14-2, the green reentry mixed-flow shop-scheduling problem was solved using the IMFO algorithm.The solution obtained is presented in Figure 8. Herein, the abscissa indicates the processing time, and the ordinate indicates the processing station, wherein numbers 1-6 correspond to the first process and 6-12 correspond to the second process.The processing time for obtaining the solution was 518 h.

Conclusions and Future Prospects
An IMFO algorithm was developed to solve the reentrant hybrid flow shop-scheduling problem.First, the problem was evaluated, and a GRHFSP model was constructed with the objective of minimizing the maximum completion time and the combined impact of the resources and environment.Subsequently, the MFO algorithm was improved by applying the characteristics of the model; this included (1) designing a new coding scheme, (2) changing the strategy of population initialization, and (3) revising the update mechanism and evolution strategy.Finally, the feasibility and efficiency of the proposed IMFO algorithm were verified via simulation experiments on different-scale test examples.
In the future, we aim to extend our analysis in the following three aspects: (1) the results of this study can be used to address dynamic disturbance events occurring in actual production processes that interfere with normal production; (2) to conduct a more comprehensive analysis of the environmental impact of manufacturing enterprises, a more specific LCA model covering the entire process from the extraction of raw materials to the abandonment of products can be developed; and (3) the IMFO algorithm can be compared with recently developed metaheuristic algorithms, such as the red deer algorithm [41] and the lion optimization algorithm [42].

Conclusions and Future Prospects
An IMFO algorithm was developed to solve the reentrant hybrid flow shop-scheduling problem.First, the problem was evaluated, and a GRHFSP model was constructed with the objective of minimizing the maximum completion time and the combined impact of the resources and environment.Subsequently, the MFO algorithm was improved by applying the characteristics of the model; this included (1) designing a new coding scheme, (2) changing the strategy of population initialization, and (3) revising the update mechanism and evolution strategy.Finally, the feasibility and efficiency of the proposed IMFO algorithm were verified via simulation experiments on different-scale test examples.
In the future, we aim to extend our analysis in the following three aspects: (1) the results of this study can be used to address dynamic disturbance events occurring in actual production processes that interfere with normal production; (2) to conduct a more comprehensive analysis of the environmental impact of manufacturing enterprises, a more specific LCA model covering the entire process from the extraction of raw materials to the abandonment of products can be developed; and (3) the IMFO algorithm can be compared with recently developed metaheuristic algorithms, such as the red deer algorithm [41] and the lion optimization algorithm [42].

( 2 )
Parameters S: Total number of workstations N: Total number of workpieces M: Total number of machines m i : Number of parallel machines in station i, m i = 1, 2, 3, . . . . . . .N j : Total number of operations of workpiece j L: Number of reentrant layers W e : Theoretical weight of workpiece j P jk : Processing time of operation O jk T jq (L j ): Machining time of the L j th -layer operation of workpiece j on machine q

4 . 1 .
Principle of MFO Algorithm The MFO algorithm is based on the lateral positioning of moths flying at night and uses a position update mechanism based on the flame population.The flame population represents excellent individuals among the moth population, which are generated according to the fitness values of the excellent individuals.During the renewal process, the moth population uses its corresponding flame population to update its position.As the iteration proceeds, the flame population decreases linearly until only the optimal individual remains.In the process of population position renewal, moths exceeding the number of flame populations move around the worst flame.The sets of moths and flames are represented by matrices as follows: M = m 11 m 12 m 21 m 22 . . .m 1d . . .m 2d .

Step 2 :
Machine-layer encoding.The element in the machine-selection layer Xm denotes the machine number of the processing machine at the corresponding station of the corresponding process of Xp.Elements 1 and 2 represent Machines 1 and 2, respectively.As shown in Figure 3, the first element of the vector Xm = [1, 2, 1, 2, 2, 1, 1, 2, 1, 2, 1, 2] represents Machine 1 at Station 1.The second element represents Machine 2 at Station 2, and the third element represents Machine 1 at Station 1.The last element represents Machine 2 at Station 2.