Using an Improved Differential Evolution for Scheduling Optimization of Dual-Gantry Multi-Head Surface-Mount Placement Machine

The difference between dual-gantry and single-gantry surface-mount placement (SMP) machines is that dual-gantry machines exhibit higher complexity and more problems due to their additional gantry robot, such as component allocation and collision. This paper presents algorithms to prescribe the assembly operations of a dual-gantry multi-head surface-mount placement machine. It considers five inter-related problems: (i) component allocation; (ii) automatic nozzle changer assignment; (iii) feeder arrangement; and (iv) pick-and-place sequence; it incorporates a practical restriction related to (v) component height. The paper proposes a solution to each problem: (i) equalizing “workloads” assigned to the gantries, (ii) using quantity ratio method, (iii) using two similarity measurement mechanisms in a modified differential evolution algorithm with a random-key encoding mapping method that addresses component height restriction, (iv) and a combination of nearest-neighbor search and 2-opt method to plan each placing operation. This study reports an experiment that involved the processing of 10 printed circuit boards and compared the performance of a modified differential evolution algorithm with well-known algorithms including differential evolution, particle swarm optimization, and genetic algorithm. The results reveal that the number of picks, moving distance of picking components, and total assembly time with the modified differential evolution algorithm are less than other algorithms.


Introduction
Recently, the number of components placed on high-density printed circuit boards (PCBs) has been increasing, which has resulted in the increased use of surface-mount technology (SMT) during the production process of PCBs. Machines with SMT are called surface-mount placement (SMP) machines, which are advantageous for their precision, speed, and efficiency in PCB production compared with manual assembly methods. Therefore, manual assembly methods have been gradually replaced by SMP machines.
To simplify the complexity of such assembly problems, most studies on scheduling optimization for dual-gantry SMP machines have overlooked various limitations, such as problems related to automatic nozzle changer (ANC) assignment, nozzle setup, and height restrictions for components. Optimization of dual-gantry multi-head SMP machines creates various problems, and the main problem affecting operating efficiency is divided into three sub-problems, namely the component allocation problem, the feeder arrangement problem, and the component pick-and-place sequence problem. These problems are nondeterministic-polynomial (NP)-hard problems, which are high-dimensional and discrete; thus, an optimal global solution is difficult to obtain using conventional methods.
As shown in Table 1, most of the previous studies [1, 2,4,8,9] have already considered problems such as component allocation, feeder arrangement, and pick-and-place sequence during surface-mount placement processing. Among those, many different evolutionary algorithms were applied to optimize SMP processing. Afterward, ANC assignment problem was also included as a part of optimization factors [3,6,7]. In those studies, algorithms were established in a hybrid way to improve the shortcomings of single algorithms. Nevertheless, the height of the component can also have a direct effect on the manufacturing process. When placing the components on a PCB, the relatively lower components have to be placed first; therefore, unlike those methods, the current study included the consideration of the height restrictions in SMP processing and proposed an effective modified differential evolution (MDE) algorithm to optimize the scheduling of SMP machines in order to cover processing problems more comprehensively.
Research objectives of this present study incorporate problems of (i) component allocation, (ii) ANC assignment, (iii) feeder arrangements, (iv) pick-and-place sequences, and (v) height restrictions for components into the proposed solutions on minimizing the total assembly time for PCB assembly. The major contributions of this study are listed as follows: The component height restriction is considered in SMP processing. The proposed modified differential evolution (MDE) algorithm with two similarity measurement mechanisms using a random-key encoding mapping method is designed for minimizing the number of picks in feeder arrangement. A combination of nearest-neighbor search (NNS) and 2-opt method is applied to shorten the path in component placing operations.
The experimental results indicate that while using the MDE algorithm for feeder arrangement, at most 30% of the number of picks can be reduced; moreover, when adding a combination of NNS and 2-opt method for component placing sequence, the whole assembly time is decreased at most by 13% using the proposed method.
The remainder of this article is structured as follows: Section 2 describes key features of the SMP machine. Section 3 presents the problem definitions. Section 4 introduces the methodology of whole processing including component allocation, ANC assignment, feeder arrangement using the proposed MDE algorithm, component picking sequence, and component placing sequence using NNS and 2-opt method. Section 5 details the experimental results and discussions. Finally, Section 6 gives the conclusions.

Description of the SMP Machine
A dual-gantry multi-head SMP machine (Figure 1) employs two robot gantries, each of which contains six pick-and-place heads. Each head is equipped with one nozzle and moves to the ANC for nozzle changes when required. During operation, robot gantries move to the feeder stations to pick components. As illustrated in Figure 1, Gantry_1 picks components from the feeder station_1, and Gantry_2 picks components from the feeder station_2. The two gantries then carry the picked components and place them on a PCB alternately. This operating process is known as a pick-and-place work cycle.
The SMP machine's key features are as follows: (a) Gantry: This moves above the surface-mount machine, allowing the pick-and-place heads to pick components from the correct feeder and then to place the components on the correct position of the PCB. (b) Pick-and-place head: Every pick-and-place head is equipped with a single nozzle, which is used to pick and place components. and component placing sequence using NNS and 2-opt method. Section 5 details the experimental results and discussions. Finally, Section 6 gives the conclusions.

Description of the SMP Machine
A dual-gantry multi-head SMP machine ( Figure 1) employs two robot gantries, each of which contains six pick-and-place heads. Each head is equipped with one nozzle and moves to the ANC for nozzle changes when required. During operation, robot gantries move to the feeder stations to pick components. As illustrated in Figure 1, Gantry_1 picks components from the feeder station_1, and Gantry_2 picks components from the feeder station_2. The two gantries then carry the picked components and place them on a PCB alternately. This operating process is known as a pick-and-place work cycle.
The SMP machine's key features are as follows: (a) Gantry: This moves above the surface-mount machine, allowing the pick-and-place heads to pick components from the correct feeder and then to place the components on the correct position of the PCB. (b) Pick-and-place head: Every pick-and-place head is equipped with a single nozzle, which is used to pick and place components.    Figure 2 presents the picking sequence {7, 9,11,13,15, 17} that finished picks when the least number of picks is one. If the component picking operations cannot be finished in one pick, the picking operation is repeated until all heads pick their components or until it is determined that the operation cannot proceed any further. As presented in Figure 3, a head is idle after the first pick. Thus, the second pick is conducted, with its picking sequence being {3, 3, 7, 9, 9, 13}.   9,11,13,15, 17} that finished picks when the least number of picks is one. If the component picking operations cannot be finished in one pick, the picking operation is repeated until all heads pick their components or until it is determined that the operation cannot proceed any further. As presented in Figure 3, a head is idle after the first pick. Thus, the second pick is conducted, with its picking sequence being {3, 3, 7, 9, 9, 13}.

