Optimizing Painting Sequence Scheduling Based on Adaptive Partheno-Genetic Algorithm

: In this paper, we formulate and solve a novel real-life large-scale automotive parts paint shop scheduling problem, which contains color arrangement restrictions, part arrangement restrictions, bracket restrictions, and multi-objectives. Based on these restrictions, we construct exact constraints and two objective functions to form a large-scale multi-objective mixed-integer linear programming problem. To reduce this scheduling problem’s complexity, we converted the multi-objective model into a multi-level objective programming problem by combining the rule-based scheduling algorithm and the adaptive Partheno-Genetic algorithm. The rule-based scheduling algorithm is adopted to optimize color changes horizontally and bracket replacements vertically. The adaptive Partheno-Genetic algorithm is designed to optimize production based on the rule-based scheduling algorithm. Finally, we apply the model to the actual optimization problem that contained 829,684 variables and 137,319 constraints, and solved this problem by Python. The proposed method solves the optimal solution, consuming 575 s.


Introduction
The automotive parts manufacturing industry has entered a golden period of development [1].In the automotive supply industry, the paint shops provide a large number of painted items for car manufacturing [2].At present, some important factors, such as efficiency, cost, low carbon and environmental protection, should be considered in the design of paint shops for the automotive supply industry.Many modern factories have introduced high-level automation manufacturing systems, including conveyor belt systems, paint guns, loading robots, and unloading robots.In this sophisticated production process, an excellent paint schedule is difficult to establish to fulfill many constraints and optimization requirements.Thus, there is a strong need to develop efficient automated scheduling techniques for painting sequence scheduling in the automotive supply industry.
In recent years, an increasing number of studies have discussed related scheduling problems.Each case of research has its unique characteristics that must be considered for developing appropriate models and solving approaches.In the automotive supply industry, the general paint scheduling problem has been proved to be a non-deterministic polynomial (NP) complete problem [3,4].To reduce the difficulty of scheduling and obtain feasible solutions, a single objective, such as the number of color changes, is often considered.A color change occurs whenever two consecutive parts need to be painted with different colors.For each color change, the color jets of the spray robots have to be cleaned, resulting in inevitable costs and water pollution.Based on these reasons, some researchers have studied the scheduling scheme for optimizing the number of color changes.In reference [3], the main goal of this paint shop problem is to find the optimal coloring for a given sequence of jobs that minimizes the required color changes.A dynamic programming method is applied to solve this problem.Linear programming and local-search-based approaches, combined with a metaheuristic for tackling the size of the word that is small for both the necklace problem and the paint shop problem, have been studied [5].For minimizing the number of color changes, reference [6] provides a method that uses selectivity banks to establish a model based on color batches.The optimal schedule is achieved by the branch and bound approach.On the topic of color-batching, further studies, such as the rule-based fill approach and the heuristic-based release approach, are presented in references [7,8].Moreover, they introduce two virtual resequencing techniques, both of which can be individually integrated into physical resequencing while integrated resequencing is used.
A capacity limitation and a type restriction of overhead hangers were considered in reference [9].A mixed-integer programming model for the scheduling problem was developed.Moreover, a 2-Opt improvement algorithm and a tabu search metaheuristic algorithm were designed.However, these solution methods are not suitable for scheduling problems that consider due dates, color changes, and carrier changes.In references [4,10], the authors proposed a novel paint shop scheduling problem that aims to achieve the optimal schedule by minimizing color changes, minimizing carrier changes, carrier constraints, and due date constraints.They provided a novel metaheuristic solution approach using simulated annealing to solve this problem.Furthermore, constraint programming models were established in reference [4], motivated by reference [10].Additionally, the researchers analyzed the problem's complexity and proved that the decision variant is NP-complete.However, to the best of our knowledge, some colors have order constraints and some automotive parts cannot be placed adjacent to each other.In addition, it is necessary to design a novel algorithm to improve the efficiency of the solution.
In this paper, based on [4], we developed a multi-objective mixed-integer linear programming model for the real-life painting sequence scheduling problem, which contained paint arrangement restrictions, parts arrangement restrictions, and multi-objectives that have not been reported in the existing literature.Our main contribution can be summarized as follows.First, we analyzed the processing characteristics and established a multi-objective mixed-integer programming model based on the above restrictions.Second, inspired by references [7,8], a rule-based scheduling algorithm is designed to minimize the number of color changes, and an adaptive Partheno-Genetic algorithm is designed to maximize production and minimize carrier changes.That means our scheduling problem was reduced by combining these two algorithms.Finally, we combined the proposed method to solve an actual instance and obtain the optimal solutions.Computational results illustrated that the proposed model, combined with the designed algorithms, can effectively solve the large-scale paint shop scheduling problem.
This paper is organized as follows.We describe the researched problem in Section 2, including color arrangement restrictions, part arrangement restrictions and objectives.Section 3 establishes the constraints and objective functions.Section 4 proposes the rulebased scheduling algorithm and the adaptive Partheno-Genetic algorithm, and applies the designed algorithms to an actual instance to demonstrate the validity of the proposed method.Finally, Section 5 provides a conclusion.

