Using Online Bees Algorithm for Real-time Permutation Flow Shop Problem in Car Disassembly Line

The automobile disassembly line is a typical permutation ow shop problem (PFSP). In the automobile disassembly line, the goal of the research is to minimize the completion time of scheduling with optimizing the disassembly order of vehicles. However, disassembly time was uncertain at the initial stage as the consuming time of cars’ specic sequence only could be roughly estimated, which make the PFSP in automobile disassembly line unlike the traditional ones. In this study, the real-time PFSP problem in automobile disassembly line was dened and well solved with the proposed online Bees Algorithm (O-BA). The algorithm has been prepared in Matlab/Simulink to work in real-time. Time consumed by each component of each vehicle was roughly estimated based on engineer’s experience. First optimisation was carried out to decide the disassembly order of vehicles to be disassembled. When each component was disassembled, the real consuming time value was updated with the detecting system which was realized in Simulink. Then the O-BA was activated and created the new solution for the disassembly order of vehicles which were still not entering the disassembly line. The proposed O-BA algorithm has an online structure and conducted the optimisation with distinguishing whether the vehicles to be disassembled were entering the disassembly line. The result shows the O-BA with the detecting system was succeeded in realizing real-time PFSP in the disassembly line. Moreover, the method proposed in this study was suitable for solving the same kind of real-time PFSP in the assembly line or disassembly line.


Introduction
The automobile disassembly line is a typical permutation ow shop problem (PFSP). The PFSP in one of the most studied optimisation problems in the literature. It could be understood as a single ow shop with consistent process which n jobs must be processed on a shop of m machines following the same order. With nding the most appropriate sequence of n jobs, the problem of optimisation could be resolved. One of the most popular optimisations of PFSP was minimization of makespan [1] and initially proposed by Johnson [2]. Many literature also set the criteria as minimization of total ow time [3], or minimization of total tardiness [4]. In the past decades, one-time optimisation of sequence was acknowledged in most literature on optimisation of PFSP. However, the "real-time" means rescheduling the sequence of jobs became more reverent and meaningful at the age of Industry-4.0 [5]. Rahman et al. de ned the real-time PFSP as customer orders are placed at random time intervals and reoptimisation as each new order arrives has important implications [6]. Ghaled and Taghipour et al. concluded the real-time scheduling (RTS) has the concept that refers to optimisation models which can utilize real-time data to update affected schedules without disrupting the operations of the manufacturing system [5]. In the automobile disassembly line, the real processing time for each vehicle's removing part could not be accurately measured, which will lead to the imbalance of overall production and low production e ciency. In the serial-ow car disassembly line [6], one-time optimisation of sequence has no help for actual production. Generally, each car's time consuming of removing part could only be roughly estimated and sometimes it has great changes depending on aging degree. Thus, rescheduling should be conducted after each car's part was removed and updated the information in the system. In this study, the real-time PFSP pay attention to the serial-ow car disassembly line which has the characteristics of uncertain operation time and could be expanded to similar assembly line or disassembly line.
Disassembly processes are discrete optimisation problems and graphical and matrix methods have been preferred for many years in their solution. Nowadays, metaheuristic algorithms are generally preferred [7]. Some prominent studies when looking at the applications in recent years; disassembly sequence planning with a hybrid method integrating fuzzy simulation and arti cial bee colony [8], exible process planning with a genetic algorithm for Product Recovery Optimization [9], a disassembly sequence planning with multiobjective ant colony algorithm for CNC machine tools [10], a tensorial memetic algorithm for disassembly sequence planning in product refurbishment [11], planning for disassembly using discrete arti cial bee colony [12], a disassembly sequence planning with genetic algorithm for hydropower station [7], robotic disassembly sequence planning using discrete bees algorithm [13], an improved multi-objective discrete bees algorithm for robotic disassembly [14], collaborative optimisation of robotic disassembly sequence planning using improved discrete bees algorithm [15].
It is seen that the Bees Algorithm is used successfully in disassembly process optimisation. The Bees Algorithm has successful applications against other combinatorial problems. Some of the highlights from the few applications; single machine scheduling problem [16], combinational circuit design [17], PCB assembly optimisation [18], vehicle routing problem [19], examination timetabling problems [20], a multi-objective supply chain optimisation [21,22], disassembly sequence planning of human-robot collaboration in remanufacturing [15,23]. In this study, the Bees Algorithm was designed within the scope of car disassembly process planning. The disassembly process, unlike the assembly process, includes many uncertain situations. Due to uncertain situations, some operations may take longer than expected during disassembly. In this case, better process time can be determined by changing the sequence by re-optimisation [16]. For this reason, two different Bees Algorithms have been designed within the scope of the study. The rst algorithm makes the rst optimisation for the initial values. The second algorithm performs online optimisation while the process is continuing if there is a change in the processes.