Problem Description
The purpose of this study was to optimize the operation of dual-gantry, multi-head SMP machines. The following section introduces problems, inter-relationships of problems, and their influences on SMP operations.
(i) Component allocation problem: Each gantry has its own feeder station. Gantry_1 cannot pick components from Gan-try_2's feeder station and vice versa. An inappropriate component allocation may lead to an excessive workload on one of the gantries, thus causing workload imbalance.
(ii) ANC assignment problem: The dual-gantry, multi-head SMP machine that we studied with an ANC comprising 20 seats was designed for 16 small nozzles and 4 large nozzles. Because the number of nozzles placed in an ANC is limited, how to allocate the number of seats for each nozzle type is crucial. It affects component picking process. A greater number of picks indicates a longer time required for the picking process.
(iii) Feeder arrangement problem: The assignment of components to the two feeder-slot stations for component storage mainly affects the picking process. Fewer picks indicate a shorter time required for this process. Therefore, an appropriate feeder arrangement enables picking up more components simultaneously, thus shortening the time required for this process.
(iv) Component height restrictions: Because the height of each component varies, placing an excessively high component before placing a shorter component leads to a collision. Therefore, the picking-and-placing order of components should be sequenced according to height (from low to high), in which the height differences between each two consecutive components should be less than 2 mm to avoid collision.
(v) Component pick-and-place sequence:

Problem Description
The purpose of this study was to optimize the operation of dual-gantry, multi-head SMP machines. The following section introduces problems, inter-relationships of problems, and their influences on SMP operations.
(i) Component allocation problem: Each gantry has its own feeder station. Gantry_1 cannot pick components from Gan-try_2's feeder station and vice versa. An inappropriate component allocation may lead to an excessive workload on one of the gantries, thus causing workload imbalance.
(ii) ANC assignment problem: The dual-gantry, multi-head SMP machine that we studied with an ANC comprising 20 seats was designed for 16 small nozzles and 4 large nozzles. Because the number of nozzles placed in an ANC is limited, how to allocate the number of seats for each nozzle type is crucial. It affects component picking process. A greater number of picks indicates a longer time required for the picking process.
(iii) Feeder arrangement problem: The assignment of components to the two feeder-slot stations for component storage mainly affects the picking process. Fewer picks indicate a shorter time required for this process. Therefore, an appropriate feeder arrangement enables picking up more components simultaneously, thus shortening the time required for this process.
(iv) Component height restrictions: Because the height of each component varies, placing an excessively high component before placing a shorter component leads to a collision. Therefore, the picking-and-placing order of components should be sequenced according to height (from low to high), in which the height differences between each two consecutive components should be less than 2 mm to avoid collision.
(v) Component pick-and-place sequence:

Problem Description
The purpose of this study was to optimize the operation of dual-gantry, multi-head SMP machines. The following section introduces problems, inter-relationships of problems, and their influences on SMP operations.
(i) Component allocation problem: Each gantry has its own feeder station. Gantry_1 cannot pick components from Gantry_2's feeder station and vice versa. An inappropriate component allocation may lead to an excessive workload on one of the gantries, thus causing workload imbalance.
(ii) ANC assignment problem: The dual-gantry, multi-head SMP machine that we studied with an ANC comprising 20 seats was designed for 16 small nozzles and 4 large nozzles. Because the number of nozzles placed in an ANC is limited, how to allocate the number of seats for each nozzle type is crucial. It affects component picking process. A greater number of picks indicates a longer time required for the picking process.
(iii) Feeder arrangement problem: The assignment of components to the two feeder-slot stations for component storage mainly affects the picking process. Fewer picks indicate a shorter time required for this process. Therefore, an appropriate feeder arrangement enables picking up more components simultaneously, thus shortening the time required for this process.
(iv) Component height restrictions: Because the height of each component varies, placing an excessively high component before placing a shorter component leads to a collision. Therefore, the picking-and-placing order of components should be sequenced according to height (from low to high), in which the height differences between each two consecutive components should be less than 2 mm to avoid collision. (v) Component pick-and-place sequence: Planning the shortest route for gantries to move from feeder-slot stations, where they pick components, to the position on PCBs to place components.