Problem Description
In this article, the general production process of the painting operation is depicted in Figure 1.We considered the painting process of car parts using automated devices, including a cyclic conveyor belt, a spray robot, and 303 skids.On each skid, we can place six brackets, and one part can be arranged on each bracket.The painting time for each skid is 60 s, and the painting time for the 303 skids was approximately 5.5 h.Restrictions in the painting process include the number of brackets, the painting sequence of the parts, the arrangement of colors, the arrangement of parts, and the production demands.Thus, the painting plan should be scheduled to meet the production demands in one lead time of 44 h as much as possible.

Color Arrangement Restrictions
The parts placed on the bracket are subjected to the following painting sequence: primer (black/white)-topcoat-varnish (high gloss/matte).The topcoat determines the color of a part, and each topcoat has a corresponding primer and varnish color.If parts placed on the two skids successively require different topcoats, the process requires a color change, which means that the color of the corresponding spray gun must be changed.The color change process requires inserting primer parts on a skid between these two skids as a transition.The transition can be any type of part, such as an after-sale spare part without a topcoat.All categories of topcoat are given in Table 1.Restrictions on the sequence of topcoat changes are detailed as: C1.The color white cannot be arranged after the colors red and blue as shown in Figure 2a,b; C2.Black cannot be arranged after the topcoat polar white as shown in Figure 2c; C3.In front of the topcoat diamond white, the topcoat polar white is required as shown in Figure 2d.

Part Arrangement Restrictions
To ensure the quality of the final product, certain restrictions of parts arrangements should be considered during the painting process.All types of parts are given in Table A1.The restrictions on the placement of parts are detailed as: P1.The parts of threshold B, the parts of threshold C, and the parts of threshold A, threshold D, Rear bumper A, and threshold trim A are classified by three kinds of incompatible processing parts, which means that they cannot be placed on two skids successively.If they are, they will cause product collision damage; P2.The parts of threshold B and threshold C cannot be placed on two skids successively with any radar bracket.

Purpose and Symbol Statements
The purpose of this paper is to schedule an optimized one lead time 44 h painting plan, which is required to fulfill the production demands as much as possible.The number of the color changes and the bracket replacement are to be minimized.This is a multi-objective optimization problem.In this research, we established a mixed-integer linear programming model, and achieved the optimal solutions by designing a novel algorithm.
This article proclaims the following ten symbols that are used frequently, and the remaining symbols are indicated when they are used as shown in Table 2.

Symbol Symbol Description i
Parts number, i ∈ Decision variable, the parts i are painted with topcoat j on the k-th skid in the nth cycle.y ij Indicator variable, the parts i, painted with topcoat j, may be completed or not.

D i
The maximum number of brackets for parts i X The total number of parts i painted with topcoat j in the n-th cycle Xij The number of parts i painted with topcoat j R ij The production demands for parts i painted with topcoat j

