The Moth-Flame Optimization Algorithm for Flow Shop Scheduling Problem with Travel Time

This article examined the flow shop scheduling problem by considering the travel time between machines. The objective function of this problem was to provide a makespan. The Moth Flame Optimization (MFO) algorithm was proposed to solve the flow shop problem. The MFO experiment was carried out with a combination of iteration parameters and the population of the MFO algorithm to solve the flow shop scheduling problem. The computational results showed that MFO could produce a better solution than the actual scheduling method. Furthermore, the MFO Proposal Algorithm was able to reduce the makespan by up to 3%


Introduction
Scheduling is allocating machines to process a set of jobs within a certain period [1,2]. Job is a series of activities that require allocating resources over a certain period to be completed [3][4][5][6]. Some of the scheduling functions are to minimize processing time, subscription lead time, and inventory levels. In addition, the purpose of scheduling is to increase utilities such as machine facilities, labor, and equipment [7]. Flow shop production scheduling is the most popular investigated scheduling problem [8]. One of the objective functions of flow shop scheduling is to minimize makespan. This objective function is the time required to complete all jobs on a series of machines [9]. The minimum makespan value is needed so that the completion time is faster [10]. The company realizes the importance of turnaround time in increasing customer loyalty. Generally, these companies use the First Come First Serve (FCFS) rule because this rule is very easy [11]. Scheduling is prepared by considering the various constraints that exist in the company. Proper scheduling has a good impact, such as minimizing makespan [12,13].
There have been many studies on the implementation of metaheuristic algorithms on scheduling problems to minimize makespan. Some of these algorithms are Cross Entropy-Genetic Algorithm [14], Particle Swarm Optimization [10], Simulated Annealing Algorithm [15,16]. Other algorithms such as Ant Colony Optimization [17], Tabu Search [18], GRASP with fixed threads [19], Differential Evolution Algorithm [20], Artificial Immune System Algorithm [21]. Iterated Greedy Algorithm & Social Cognitive Algorithm [22], and Moth Flame Optimization [23] are also proposed to minimize the makespan. From the literature that discusses metaheuristic algorithms, most of the flow shop ISSN : 1978- problems focused on minimizing makespan by considering processing time. Unfortunately, research on flow shop scheduling rarely considers travel time. In practice, travel time is often encountered because it requires transportation time between machines.
To the researchers' knowledge, we only found research by Hurink and Knust [24], which discussed the problem of flow shop scheduling with transportation time. Research on flow shop scheduling by considering travel time was scarce. This study proposed a modified Moth Flame Optimization (MFO) algorithm to solve the scheduling problem by considering travel time. Based on our literature study, there has been no research on implementing the MFO algorithm for flow shop scheduling by considering travel time. This algorithm was first proposed by Mirjalili [25] and has been applied in various engineering fields such as feature selection [26] and flow shop scheduling with the sequence-dependent setup [23]. This algorithm mimics the behavior of moths at night. The Moth flies at a fixed angle with the moon pointing [25]. This study aimed to solve the flow shop scheduling problem by considering travel time with the MFO algorithm. Travel time was based on vehicles transporting materials back and forth between machines [27,28]. This model imitated the problem of pickup and delivery [29]. Transfer time is always associated with each delivery [30]. This research was a case study in a company in Indonesia. The results of this study are expected to have a significant impact on the company in minimizing the makespan.

Problem Assumption and Definition
This study introduced assumptions such as (1) All machines are ready at t=0; (2) setup and deletion time including processing time; (3) travel time is separate from processing time; (4) there is no preemption in this problem; (5) each machine stops when its last operation is completed; (6) processing time and travel time have been determined; (7) m stage flow shop is considered; (8) m-1 transporter is engaged to transfer from machine j to j-1; (9) Makespan is based on the completion time on the machine.. To solve this problem, the notations used are as follows: Parameters: : Process time of job ∈ in the machine of j ∈ : Process time of job ∈ from j machine to j+1 machine : Return time of job ∈ from j+1 machine to j machine Decision Variables: : 1, if job is processed in j machine; 0, otherwise : 1, if k job k is processed before ; 0, otherwise (i < k) : Completion time job in j machine : Completion time of j transporter to send job from j to j+1 machines. : Makespan For this problem, the mixed-integer linear programming model is as follows: For this problem, the mixed-integer linear programming model is as follows: The objective function of Equation (1) is to minimize the completion time (makespan). Constraint (2) ensures that a job cannot be completed earlier than the processing time on the first machine. Constraint (3) assures that the job cannot be transferred from to + 1 machines while still processing on machine j. Constraint (4) confirms that the job cannot be processed on the machine if it processed the previous job and has not been transferred to machine j. Job permutations are defined by constraints (5) and (6) to avoid overlapping the same machine. Makespan among all jobs on the last machine is calculated using Equation (7). Equations (8) and (9) ensure that each j machine processes job only once.