Establishment of a Mathematical Model
This study designed a mathematical model to calculate scheduling results according to the operation pattern of a dual-gantry multi-head SMP machine. We divided the entire operating process into four parts for discussion: number of cycles, pick time, placement time, and ANC change time.
Definition of symbols: The numbers of cycles completed by the two gantries may differ. Because the operation of a dual-gantry, multi-head SMP machine alternates between its two gantries, to calculate the scheduling time, the gantry that complete the larger number of cycles is adopted as the NC for the entire scheduling time. The equation is represented as follows: where C 1 is the number of cycles for Gantry_1, C 2 is the number of cycles for Gantry_2, and N is the larger number of the two. Because a dual-gantry, multi-head SMP machine alternates between its two gantries to place components, one gantry can only pick components when the other is placing components in a given area. The alternating of picking and placing for each head continues until all components are placed. Accordingly, the longest time required by the two gantries to finish their tasks was selected to design the time calculation equation. The difference between the shorter and longer times is denoted as waiting time, as depicted in Figure 4. The equation for total assembly time ( ) required is presented as follows: is the time required by the first component pick performed by Gantry_1, and , and , compare the two gantries' operation times to identify the longer time required between the two gantries.
By calculating the time spent on component picking, this study devised an equation for picking time, which is presented as follows: The operation of the first pick is denoted by c = 1. The time calculation starts from, after nozzle changes, the first pick from a feeder slot; thus, only the time spent on picking components from feeder slots is calculated. The condition of c > 1 and cn = 0 denotes picking operations without nozzle changes.
, denotes the time required for moving from the location where the final component is placed on cycle c-1 to the location where the first component is picked on cycle c. The final part of this equation is used to calculate the time required for picking components from feeder slots. The condition of c > 1 and cn > 0 represents picking operations involving nozzle changes. The calculation of , the time required for nozzle changes, is detailed in Equation (5). The time required for placing components on a PCB is presented as follows: , denotes the time required for movement from the location of the feeder slot where a gantry finishes picking components on cycle c to the location where the gantry places the first component. , denotes the time required for moving from the location where the preceding component is placed to the location of the subsequent placement.
The following equation, nozzle change time, is applied when a nozzle change occurs on cycle c. The equation for total assembly time (T total ) required is presented as follows: E 1 g1 is the time required by the first component pick performed by Gantry_1, and max E c+1 g1 , F c g2 and max F c g1 , E c g2 compare the two gantries' operation times to identify the longer time required between the two gantries.
By calculating the time spent on component picking, this study devised an equation for picking time, which is presented as follows: The operation of the first pick is denoted by c = 1. The time calculation starts from, after nozzle changes, the first pick from a feeder slot; thus, only the time spent on picking components from feeder slots is calculated. The condition of c > 1 and cn = 0 denotes picking operations without nozzle changes. T d P c−1 j , S c 1 denotes the time required for moving from the location where the final component is placed on cycle c-1 to the location where the first component is picked on cycle c. The final part of this equation is used to calculate the time required for picking components from feeder slots. The condition of c > 1 and cn > 0 represents picking operations involving nozzle changes. The calculation of T change g , the time required for nozzle changes, is detailed in Equation (5).
The time required for placing components on a PCB is presented as follows: The following equation, nozzle change time, is applied when a nozzle change occurs on cycle c.

Method
This section discusses the method for optimizing the scheduling of a dual-gantry SMP machine. To reduce complexity, the optimization problem was divided into four steps; the flow chart is presented in Figure 5. The first step involves identifying a method for solving the component allocation problem.
Step two is to determine the number of nozzles available in the ANC according to the number and ratio of components required. In the third step, the MDE algorithm and a random-key encoding mapping approach were used for feeder arrangement by selecting operations with the fewest picks and picking cycles. The fourth step involves using the nearest-neighbor search approach to determine a tentative placing sequence, which is subsequently planned by the 2-opt method.

Method
This section discusses the method for optimizing the scheduling of a dual-gantry SMP machine. To reduce complexity, the optimization problem was divided into four steps; the flow chart is presented in Figure 5. The first step involves identifying a method for solving the component allocation problem.
Step two is to determine the number of nozzles available in the ANC according to the number and ratio of components required. In the third step, the MDE algorithm and a random-key encoding mapping approach were used for feeder arrangement by selecting operations with the fewest picks and picking cycles. The fourth step involves using the nearest-neighbor search approach to determine a tentative placing sequence, which is subsequently planned by the 2-opt method.

Component Allocation
The first problem encountered by dual-gantry, multi-head SMP machines is component allocation. Because a gantry cannot pick components from the other gantry's feeder slots, achieving a component allocation solution that equalizes workloads for the two gantries is the main focus of this step. This study considers component height restriction, which complicates the component allocation problem.
First, the center point of a PCB on the y-axis was identified, and a horizontal line was drawn, dividing the components into those located in upper and lower areas of the PCB board. We calculated the difference between the numbers of components located in the two areas and accordingly adjusted the location of the center point along the y-axis to equalize the number of components for the two gantries.

Component Allocation
The first problem encountered by dual-gantry, multi-head SMP machines is component allocation. Because a gantry cannot pick components from the other gantry's feeder slots, achieving a component allocation solution that equalizes workloads for the two gantries is the main focus of this step. This study considers component height restriction, which complicates the component allocation problem.
First, the center point of a PCB on the y-axis was identified, and a horizontal line was drawn, dividing the components into those located in upper and lower areas of the PCB board. We calculated the difference between the numbers of components located in the two areas and accordingly adjusted the location of the center point along the y-axis to equalize the number of components for the two gantries.
For example, as presented in Figure 6, when equally dividing the PCB into two halves (Y = 50), both the upper and lower areas each contained 400 components. Gantry_1 was responsible for components in the lower area, and Gantry_2 was responsible for those in the upper area.
Mathematics 2021, 9, 2016 9 of 22 For example, as presented in Figure 6, when equally dividing the PCB into two halves (Y = 50), both the upper and lower areas each contained 400 components. Gantry_1 was responsible for components in the lower area, and Gantry_2 was responsible for those in the upper area.

ANC Assignment Using a Quantity Ratio Method
The number and type of nozzles in the ANC were determined before scheduling. The ANC only have 20 seats: 4 of them are for large nozzles, and 16 are for small nozzles.
According to the number of each type of component to be placed on a PCB, this study used a quantity ratio method to determine the required number for each type of nozzle to be installed at each ANC.
Step 1: The number of each type of nozzle is presented in Table 2. Four small nozzles (AN2, An3, AN4, and AN5) and one large nozzle (ANV1) are used in this example. Nozzle AN2 picks and places component types D and B; Nozzle AN3 picks and places component type A; Nozzle AN4 picks and places component type E; Nozzle AN5 picks and places component type C; Nozzle ANV1 picks and places component type F. A proportional pie chart ( Figure 7) depicts the quantity ratios of the various types of small nozzles. The quantity ratio for each nozzle is calculated as (total number of components for the nozzle) divided by (total number of components for the same size of nozzle). For example, the total number of components for small nozzle is 50 + 20 + 80 + 100 = 250. The quantity ratio for AN2 is equal to 50/250 = 20%.