Decision Variables and Indicator Variables
Each skid can only be scheduled for one painting task at most in the same cycle.Thus, the decision variables are 0-1 and are defined as follows: 1 if parts i are painted with topcoat j on the k-th skid in the n-th cycle.0 otherwise. ( The constraints to ensure that the variable does not conflict can be expressed as: where K and N are sets defined in Table 2.In order to characterize the completion of the types of parts, we define the indicator variables as: 1 if the number of parts i sprayed with topcoat j meet the production demands R ij , 0 otherwise. (3)

Restrictions of Brackets
The number of corresponding brackets restricts the number of painted parts in each circle, and the same type of brackets may also correspond to different topcoats for the same type of parts.Each skid can arrange six brackets, which means that the m skids used and the number of painted parts are subject to 6(m − 1) Therefore, to express these bracket restrictions, the symbol X (n) ij represents the total number of parts i painted with topcoat j during the n−th circle with the following constraints: where I, J and N are sets defined in Table 2.In addition, the total number of painted parts is constrained by the restrictions of the bracket, which has the following constraint: We assumed that transitional parts do not count the number of used brackets.Figure 3 shows that if a specific type of part is arranged on a skid, it should be filled as much as possible.Therefore, the X (n) ij corresponding to the above constraints (4) and ( 5) can be used to represent the total processing number of parts i sprayed with topcoat j during the n-th cycle.

Demands Restrictions
The total number of parts i painted with topcoat j should fulfill the production demands R ij leading to the following constraints: Due to resource limitations, constraints (6) may not be true.Parts that exceed the demand will not produce economic benefits, and we restrict the total number of painted parts so that they cannot exceed twice the production demand.Thus, the constraints (6) are rewritten:

Color Change Restrictions
If parts placed on two skids successively must be painted with different topcoats, the color of the corresponding spray gun needs to be changed.Color change requires a transition skid, and the corresponding parts are not counted in the total output of the transition skid.The corresponding situations are depicted in Figure 4.The constraints that satisfy the above relationship are as follows: ∑ where the set K − {303} denotes that the set K removes the point {303}.
Inequality (8) demonstrates that, when the k-th skid is arranged with topcoat j 1 , expression 1 is equal to 1.In order to meet the above constraint (8), the other topcoat j 2 = j 1 on the (k + 1)-th skid cannot be arranged, and the expression 2 is equal to 0. Inequality (9) demonstrates that one empty skid can often be placed between two consecutive painting tasks.
When the parts on the (k + 2)-th skid are painted with the color white, the expression 3 is equal to 1.To satisfy the constraint (10), the parts on the k-th skid cannot be painted with the color red or blue, that is, the expression 4 is equal to 0. Other scenarios are not subject to this constraint.

•
According to restriction C2 and Figure 6, the paint tasks j 1 = {9, 10} and j 2 = 1 are incompatible with the skids k and k + 2. Thus, we establish following constraints.∑ When the parts placed on the k-th skid are painted with polar white, the expression 5 is equal to 1.To satisfy the constraint (11), the parts on the (k + 1)-th skid cannot be painted with the color black, that is, the value of expression 6 is 0. Other scenarios are not subject to this constraint.

•
According to restriction C3 and Figure 7, the paint task j 2 = 2 must be arranged after the task j 1 = 1.Thus, we establish the following constraints.∑ When the parts placed on the (k + 2)-th skid are painted with diamond white, the value of expression 7 is equal to 1. Diamond white may come from polar white on the k-th skid by color change, or the previous parts are painted diamond white on the (k + 1)-th skid.The constraints ( 8) and ( 9) exactly guarantee that x (n) i 2 ,2,k+1 and x (n) i 2 ,1,k in expression 8 are not equal to 1 simultaneously.Therefore, the constraints in the form of ( 12) can express all possible layouts of diamond white, as seen in Figure 8.

Parts Arrangement Restrictions
Some parts cannot be arranged successively to avoid scratching and damaging.However, they can be arranged with a transition skid as seen in Figure 9.To facilitate the following constraints expressions, the following symbols in Table 3 are introduced to indicate these specific parts.

Symbol
Symbol Description Rear bumper A, threshold A, threshold D and threshold trim A I 4 = {27, 28, 29, 30, 31} All radar brackets • According to the restriction P1, we established the following constraints. where As shown in Figure 9a, when parts belonging to I m are placed on the k-th skid, the left of ( 13) is equal to 0, and the right of ( 13) must be 0.
The parts in Ω cannot be arranged on the (k + 1)-th and (k − 1)-th skids.As shown in Figure 9b, when parts belonging to I m are not placed on the k-th skid, the left of ( 13) is equal to 2, and the right of ( 13) can reach 0, 1, and 2, that is, the types of parts placed on two consecutive skids are not restricted.Therefore, the scale 2 in the left of ( 13) guarantees the feasibility of the solution.

•
According to the restriction P2, we established the following constraints.
As shown in Figure 9a, when parts belonging to I 1 ∪ I 2 are placed on the k-th skid, the left of ( 14) is equal to 0 and the right of ( 14) must be equal 0. At this time, the parts belonging to I 4 cannot be placed on the (k + 1)-th and (k − 1)-th skids.As shown in Figure 9b, when parts belonging to I 1 ∪ I 2 are not placed on the k-th skid, the left of ( 14) is equal to 2, and the right of ( 14) can reach 0, 1, and 2, that is, the types of parts placed on two consecutive skids are not restricted.Therefore, the scale 2 in the left of ( 14) guarantees the feasibility of the solution.

Objective of Production Demands
Here, the number of painted parts in the scope of production demand is called the number of effective painted parts, and its expression is defined as: We constructed an objective that maximizes the number of all effective painted parts as follows: Remark 1.According to the analysis, when the production scale is small and the production demands cannot be met, the larger the number of effectively painted parts, the fewer the color changes.Therefore, the optimal objective of meeting production demands also includes minimal color changes.

Minimize the Number of Bracket Replacements
We used the following formula: We can indicate whether the parts placed on the kth skid are same in the n-th and n + 1-th cycle, then can be used to denote the objective to minimize the number of bracket replacements.To simplify the expression (18), we introduced indicator variables S (n) ik ∈ {0, 1} and set where the set N − {8} denotes that the set N removes the point {8}.When the expression 9 is equal to 1, the right of (19) takes at least 1.If the expression 10 is equal to 1, S ik can take 0, that is, there is the same type of bracket on the k-th skid in the n-th and (n + 1)-th cycles.If the expression 10 is equal to 0, S ik must be equal to 1 to ensure (19) holds.Therefore, the objective in (18) can be converted into: By (20), the minimal number of bracket replacements can be realized.

Multi-Objective Mixed-Integer Linear Programming Model
With the above decision variables and restriction constraints, the complete mixedinteger linear programming model can be established.
(21) Equation ( 16) defines the first objective, that is, maximizing the number of all effective painted parts.Equation (20) defines the second objective, that is, minimizing the total number of bracket replacements.
This scheduling problem is NP-hard, and we can prove this by restriction.If a special case of the considered problem generated by restriction is the same as the known NP-hard problem, then the considered problem is also NP-hard because it contains the hard problem [11].If we fulfill all demands and do not consider the number of bracket restrictions, this special scheduling problem is a single objective programming approach.With regard to the spray as a salesman, with one paint task as a city and the color change and transition skid as the travel cost, then minimizing the number of color changes is equivalent to minimizing the cost of the Travel Salesman Problem (TSP), which is a well known NP-hard problem [12].Thus, our scheduling problem is NP-hard.Due to this problem's large scale, it is necessary to design an effective mathematical model and choose an algorithm suitable for addressing the NP-hardness of the considered problem.

Rule-Based Scheduling Algorithm (RSA)
There are mutually exclusive rules, ordered rules, and disordered rules for arranging colors and parts for the painting process in this research.According to the basic idea of a rule-based classifier in machine learning, we designed a rule-based scheduling algorithm (RSA) to obtain the initial solution to reduce the iteration number for the heuristic algorithm [13].Therefore, the RSA is designed as follows.
Step 1. Make statistics on production demands according to the type of color.According to the principle of fewer color changes, color types with the greatest demand are processed first.For example, consider the real instance in this paper, and the priority is as follows, based on the parts requirements.Step 2. Construct a task priority sequence and the sequence is defined by a vector (i, j, R ij ) (parts, colors, demand).Firstly, the painting tasks are scheduled based on the priority of the parts type.When the parts types have the same priorities, they could be scheduled according to the colors; Step 3. Traverse every skid in each cycle and conduct polling according to task priority; Step 4. Assign task to the k−th skid on the n−th cycle(1 ≤ n ≤ 8, 1 ≤ k ≤ 303), and set the task number t = 1; Step 5. Select the t−th task from the task sequence.If R ij = 0 or D n i = 0 in the n−th circle, update the skid status as an unused skid, set the task number as t = t + 1, and return to Step 5. Otherwise, execute Step 7; Step 6. Check the constraints.If it is not satisfied, update the skid's status as an unused skid, set the task number as t = t + 1, and return to step 5. Otherwise, continue to execute step 7; Step 7. Set the decision variable return to step 4.
We consider the production demands in Table A2 and the restrictions of the brackets in Table A3 in Appendix A. The total number of part types is 83, and 13,445 parts must be painted based on the production demands.Apply the RSA algorithm for this scheduling problem and obtain the results as shown in Table 4.The average color changes and average brackets replacements per cycle are seven and 18, respectively.However, the total painted part types are 73, and the total painted parts are 11,699, which means the output is not maximized.Note that the unfinished tasks are all diamond white because diamond white must be arranged after the polar white, and the current priority mode cannot meet this constraint.To achieve the optimal schedule, we take the solution obtained in this subsection as an initial solution and design an Adaptive Partheno-Genetic algorithm to solve this scheduling problem.

Adaptive Partheno-Genetic Algorithm (APGA)
In this part, we design an adaptive Partheno-Genetic algorithm, a heuristic algorithm simulating single-parent reproduction.In the solution generation stage, the interval nonrepetitive sampling method is adopted to generate individuals without any dimensional repetition.The unique methods are introduced in the mutation and crossover stages to ensure that all solutions are feasible in each genetic algorithm stage.Since all genetic operations are performed on one individual, the genetic operation process is simplified.Moreover, there is no premature convergence problem, and it has a good effect on solving the optimization problem in the research.The principles of the adaptive Partheno-Genetic algorithm are given as follows. 1.

Fitness function
The rule-based scheduling has minimized the number of color changes and the number of bracket replacements.Thus, the total part production ( 16) is selected as the fitness function; 2.
Regeneration operator To prevent the optimal solution produced in the evolution process from being destroyed by the crossover operator or the mutation operator, set the elite individuals' proportion as 0.2, and copy the individuals with higher fitness directly to the next generation as part of the offspring population; 3.

Mutation operator
The mutation operator is the primary operator for maintaining the genetic algorithm population's diversity and prevent it from prematurely falling into a locally optimal solution.Let p be the mutation probability of an individual, then for any solution ), the mutation operator includes the rearrangement operator and the rotation operator.

(i) Rearrangement operator
The rearrangement operator is defined as the random rearrangement of the individual x in all dimensions and expressed as where, Rotation operator Rotation operator maps the individual x to a new individual x expressed as where k is a random integer in [0, m].

Probability exchange operator
We introduce a probability exchange mechanism to avoid an infinite cycle.The exchange mechanism exchanges the positions of any two elements in an individual x and obtains the new individual x as where r and k are random integers in [0, m].The probability of an exchange occurring is q. 5.
Adaptive adjustment If all elite individuals have the same fitness, reduce the proportion of elites and increase the proportion of mutations to increase the mutation population.Set an adjustment scale factor γ 1 < 1 and the proportion of elites is 0.2γ 1 .Moreover, the ratio of mutations is 1 − 0.2γ 1 .If all individuals have the same fitness, a more radical mutation strategy is adopted.Reduce the proportion of elite individuals and increase the ratio of the mutations.Set an adjustment scale factor γ 2 < γ 1 , the proportion of elites and mutations are 0.2γ 2 and 1 − 0.2γ 2 , respectively.
According to the above principles, the APGA algorithm is designed as follows.
Step 1. Set parameters of the population size, the maximum number of iterations, the probability of mutation, the probability of exchange, the expected optimal solution, and the adaptive adjustment coefficients; Step 2. Generate the initial population and obtain the initial solution vector; Step 3. Evaluate each individual through fitness function and sort them in order of fitness; Step 4. If the number of iterations is equal to the maximum number of iterations or the current optimal fitness is better than the expected optimal solution, end this program and output the optimal result.Otherwise, go to Step 5; Step 5. Utilize elite operator, mutation operator, and exchange operator to generate individual offspring.
Step 6. Adaptively adjust the proportion of the elite population and the proportion of the mutant population and return to Step 3.
For the real-life instance in this paper, model ( 21) is a multi-objective mixed-integer linear programme containing 829,684 variables and 137,319 constraints.This article will combine the above two algorithms (RSA + APGA) to optimize it.The initial solution is obtained by applying RSA and utilizing APGA to solve the optimal scheduling solution.
Here, the mutation probability is 0.1, the exchange probability is 0.2, and the expected optimal solution is the default value.The adaptive adjustment parameters are 0.8 and 0.5, respectively.The stratified sequencing method (SSM) equipped in the Gurobi solver [14] is a multi-level objective optimization method, and we can apply it by Python.To compare with the results solved by SSM and demonstrate the effectiveness of the proposed methods, the RSA and APGA algorithms in this article are implemented by Python.The brief results are presented in Table 5.The results show that the RSA + APGA algorithm can fully meet the output demand.Furthermore, it has realized the optimized color changes and bracket replacements.The optimization result of RSA + APGA takes 575 s calculation time.The proposed method is compared with the SSM and the genetic algorithm (GA).As shown in Table 5, neither of these two methods can fulfill the production demands, and the numbers of bracket replacements have not been optimized.Moreover, the SSM and GA algorithms have consumed more than 6000 s and 5 h, respectively.

Conclusions
We addressed a scheduling problem in a factory designed for the painting of automotive parts, in which more than ten thousand automotive parts can be painted in different colors.The problem has various important and practical characteristics, such as resource restriction, color sequence restriction, and part arrangement restrictions.These characteristics make the problem unique and have not been addressed previously.In this paper, a multi-objective mixed integer model was developed for the scheduling problem.This model cannot be solved directly due to its large scale and complexity.Therefore, we designed a rule-based scheduling algorithm (RSA) to optimize color changes horizontally and bracket replacements vertically.Furthermore, we introduced the adaptive adjustment for the Partheno-Genetic algorithm to obtain the optimal scheduling solution based on the RSA.Finally, we applied the proposed method to an actual instance containing 83 types and 13,445 parts that needed to be painted with different colors.In this mathematical programming approach, there are 829,684 variables and 137,319 constraints.The model solution results showed that all production demands could be fulfilled.The total number of color changes was 63, and the brackets changed 104 times in eight cycles.Furthermore, the RSA + APGA algorithm consumed 575 s, exhibiting more computing efficiency than other methods.
In conclusion, the painting sequence arrangement model proposed in this paper has strong practicability and excellent effects, and can reasonably solve the problems raised here.This model can also be extended to other application areas and more general production resources.

Figure 2 .
Figure 2. Restrictions on the sequences of topcoats.

Figure 4 .
Figure 4. Rational utilization of a transition skid.

Figure 8 .
Figure 8. Arrangement of polar white and diamond white.

Figure 9 .
Figure 9.A reasonable arrangement of specific parts.

Table 2 .
The ten symbols used frequently.

Table 3 .
Classification of the parts according to restrictions.

Table 4 .
The results of Rule-Based Scheduling Algorithm.

Table 5 .
Results of maximizing production and minimizing the number of bracket replacements.

Table A3 .
The number of bracket for different types of part.