Online Disassembly Process Planning
In this study, online planning of the autonomous vehicle disassembly line was realized. The disassembly line consists of 14 stations, each with different disassembly jobs. Details of the process are given below: The disassembly process of a vehicle starts from the rst station and travels through all stations in turn. The disassembly process is completed at the 14th station.
After the rst vehicle leaves the rst station, the second vehicle enters the rst station. Likewise, the vehicles are taken to the disassembly line one after the other, and when its process nished they switch to the other station.
As soon as a vehicle enters the line, it has to enter all stations sequentially, it cannot switch between lines that are not included in the order.
The initial disassembly times was decided by the engineer's experience. In the process that will start with a large number of tools, the rst planning will be carried out to this rst known information.
Disassembly periods can be completed at different times than the rst determined times depending on the conditions of the vehicles (In cases where the disassembly of the connection materials takes longer or shorter due to rust, breakage, etc.).
After the vehicles exit each station, the disassembly time of that vehicle and station is updated.
After each update at the stations, online re-planning is made for vehicles that were still waiting for entering the disassembly line. Even the order of the vehicles starting the process is not changed.
Information on the Autonomous vehicle disassembly line is in Fig. 1 and the initial information on the process is given in Table 1.

The Online Bees Algorithm
The Bees Algorithm was inspired by the honey bee swarm searching for ower groups in nature by Pham et al. [24]. Scout bees search randomly in nature and when they nd e cient resources, they come to the hive and transfer the information to other bees with a special dance (waggle dance). Guidance with dance is at the basis of the Bees Algorithm. The local search section is divided into two parts which are elite sites and selected sites. In these sections, many searches are made in the neighborhood of optimum solutions, similar to doing guidance with real bees dance. In addition, random searches continue in the global search section, thus avoiding local optimum values [25]. The problem in this study is in combinatorial structure. In optimisation algorithms prepared for combinatorial problems, search sections and neighborhood de nitions are different from continuous problems. In general, the positions of the members in the problem are changed according to certain rules, and new sequences are tried to be found with less cost. For the Bees Algorithm, Ismail et al. [26] suggested three different operators in the local search section, namely, Swap, Insertion, and Inversion.
The pseudo code of the Bees Algorithm and the pseudo code of the process optimisation section is given below together as shown in Fig. 2. As can be seen, there are 3 different operator selections within the general Bees Algorithm structure. In each iteration, one of these operators is applied randomly. Within the Bees Algorithm structure, more searches are made in elite sites. In the swap process, the order of two different vehicle groups chosen at random is changed with each other [26]. As an example in Fig. 3, changing the order of vehicle groups numbered 2 and 4 is shown. In the insertion process, the order of a randomly selected vehicle group is inserted to a different rank, also randomly selected [16]. It is shown in Fig. 3. As can be seen, the location of the number 2 vehicle group on the rst plan is inserted into the section after the number 4 group. In the reversion process, the order between two randomly determined vehicle groups is reversed [16]. It is shown in Fig. 3. The order between vehicle groups number 2 and 5 on the rst route has been reversed.
The algorithm parameters used in this study are given in Table 1. Number of selected sites (m) 9 Number of elite bees (nep) 60