ANC Assignment Using a Quantity Ratio Method
The number and type of nozzles in the ANC were determined before scheduling. The ANC only have 20 seats: 4 of them are for large nozzles, and 16 are for small nozzles.
According to the number of each type of component to be placed on a PCB, this study used a quantity ratio method to determine the required number for each type of nozzle to be installed at each ANC.
Step 1: The number of each type of nozzle is presented in Table 2. Four small nozzles (AN2, An3, AN4, and AN5) and one large nozzle (ANV1) are used in this example. Nozzle AN2 picks and places component types D and B; Nozzle AN3 picks and places component type A; Nozzle AN4 picks and places component type E; Nozzle AN5 picks and places component type C; Nozzle ANV1 picks and places component type F. A proportional pie chart (Figure 7) depicts the quantity ratios of the various types of small nozzles. The quantity ratio for each nozzle is calculated as (total number of components for the nozzle) divided by (total number of components for the same size of nozzle). For example, the total number of components for small nozzle is 50 + 20 + 80 + 100 = 250. The quantity ratio for AN2 is equal to 50/250 = 20%. A; Nozzle AN4 picks and places component type E; Nozzle AN5 picks and places component type C; Nozzle ANV1 picks and places component type F. A proportional pie chart (Figure 7) depicts the quantity ratios of the various types of small nozzles. The quantity ratio for each nozzle is calculated as (total number of components for the nozzle) divided by (total number of components for the same size of nozzle). For example, the total number of components for small nozzle is 50 + 20 + 80 + 100 = 250. The quantity ratio for AN2 is equal to 50/250 = 20%.  Step 2: To ensure that the gantries can pick up all types of components, the ANC was assigned with at least one seat for each nozzle type ( Figure 8).  Step 2: To ensure that the gantries can pick up all types of components, the ANC was assigned with at least one seat for each nozzle type ( Figure 8). Step 3: Assign nozzles to the remaining seats in ANC according to the predetermined proportions. The calculated values are rounded to the nearest integers. For example, the calculated value for nozzle AN2 is 2.4, and we round it to 2. It means 2 more seats are assigned for nozzle AN2 in ANC. The other seats calculated for nozzles An3, AN4, and AN5 are as follows. There is one more seat for nozzle AN3; 4 more seats for nozzle AN4; and 5 more seats for nozzle AN5. Since there is only one large nozzle used in this example, the four seats for large nozzle are all assigned for ANV1. The final nozzle assignment in ANC was presented in Figure 9.

Feeder Arrangement Using the MDE Algorithm
Evolutionary algorithms are inspired by natural phenomena, biological processes, and human and social behaviors and are widely used to solve scientific and engineering problems because of their simplicity and sensitivity. These algorithms have evolved to be applied in various existing algorithms, such as the genetic algorithm (GA) [10][11][12], particle swarm optimization (PSO) [13,14], and ant colony optimization [15]. The differential evolution (DE) algorithm was first developed by Storn and Price [16,17] in 1995. It is a population-based stochastic optimization algorithm which provides characteristics of simplicity, efficiency, and real coding. The optimization process is conducted through continuous mutation, crossover, and selection until converging to the optimized solution. The flow chart of DE is presented in Figure 10. To optimize the operation of dual-gantry multi-head Step 3: Assign nozzles to the remaining seats in ANC according to the predetermined proportions. The calculated values are rounded to the nearest integers. For example, the calculated value for nozzle AN2 is 2.4, and we round it to 2. It means 2 more seats are assigned for nozzle AN2 in ANC. The other seats calculated for nozzles An3, AN4, and AN5 are as follows. There is one more seat for nozzle AN3; 4 more seats for nozzle AN4; and 5 more seats for nozzle AN5. Since there is only one large nozzle used in this example, the four seats for large nozzle are all assigned for ANV1. The final nozzle assignment in ANC was presented in Figure 9.  Step 2: To ensure that the gantries can pick up all types of components, the ANC was assigned with at least one seat for each nozzle type ( Figure 8). Step 3: Assign nozzles to the remaining seats in ANC according to the predetermined proportions. The calculated values are rounded to the nearest integers. For example, the calculated value for nozzle AN2 is 2.4, and we round it to 2. It means 2 more seats are assigned for nozzle AN2 in ANC. The other seats calculated for nozzles An3, AN4, and AN5 are as follows. There is one more seat for nozzle AN3; 4 more seats for nozzle AN4; and 5 more seats for nozzle AN5. Since there is only one large nozzle used in this example, the four seats for large nozzle are all assigned for ANV1. The final nozzle assignment in ANC was presented in Figure 9.

Feeder Arrangement Using the MDE Algorithm
Evolutionary algorithms are inspired by natural phenomena, biological processes, and human and social behaviors and are widely used to solve scientific and engineering problems because of their simplicity and sensitivity. These algorithms have evolved to be applied in various existing algorithms, such as the genetic algorithm (GA) [10][11][12], particle swarm optimization (PSO) [13,14], and ant colony optimization [15]. The differential evolution (DE) algorithm was first developed by Storn and Price [16,17] in 1995. It is a population-based stochastic optimization algorithm which provides characteristics of simplicity, efficiency, and real coding. The optimization process is conducted through continuous mutation, crossover, and selection until converging to the optimized solution. The flow chart of DE is presented in Figure 10. To optimize the operation of dual-gantry multi-head

Feeder Arrangement Using the MDE Algorithm
Evolutionary algorithms are inspired by natural phenomena, biological processes, and human and social behaviors and are widely used to solve scientific and engineering problems because of their simplicity and sensitivity. These algorithms have evolved to be applied in various existing algorithms, such as the genetic algorithm (GA) [10][11][12], particle swarm optimization (PSO) [13,14], and ant colony optimization [15]. The differential evolution (DE) algorithm was first developed by Storn and Price [16,17] in 1995. It is a population-based stochastic optimization algorithm which provides characteristics of simplicity, efficiency, and real coding. The optimization process is conducted through continuous mutation, crossover, and selection until converging to the optimized solution. The flow chart of DE is presented in Figure 10. To optimize the operation of dual-gantry multi-head SMP machines, the following section introduces problems, inter-relationships of problems, and their influences on SMP operations.
Mathematics 2021, 9, 2016 11 of 22 SMP machines, the following section introduces problems, inter-relationships of problems, and their influences on SMP operations.
where 1, 2, and 3 are different individuals required for determining the mutation equation, and 1 2 3. F is the scale factor. The 2D descript of mutation is shown in Figure 11. The purpose of this study was to optimize the operation of dual-gantry, multihead SMP machines. The following section introduces problems, inter-relationships of problems, and their influences on SMP operations.  The DE algorithm is similar to common heuristic algorithms. Such algorithms begin by initializing individuals and then generating NP individuals randomly in the solution search space. Subsequently, because individuals in a DE algorithm are real numbers, this study obtained random real numbers in the solution search space for each individual. The equation is presented as follows: In this equation, X min denotes the minimum value, and X max denotes the maximum value in a solution search space, and rand [0, 1] is a randomly selected real number between 0 and 1. Variable i (individual) represented the place of an individual in an order (i = 0 · · · NP); G (generation) is the number of generations (G = 0 · · · G max ); and j (dimension) is the size of the dimension (j = 0 · · · D).