Proposed Procedure with MFO
In this study, the researchers proposed a new modified MFO-based algorithm. In MFO, the two determining variables were the moth population and their position. Because moths can fly and change their vector, the moth position can be represented in the matrix presented in Equation (10).
Where was the number of moths and d was the dimension (number of available variables). Thus, for all moths, it could be assumed that there were rules for evaluating and sorting fitness presented in Equation (11).
The fitness value was an objective value for each Moth. Therefore, each Moth was calculated its fitness value. One of the most critical variables in the MFO algorithm was flame. Therefore, it was calculated by the Flames Matrix that was ordered as in Equation (12).
It was also assumed to store fitness for flames by calculating the flame number as in equation (13). It should be noted that moths and flames were essential and were considered as different variables. The difference was how they updated each iteration. Moths indicated agents searching around the search space. Furthermore, the flames were showing the best position obtained by the Moth. In other words, flames could be said to be pins/flags that moths aimed for when they got the best position. It would be updated when it arrived in the next best position. With this, the previous best position would not be lost.
After the initialization stage, the function (moving the Moth in the search space) was executed iteratively until the function (according to the termination criteria is met) has a value of True. The function was the main function that drove moths in the search space. The position of each Moth was updated based on the flames using equation (14).
Since the MFO was inspired by the movement of moths, each Moth's position concerning the flames could be updated by equation (15). Where denoted the − ℎ distance for the − ℎ flames. The constant that determines the shape of the logarithmic spiral is denoted as , and is a random number.
. cos(2 ) + The order of fitness for each agent could be calculated based on Equation (16). Where denoted the − ℎ flames, indicated the − ℎ flames, and denoted the − ℎ moth distance for the − ℎ flames.
The next step was to update the flames. In the MFO algorithm, different moth positions in the search space reduced the exploitation of the solution. Therefore, the mathematical formula for reducing the number of flames during an iterative is presented in Equation (17), where represents the current iteration. The maximum number of flames was denoted as , while the total number of iterations was formulated as .
After the best position was found, the last step was to determine the best solution from the optimal moth flame position. In this study, to convert the position of the vector moth flame to the work order, the Large Rank Value (LRV) principle was applied. This procedure was effective for changing continuous variables to discrete [31]. The proposed algorithm can be seen in Algorithm 1.

Data and Experiment
Data processing time, travel time, and return transporter are presented in Table  1. In total, 12 jobs were completed in this problem. This study implemented a population of Moth ( ) and iterations of 50, 250, and 500, respectively. This population and iteration were combined to produce the best parameters for job completion. This study also compared the proposed algorithm with the algorithm offered by Hurink and Knust [24]. The experimental results recorded the computation time and machine completion (makespan), transporter completion (return), total engine idle, and total idle transportation. Sensitivity analysis was also presented by changing the 1 , 1 , 2 , dan 2 variables. The entire algorithm was coded in MATLAB R2020b and ran on a computer with an Intel Core i3-6006U CPU at 2.0 GHz, 8Gb RAM, and 1 TB HDD on a Windows 7 system.   Fig. 1 projects the number of recapitulations of makespan (job completion on the machine) using the MFO algorithm from each population and iteration. The results indicated that the overall population and iteration experiments had the same duration of 6530 minutes. Furthermore, it showed that 6530 minutes was the most optimal makespan in this problem. To solve the 12 job problems, this research required 50 iterations and a population of 50.

Fig. 1. MFO makespan recapitulation graph (in minutes)
The results of the MFO computation time to solve this problem are shown in Fig.  2. From the results in Fig. 2, it can be seen that the number of populations and iterations in problem-solving also affected the computation time. The larger the population and iterations, the greater the computational time generated, and vice versa. To solve the 12 job problems, the optimal computation time was 50 iterations and with 50 populations.   The recapitulation of the completion of the travel time on the transporter with MFO in each experiment is shown in Fig. 3. The population and iteration had the same result, which was 6484 minutes. It was because of the population variation and iteration result solution optimal. Thus, variation in each population and iteration was not found. Based on MFO optimization, the optimal job order was 11-7-1-3-2-6-10-5-12-8-4-9.

Sensitivity Analysis
Sensitivity analysis is an analysis conducted to determine the effect of time changes on schedule. The experimental recapitulation on the change in 1 is presented in Table 2. These results suggested that when 1 was increased, the makespan, engine completion, completion transporter, Idle M1, Idle M2, Idle M3, Total idle M, Idle T2, Total Idle Transporter increased. Only idle transporter 1 (T1) and Total Idle T decreased. Conversely, when 1 was decreased, then makespan, engine completion, transporter completion, Idle M1, Idle M2, Idle M3, Total idle M, Idle T2, Total Idle decreased. Only idle transporter 2 (T1) and Total Idle T increased. A recapitulation of the experiment on changes in 1 is presented in Table 3. These results showed that when 1 was increased, the makespan, engine completion, completion transporter, Idle M1, Idle M2, Idle M3, Total idle M, Idle T2 were the same. Only idle transporter 1 (T1) and Total Idle T decreased. It was due to the very high processing time of the machine. Thus, the change in 1 time did not significantly affect the completion. The experimental recapitulation on the change in 2 is presented in Table 4. These results indicated that when 2 was increased, the makespan, engine completion, transporter completion, Idle M1, Idle M2, Idle M3, Total idle M, Idle T1, Total Idle Transporter increased. Only idle transporter 2 (T2) and Total Idle T decreased. Thus, these results manifested that 2 affected the settlement time. A recapitulation of the experiment on changes in 2 is presented in Table 5. These results projected that when 2 was increased, the makespan, engine completion, transporter completion, Idle M1, Idle M2, Idle M3, Total idle M were the same. Idle transporter 2 (T2) and Total Idle T decreased. On the other hand, idle T1 increased. However, the change in 2 was not significant to the completion time.

Conclusion
This study was intended to solve the flow shop scheduling problem with the objective function of minimizing makespan considering travel time. The MFO algorithm was proposed to solve this problem. The results showed that the MFO algorithm was able to provide a percentage of savings of 3. The researcher also conducted a sensitivity analysis to test the travel time and return parameters. The results indicated that the smaller the transportation time, the smaller the completion time (makespan). This study assumed that job arrival was the same. Therefore, it is also necessary to consider flow shop scheduling with dynamic job arrivals.

Data Availability
All data generated or analyzed during this study are included in this article.

Declarations
Author contribution: All authors contributed equally to the main contributor to this paper. In addition, all authors read and approved the final paper. Funding statement: No funding was received for this study.

Conflict of interest:
The authors declare no conflict of interest. Additional information: No additional information is available for this paper.