Number of selected bees (nsp) 20
The general model consists of two parts. In the rst part, the process plan is determined by optimising the starting vehicle and station values and the process begins. In the second part, online optimisation is done. When changes in station times are detected, a re-planning is made for vehicles that are not available on the line, and this process is repeated every time it is updated. A general view of the model is given in Fig. 4. The model consists of 4 main parts.
1. Getting the starting data of the process.
3. The section that follows the time updates at the stations.

Online optimisation
The last column of the "Disassembly Times of Vehicles" matrix shows the vehicle numbers. After the data in the matrix is taken, the algorithm given in Fig. 2 is run and the rst optimisation is made. The processes start according to the process sequence determined by this optimisation. The order of the rst optimisation is shown with green blocks in Fig. 4. The rst one shows the order of the vehicles, and the second shows the total duration times in the stations. After each operation in the stations, the times for the relevant station are updated in the "Detect of Changing Parameters" block. When updated, this block triggers the "Online Optimisation" block. In the online optimisation section, cars that are not on-line are determined rst. The planning of these cars is re-optimised. Since the number of non-line cars is variable, the number of local search zones will also change dynamically. A section has been added to the rst part of the algorithm to identify o ine vehicles. By controlling the processing time, the place of the last online tool on the line is determined in the table. The ow chart of the online algorithm is given below.
The algorithm is developed in Matlab/Simulink. Information on the Simulink model is given below. Initial information on the process is given in Table 2.

Results Of The Proposed Case Study
The results of the simulations made with the prepared model are shown as Fig. 6. As a result of the rst optimisation, the ranking of the vehicles was found as follows.
7 -13 -12 -16 -10 -18 -9 -5 -17 -2 -3 -11 -15 -20 -14 -6 -19 -8 -1 -4 As a result of the rst optimisation, the total duration of the process was calculated as 230+8=238 minute. As shown in Fig. 6. b., the start time of the last process is 230 and the last 4th vehicle enters the process. At the 36th minute of the process, the time of the 5th vehicle (Vehicle number is 10) in the 3rd station is updated by +10 minutes. The process plan of this moment of the process and the table containing the total times in the stations are given below.
As can be seen from the Fig. 7, the rst 7 cars even started the process when there was an update. Therefore, planning will be done for later vehicles. As can be seen from the table, with the updated plan, a plan that will give a shorter process time for the rst 7 vehicles was created. As a result of the optimisation, the new ranking of the vehicles was as follows.
7 -13 -12 -16 -10 -18 -9 -2 -5 -1 -20-11 -14 -17 -8 -6 -4 -3 -19 -15 After online optimisation, the total time for the new order was found to be 238+8=246. Note that despite a 10-minute delay, a ranking with a delay of 8 minutes compared to the previous process was found with the new optimisation. The order has been Page 6/7 changed for the minimum process time according to the processing times of the vehicles in the stations.

Conclusion
This paper has analyzed the real time permutation ow shop problem in car disassembly line. As the initial of disassembly times were rough inspected depends on engineers' experience. Hence, one time optimisation doesn't make sense help to decrease the total working time. Bees Algortithm and simulink model were both well adopted in solving the problem in this study. In the future, control hardware will be ready to design with applying O-BA algorithm and test the effectiveness of online optimisation in the factory.
(1) Swap, insertion, and inversion were performed with the local searching. Comparing to the case without real-time scheduling, the processing time was reduced by 2 mins. Although only one processing time of a vehicle's part was updated to the effectiveness of O-BA algorithm, a huge potential on minimization of makespan in actual production line was observed.
(2) The proposed O-BA algorithm has an online structure and conducted the optimisation with distinguishing whether the vehicles to be disassembled were entering the disassembly line. In the actual production line, sensors can be used to achieve controlling and scheduling for online optimisation. Con icts of interest/Competing interests: We know of no con icts of interest associated with this publication, and there has been no signi cant nancial support for this work that could have in uenced its outcome. As Corresponding Author, I con rm that the manuscript has been read and approved for submission by all the named authors.
Availability of data and material: There are some data in the Simulink model (Supplementary material).
Code availability: Algorithm codes and Simulink Model have been uploaded into the system (Supplementary material).
Ethics approval: We declare that this manuscript is original, has not been published before, and is not currently being considered for publication elsewhere.