(b) Mutation
A mutation vector is obtained by calculating the vector difference between individuals, followed by referencing the vector of another individual and a scale factor. For example, randomly pick three individuals, X r1,G , X r1,G , and X r3,G , and then calculate the vector difference between X r2,G and X r3,G . Multiply this result by the scale factor, and subsequently add X r1,G to obtain the mutation vector, V i,G+1 . The equation is presented as follows: where r1, r2, and r3 are different individuals required for determining the mutation equation, and r1 = r2 = r3. F is the scale factor. The 2D descript of mutation is shown in Figure 11. The purpose of this study was to optimize the operation of dual-gantry, multi-head SMP machines. The following section introduces problems, inter-relationships of problems, and their influences on SMP operations.
where U j i,G+1 is an individual after crossover, V j i,G+1 is a mutated individual, and X j i,G is the individual before mutation. Regarding the CR ranges of [0,1], a lower CR indicates a smaller effect in enhancing mutation; by contrast, a higher CR implies a stronger effect in enhancing mutation. Most researchers have suggested that a CR range of [0.8,1] is most effective for a seeking solution.
where 1, 2, and 3 are different individuals required for determining the mutation equation, and 1 2 3. F is the scale factor. The 2D descript of mutation is shown in Figure 11. The purpose of this study was to optimize the operation of dual-gantry, multihead SMP machines. The following section introduces problems, inter-relationships of problems, and their influences on SMP operations. Figure 11. 2D depiction of mutation. Figure 11. 2D depiction of mutation.

(c) Selection
Selection is the final step in a DE algorithm, which evaluates the fitness value of each individual after crossover. After comparing the individuals before and after crossover, which is exhibited, the higher fitness value is used for the next generation of evolution. The equation is presented as follows:

MDE Algorithm
This study chose a DE algorithm and a random-key encoding mapping method for feeder arrangement; however, conventional DE algorithm is often trapped in local solutions owing to its premature convergence. Many researchers have developed new methods for DE to ameliorate the premature convergence. For instance, Choi and Ahn [18] improved DE by monitoring the evolutionary progress of each individual and assigned two control parameters according to the evolution result. Choi and Lee [19] proposed an ex-tended self-adaptive differential evolution algorithm which increases the greediness of jDE algorithm searchability. Choi et al. [20] developed a sigmoid-based parameter control in order to alternate the failure threshold for performing the Cauchy mutation. In this case, the proposed algorithm, which advances the Cauchy mutation, can establish a good ratio between exploration and exploitation. Therefore, instead of monitoring the failure evolution individuals, an MDE algorithm which focuses on expanding the diversity of evolution individuals is proposed in this study. MDE aims to retain the diversity of DE algorithms via removing individuals with high similarity so that the algorithm has more of a chance to search for the optimal solutions. In other words, two similarity measurement mechanisms are introduced to ensure the diversity populations in MDE; therefore, the populations are able to expand the search space. The fitness values of picking sequences were evaluated to derive the least number of picks and picking cycles. The flow chart for MDE algorithm is presented in Figure 12.

(b) Selection
In the calculation of fitness values, the random-key method was used to map the real numbers to integers, each of which represents the index of a feeder slot. The numbers of picks were employed as the fitness values.
Because integers are used for feeder slots, the conventional DE algorithm cannot be adopted directly. The random-key method [21,22] is used to map real numbers to integers. This technique was also applied in this study for mapping the real number of DE individuals to integers, which were subsequently used to number feeder slots.
The random-key method involves mapping real numbers to integers in ascending order. As presented in Figure 13, if an individual's values are {0.17, 0.51, 0.32, 0.12, 0.35, 0.42}, sorting the real numbers from low to high and assigning an index to each, starting with 1 and indexing by 1 for each successive number, then the mapped integers range from 1 to 6, yielding a mapped result of {2, 6, 3, 1, 4, 5}.
control parameters according to the evolution result. Choi and Lee [19] proposed an extended self-adaptive differential evolution algorithm which increases the greediness of jDE algorithm searchability. Choi et al. [20] developed a sigmoid-based parameter control in order to alternate the failure threshold for performing the Cauchy mutation. In this case, the proposed algorithm, which advances the Cauchy mutation, can establish a good ratio between exploration and exploitation. Therefore, instead of monitoring the failure evolution individuals, an MDE algorithm which focuses on expanding the diversity of evolution individuals is proposed in this study. MDE aims to retain the diversity of DE algorithms via removing individuals with high similarity so that the algorithm has more of a chance to search for the optimal solutions. In other words, two similarity measurement mechanisms are introduced to ensure the diversity populations in MDE; therefore, the populations are able to expand the search space. The fitness values of picking sequences were evaluated to derive the least number of picks and picking cycles. The flow chart for MDE algorithm is presented in Figure 12.  The initialization process adopted Equation (6) and the range [0,1] to generate individuals, specifically, = 0 and = 1.

(b) Selection
In the calculation of fitness values, the random-key method was used to map the real numbers to integers, each of which represents the index of a feeder slot. The numbers of picks were employed as the fitness values.
Because integers are used for feeder slots, the conventional DE algorithm cannot be adopted directly. The random-key method [21,22] is used to map real numbers to integers. This technique was also applied in this study for mapping the real number of DE individuals to integers, which were subsequently used to number feeder slots.
The random-key method involves mapping real numbers to integers in ascending order. As presented in Figure 13, if an individual's values are {0.17, 0.51, 0.32, 0.12, 0.35, 0.42}, sorting the real numbers from low to high and assigning an index to each, starting with 1 and indexing by 1 for each successive number, then the mapped integers range from 1 to 6, yielding a mapped result of {2, 6, 3, 1, 4, 5}. On the basis of the integers determined from the random-key method, components were distributed to their corresponding feeder slots, as presented in Figure 14. Assuming that the feeder slot station has 20 slots and there are 10 components, the first 10 randomkeys were selected as slot seats for 10 components. After components were allocated to feeder slots, the least number of picks was adopted as the reference for picking sequence for each picking cycle. Before the picking process, component heights were examined to ensure they did not exceed the current height restriction. Shorter components must be picked up and placed first to avoid collisions among heads during operation.

(c) Similarity
Conventional DE algorithms cannot be used to avoid local solutions, which impede the identification of the optimal solution. Therefore, this study applied two similarity methods, measuring the level of similarity between the global best solution ( ) and others. When multiple individuals are similar to the position, half of the individuals with inferior fitness values are eliminated and then generate possible offspring to increase the diversity. The remaining individuals are used in the local search to seek more favorable solutions. On the basis of the integers determined from the random-key method, components were distributed to their corresponding feeder slots, as presented in Figure 14. Assuming that the feeder slot station has 20 slots and there are 10 components, the first 10 random-keys were selected as slot seats for 10 components.

(b) Selection
In the calculation of fitness values, the random-key method was used to map the re numbers to integers, each of which represents the index of a feeder slot. The numbers o picks were employed as the fitness values.
Because integers are used for feeder slots, the conventional DE algorithm cannot b adopted directly. The random-key method [21,22] is used to map real numbers to integer This technique was also applied in this study for mapping the real number of DE individ uals to integers, which were subsequently used to number feeder slots.
The random-key method involves mapping real numbers to integers in ascendin order. As presented in Figure 13, if an individual's values are {0.17, 0.51, 0.32, 0.12, 0.3 0.42}, sorting the real numbers from low to high and assigning an index to each, startin with 1 and indexing by 1 for each successive number, then the mapped integers rang from 1 to 6, yielding a mapped result of {2, 6, 3, 1, 4, 5}. On the basis of the integers determined from the random-key method, componen were distributed to their corresponding feeder slots, as presented in Figure 14. Assumin that the feeder slot station has 20 slots and there are 10 components, the first 10 random keys were selected as slot seats for 10 components. After components were allocated to feeder slots, the least number of picks wa adopted as the reference for picking sequence for each picking cycle. Before the pickin process, component heights were examined to ensure they did not exceed the curren height restriction. Shorter components must be picked up and placed first to avoid coll sions among heads during operation.

(c) Similarity
Conventional DE algorithms cannot be used to avoid local solutions, which imped the identification of the optimal solution. Therefore, this study applied two similarit methods, measuring the level of similarity between the global best solution ( ) an others. When multiple individuals are similar to the position, half of the individu als with inferior fitness values are eliminated and then generate possible offspring to in After components were allocated to feeder slots, the least number of picks was adopted as the reference for picking sequence for each picking cycle. Before the picking process, component heights were examined to ensure they did not exceed the current height restriction. Shorter components must be picked up and placed first to avoid collisions among heads during operation.

(c) Similarity
Conventional DE algorithms cannot be used to avoid local solutions, which impede the identification of the optimal solution. Therefore, this study applied two similarity methods, measuring the level of similarity between the global best solution (Gbest) and others. When multiple individuals are similar to the Gbest position, half of the individuals with inferior fitness values are eliminated and then generate possible offspring to increase the diversity. The remaining individuals are used in the local search to seek more favorable solutions.
This study proposed two similarity measurement mechanisms, both of which use the Gbest position as the measurement criterion and measure its similarity with other individuals.

•
Similarity 1: This method measured the Euclidean distance between an individual and Gbest to determine their level of similarity. The mean level of similarity (Avg Similarity ) is the threshold value; individuals with levels of similarity lower than this value are defined as being similar to the Gbest position. The equation is presented as follows: where variable NP is the total number of individuals, D represents dimensions, Gbest j is the Gbest position, and X i,j represents individual j. • Similarity 2: Based on the Dice coefficient [23], feeder slots loaded with components are presented in sets to obtain a set-similarity metric function. The equation is presented as follows: where {X} represents set X, {Y} represents set Y, and {X ∩ Y} is the intersection of sets X and Y.
Mathematics 2021, 9, 2016 14 of 22 This study proposed two similarity measurement mechanisms, both of which use the position as the measurement criterion and measure its similarity with other individuals.

•
Similarity 1: This method measured the Euclidean distance between an individual and to determine their level of similarity. The mean level of similarity ( ) is the threshold value; individuals with levels of similarity lower than this value are defined as being similar to the position. The equation is presented as follows: where variable NP is the total number of individuals, D represents dimensions, is the position, and , represents individual j.
• Similarity 2: Based on the Dice coefficient [23], feeder slots loaded with components are presented in sets to obtain a set-similarity metric function. The equation is presented as follows: where {X} represents set X, {Y} represents set Y, and ∩ is the intersection of sets X and Y.

Determining Placing Sequence Using the Nearest-Neighbor Search and 2-Opt Method
Some heuristics have been studied for solving component-to-feeder assignment and component placing sequence problem. Heuristics such as nearest-neighbor search, nearest insertion, furthest insertion, and random generation were used to initialize a placing se-

Determining Placing Sequence Using the Nearest-Neighbor Search and 2-Opt Method
Some heuristics have been studied for solving component-to-feeder assignment and component placing sequence problem. Heuristics such as nearest-neighbor search, nearest insertion, furthest insertion, and random generation were used to initialize a placing sequence. On the other hand, methods such as 2-opt, 3-opt, and Or-opt were used to improve the initial placing sequence [24]. There are many other mathematical optimization approaches for solving the placing sequence problem; however, providing a fast and simple algorithm is better for industrial implementation. Therefore, in this study, a nearestneighbor search was applied to determine the shortest route for placement; subsequently, the placing routes were shortened by using the 2-opt method. Firstly, component 1 is placed by calculating the distance between the feeder slot and the first placing position. Then, the distance between the first placing position and the second placing position is calculated for component 2. Continue the above steps for all components that need to be placed on a cycle.
The shortest route between a feeder slot and the first component placing position of each cycle is determined independently because each component can be placed in more than one position. We used an example to illustrate how to determine the first placing position. As presented in Figure 16, it is assumed that the first component can be placed in one of the six possible positions, A, B, C, D, E, or F. Using the Euclidean distance to calculate the nearest position from the feeder slot revealed that A is the nearest position, that is, the first component placing position.
Mathematics 2021, 9, 2016 15 of quence. On the other hand, methods such as 2-opt, 3-opt, and Or-opt were used to im prove the initial placing sequence [24]. There are many other mathematical optimizatio approaches for solving the placing sequence problem; however, providing a fast and sim ple algorithm is better for industrial implementation. Therefore, in this study, a neares neighbor search was applied to determine the shortest route for placement; subsequentl the placing routes were shortened by using the 2-opt method. Firstly, component 1 placed by calculating the distance between the feeder slot and the first placing positio Then, the distance between the first placing position and the second placing position calculated for component 2. Continue the above steps for all components that need to b placed on a cycle. The shortest route between a feeder slot and the first component placing position each cycle is determined independently because each component can be placed in mo than one position. We used an example to illustrate how to determine the first placin position. As presented in Figure 16, it is assumed that the first component can be place in one of the six possible positions, A, B, C, D, E, or F. Using the Euclidean distance calculate the nearest position from the feeder slot revealed that A is the nearest positio that is, the first component placing position.  Figure 17. Figure 17a shows that the possible se ond component placing positions are S1-S6, and the nearest distance from the first com ponent placing position A is S2. Therefore, S2 in Figure 17a is selected as the second pla ing position B. Figure 17b shows that the possible third component placing positions a S1-S6, and the nearest distance from the first component placing position B is S1. Ther fore, S1 in Figure 17b is selected as the second placing position C. Continue the selectin process until all the placing positions are determined (Figure 17c-f).
After all placing sequences were obtained, the 2-opt method was used to optimi the route for these placing sequences of all cycles. As presented in Figure 18, the sequen on the top is ABCDEF, which was changed to the sequence on the bottom, ACBDEF, b changing the order of placing sequences C and B.  Figure 17. Figure 17a shows that the possible second component placing positions are S1-S6, and the nearest distance from the first component placing position A is S2. Therefore, S2 in Figure 17a is selected as the second placing position B. Figure 17b shows that the possible third component placing positions are S1-S6, and the nearest distance from the first component placing position B is S1. Therefore, S1 in Figure 17b is selected as the second placing position C. Continue the selecting process until all the placing positions are determined (Figure 17c-f).
After all placing sequences were obtained, the 2-opt method was used to optimize the route for these placing sequences of all cycles. As presented in Figure 18, the sequence on the top is ABCDEF, which was changed to the sequence on the bottom, ACBDEF, by changing the order of placing sequences C and B.

Experimental Results
To verify that the proposed methods are able to reduce the number of picks and shorten the assembly time, this study experimented on 10 PCBs with different numbers and types of components and examined the results. The description of the practical PCBs is presented in Table 3, and according to the literature reviews [1-9], three well-known algorithms including DE, PSO, and GA are compared with the proposed MDE algorithm under the same conditions, and the experimental results are presented in Tables 4-8. The parameter NP was 30, iteration time was 1000, CR was 0.8, and scaling factor was 0.9. Equation (6) was used for mutation calculation.
Tables 4 and 6 compare the number of picks and moving distance of gantries during their component picking processes, respectively. Those two tables are mainly used to evaluate the feeder arrangement and picking sequence using the proposed MDE algorithm

Experimental Results
To verify that the proposed methods are able to reduce the number of picks and shorten the assembly time, this study experimented on 10 PCBs with different numbers and types of components and examined the results. The description of the practical PCBs is presented in Table 3, and according to the literature reviews [1-9], three well-known algorithms including DE, PSO, and GA are compared with the proposed MDE algorithm under the same conditions, and the experimental results are presented in Tables 4-8. The parameter NP was 30, iteration time was 1000, CR was 0.8, and scaling factor was 0.9. Equation (6) was used for mutation calculation.
Tables 4 and 6 compare the number of picks and moving distance of gantries during their component picking processes, respectively. Those two tables are mainly used to evaluate the feeder arrangement and picking sequence using the proposed MDE algorithm

Experimental Results
To verify that the proposed methods are able to reduce the number of picks and shorten the assembly time, this study experimented on 10 PCBs with different numbers and types of components and examined the results. The description of the practical PCBs is presented in Table 3, and according to the literature reviews [1-9], three well-known algorithms including DE, PSO, and GA are compared with the proposed MDE algorithm under the same conditions, and the experimental results are presented in Tables 4-8. The parameter NP was 30, iteration time was 1000, CR was 0.8, and scaling factor was 0.9. Equation (6) was used for mutation calculation. Nevertheless, to remedy the drawback of the tendency of those three algorithms to rapidly converge, a very frequently used alternative is to keep the global best particle and regenerate all or part of the remaining particles. In this study, the MDE algorithm, which removes populations with high similarity to retain the diversity of the solutions, is presented and the experimental results demonstrate considerably fewer average number of picks than conventional DE, PSO, and GA conducted by Gantry_1 and Gantry_2.
In Figure 19, compared with those three algorithms, the MDE algorithm is able to jump off the local optimal solution with less generations, which may be the reason the two similarity measurement mechanisms are used. In addition, the MDE with Euclidean distance similarity method can converge faster than the similarity method using the Dice coefficient; however, their final results of average number of picks are almost the same. From those experimental results, the MDE algorithm is shown to be the highest performance in feeder arrangement compared with DE, PSO, and GA. Moreover, Table 5 demonstrates the difference of number of picks using MDE in comparison with those of three well-known algorithms. A gantry can reduce at most 30% of the number of picks while using the MDE algorithm which meets the company's needs, which provided the practical PCB data in this experiment; however, according to no free lunch theorem [26] once the number of components increased in each PCBs (>1000) or the types of components vary (>30), the training time of MDE might increase, which results in time-consuming manufacturing.
Mathematics 2021, 9,2016 18 of 22 In Figure 19, compared with those three algorithms, the MDE algorithm is able to jump off the local optimal solution with less generations, which may be the reason the two similarity measurement mechanisms are used. In addition, the MDE with Euclidean distance similarity method can converge faster than the similarity method using the Dice coefficient; however, their final results of average number of picks are almost the same. From those experimental results, the MDE algorithm is shown to be the highest performance in feeder arrangement compared with DE, PSO, and GA. Moreover, Table 5 demonstrates the difference of number of picks using MDE in comparison with those of three well-known algorithms. A gantry can reduce at most 30% of the number of picks while using the MDE algorithm which meets the company's needs, which provided the practical PCB data in this experiment; however, according to no free lunch theorem [26] once the number of components increased in each PCBs (>1000) or the types of components vary (>30), the training time of MDE might increase, which results in time-consuming manufacturing.   Table 6 displayed that the moving distances of two gantries for the picking process were decreased with the proposed MDE algorithm. From Tables 4 and 6, the results reveal that in comparison to other evolutionary algorithms, the MDE algorithm provides a proper feeder arrangement which is able to reduce the number of picks and also reduce the gantries' moving distances. Table 7 presents the total picking-and-placing assembly time required for each of the 10 PCBs. A combination of NNS and 2-opt method is primarily involved in components placing operation. The total assembly time was calculated using Equation (6), which involved comparing the time required by the two gantries to finish their tasks. Figure 20 depicts the assembly of PCB-1 using Similarity 1 in the MDE algorithm as the example. When Gantry_1 was placing components and Gantry_2 was picking components, the longer time required between the two simultaneous operations was used in the calculation. Similarly, when Gantry_1 was picking components and Gantry_2 was placing components, as shown in Figure 21, only the longer time required between the two simulta-   Table 6 displayed that the moving distances of two gantries for the picking process were decreased with the proposed MDE algorithm. From Tables 4 and 6, the results reveal that in comparison to other evolutionary algorithms, the MDE algorithm provides a proper feeder arrangement which is able to reduce the number of picks and also reduce the gantries' moving distances. Table 7 presents the total picking-and-placing assembly time required for each of the 10 PCBs. A combination of NNS and 2-opt method is primarily involved in components placing operation. The total assembly time was calculated using Equation (6), which involved comparing the time required by the two gantries to finish their tasks. Figure 20 depicts the assembly of PCB-1 using Similarity 1 in the MDE algorithm as the example. When Gantry_1 was placing components and Gantry_2 was picking components, the longer time required between the two simultaneous operations was used in the calculation. Similarly, when Gantry_1 was picking components and Gantry_2 was placing components, as shown in Figure 21, only the longer time required between the two simultaneous operations was used in the calculation. Finally, the sum of the time represented the total assembly time, as presented in Figure 22. The proposed methods required less assembly time for PCBs tested as shown numerically in Table 7 and graphically in Figure 23. Table 8 demonstrates the difference of assembly time for each PCB using the MDE in comparison with those of the three well-known algorithms. The assembly time is decreased at most by 13% using the proposed method.

Conclusions
This study focuses on the component allocation and feeder arrangement for dualgantry multi-head SMP machines and solves related scheduling problems using four approaches. The component allocation problem was solved using a workload equalizing approach, which equalized component allocation to the two gantries. The ANC assignment problem was solved using quantity ratio method to determine the required number for each type of nozzle to be installed at each ANC. Moreover, the proposed MDE algorithm identifying the picking sequence that gave the least number of picks was applied for the feeder arrangement. The nearest-neighbor search method was used for deriving initial solutions, and then the 2-opt method was applied to improve the tentative placement routes. Experimental results show that the number of picks, moving distance of picking components, and total assembly time with the proposed MDE algorithm are less than those from DE, PSO, and GA algorithms. This study provides a reference for SMP scheduling in PCB industry.
Practically, there are many types of components placed in a PCB, and sometimes the components are not equal in equal size. Larger component size occupies two head spaces, and the adjacent head cannot be used for other components. The restriction of component shape is not considered in the current study, and this can be conducted in the future work. Additional experiments are suggested to consider (i) the effect of components on shape and component orientation, and their impact on picking and placing; and (ii) whether other optimal algorithms such as modified PSO/GA can be implemented in the future to obtain comprehensive results and demonstrate whether the proposed MDE algorithm is superior.

Conclusions
This study focuses on the component allocation and feeder arrangement for dualgantry multi-head SMP machines and solves related scheduling problems using four approaches. The component allocation problem was solved using a workload equalizing approach, which equalized component allocation to the two gantries. The ANC assignment problem was solved using quantity ratio method to determine the required number for each type of nozzle to be installed at each ANC. Moreover, the proposed MDE algorithm identifying the picking sequence that gave the least number of picks was applied for the feeder arrangement. The nearest-neighbor search method was used for deriving initial solutions, and then the 2-opt method was applied to improve the tentative placement routes. Experimental results show that the number of picks, moving distance of picking components, and total assembly time with the proposed MDE algorithm are less than those from DE, PSO, and GA algorithms. This study provides a reference for SMP scheduling in PCB industry.
Practically, there are many types of components placed in a PCB, and sometimes the components are not equal in equal size. Larger component size occupies two head spaces, and the adjacent head cannot be used for other components. The restriction of component shape is not considered in the current study, and this can be conducted in the future work. Additional experiments are suggested to consider (i) the effect of components on shape and component orientation, and their impact on picking and placing; and (ii) whether other optimal algorithms such as modified PSO/GA can be implemented in the future to obtain comprehensive results and demonstrate whether the proposed MDE algorithm is superior.