Multi-color spraying path planning method and system based on hybrid heuristic algorithm

Optimizing the multi-color spray path of the spray gun through a hybrid heuristic algorithm solves the high cost problem in existing multi-color spray technology, achieves more efficient spray efficiency and paint utilization, and is suitable for diversified automotive painting needs.

CN114648162BActive Publication Date: 2024-10-15SHANDONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202210268264.X
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2022-03-18
Publication Date
2024-10-15
Estimated Expiration
2042-03-18

AI Technical Summary

Technical Problem

Among existing multi-color spray coating technologies, single-nozzle and dual-nozzle spray guns have high color changing costs and spray gun moving path costs, making it difficult to meet the personalized needs of automobile painting.

Method used

A multi-color spraying path planning method based on a hybrid heuristic algorithm is used to optimize the moving path and spraying sequence of the spray gun through the cluster traveling salesman problem and the cluster traveling salesman problem, combined with the greedy random adaptive search algorithm and the variable neighborhood search algorithm, and reduce Number of color changes and spray gun movement distance.

Benefits of technology

It effectively reduces the spray gun moving distance and color changing costs, improves spraying efficiency and paint utilization, and is suitable for patterns of different sizes and sizes. In particular, the dual-nozzle spray gun can shorten the spray gun moving distance compared to the single-nozzle spray gun.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN114648162B_ABST
    Figure CN114648162B_ABST
Patent Text Reader

Abstract

The present invention discloses a multi-color spraying path planning method and system based on a hybrid heuristic algorithm, including: obtaining the color of a target color block of an object to be sprayed, the position of the target color block of the object to be sprayed, and the distance between the center points of adjacent target color blocks; describing the multi-color spraying path planning based on the hybrid heuristic algorithm of a single nozzle spray gun as a cluster traveling salesman problem according to the acquired data; wherein the cluster traveling salesman problem includes: an objective function and constraints; using a greedy random adaptive search algorithm to solve the cluster traveling salesman problem to obtain an initial solution; using a variable neighborhood search algorithm to update the initial solution to obtain an optimal solution; obtaining a spraying order for different color blocks according to the optimal solution; and controlling the single nozzle spray gun to spray the object to be sprayed according to the spraying order. The present invention proposes a new hybrid heuristic algorithm for obtaining the minimum path for the spray gun to move.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to the technical field of spraying path planning, and in particular to a multi-color spraying path planning method and system based on a hybrid heuristic algorithm. Background Art

[0002] The statements in this section merely mention background art related to the present invention and do not necessarily constitute prior art.

[0003] In order to improve the quality of automobile painting and the utilization rate of paint, and reduce the damage to people during the automobile spraying process, spraying robots are now widely used in automobile painting, and the painting production line has basically realized unmanned automatic spraying. With the diversification of people's demand for automobile products, single-color spraying cannot meet the needs of personalized pattern decoration, protection, and functionality in civil and military fields.

[0004] The inventors found that the technical defects of the existing multi-color spraying are:

[0005] For single-nozzle spray guns, the cost of color change and the cost of the spray gun moving path are relatively high;

[0006] For a dual-nozzle spray gun, the cost of the spray gun movement path is relatively high. Summary of the invention

[0007] In order to solve the deficiencies of the prior art, the present invention provides a multi-color spraying path planning method and system based on a hybrid heuristic algorithm; the present invention proposes a new hybrid heuristic algorithm for obtaining the minimum path for the movement of the spray gun.

[0008] In a first aspect, the present invention provides a multi-color spraying path planning method based on a hybrid heuristic algorithm;

[0009] A multi-color spraying path planning method based on a hybrid heuristic algorithm, applied to a single nozzle spray gun; including:

[0010] Obtain the color of the target color block of the object to be sprayed, the position of the target color block of the object to be sprayed, and the distance between the center points of adjacent target color blocks;

[0011] According to the acquired data, the multi-color spraying path planning of a single nozzle spray gun based on a hybrid heuristic algorithm is described as a cluster traveling salesman problem; wherein the cluster traveling salesman problem includes: an objective function and constraints;

[0012] The cluster traveling salesman problem is solved by using a greedy random adaptive search algorithm to obtain an initial solution;

[0013] Adopt variable neighborhood search algorithm to update the initial solution and obtain the optimal solution;

[0014] The spraying order of different color blocks is obtained according to the optimal solution; and according to the spraying order, the single nozzle spray gun is controlled to spray the object to be sprayed.

[0015] In a second aspect, the present invention provides a multi-color spraying path planning system based on a hybrid heuristic algorithm;

[0016] A multi-color spray path planning system based on a hybrid heuristic algorithm for single-nozzle spray guns; including:

[0017] A first acquisition module is configured to: acquire the color of the target color block of the object to be sprayed, the position of the target color block of the object to be sprayed, and the distance between the center points of adjacent target color blocks;

[0018] The first problem description module is configured to: describe the multi-color spraying path planning of a single nozzle spray gun based on a hybrid heuristic algorithm as a cluster traveling salesman problem according to the acquired data; wherein the cluster traveling salesman problem includes: an objective function and constraints;

[0019] The first problem solving module is configured to: solve the cluster traveling salesman problem using a greedy random adaptive search algorithm to obtain an initial solution;

[0020] A first updating module is configured to: use a variable neighborhood search algorithm to update the initial solution to obtain an optimal solution;

[0021] The first spraying module is configured to: obtain a spraying sequence for different color blocks according to an optimal solution; and control a single nozzle spray gun to spray an object according to the spraying sequence.

[0022] In a third aspect, the present invention provides a multi-color spraying path planning method based on a hybrid heuristic algorithm;

[0023] A multi-color spraying path planning method based on a hybrid heuristic algorithm, applied to a dual-nozzle spray gun; including:

[0024] (1) obtaining the color of the target color block of the object to be sprayed, the position of the target color block of the object to be sprayed, and the distance between the center points of adjacent target color blocks;

[0025] (2) Based on the acquired data, the multi-color spraying path planning of the dual-nozzle spray gun based on the hybrid heuristic algorithm is described as a cluster traveling salesman problem; wherein the cluster traveling salesman problem includes: an objective function and constraints;

[0026] (3) When executing for the first time, the color combination probability is initialized; according to the color combination probability, the two clusters are combined into a set; the set is input into the greedy random adaptive search algorithm to solve the cluster traveling salesman problem and obtain an initial solution;

[0027] When it is not the first execution, the two clusters are combined into a set according to the color combination probability; the set is input into the greedy random adaptive search algorithm to solve the cluster traveling salesman problem and obtain an initial solution;

[0028] (4) Using a variable neighborhood search algorithm, optimize the initial solution to obtain an updated solution; update the color combination probability according to the distance cost function of the updated solution, and return to (3) until the optimal solution is obtained;

[0029] (5) A spraying sequence for different color blocks is obtained according to the optimal solution; and according to the spraying sequence, a dual-nozzle spray gun is controlled to spray the object to be sprayed.

[0030] In a fourth aspect, the present invention provides a multi-color spraying path planning system based on a hybrid heuristic algorithm;

[0031] A multi-color spray path planning system based on a hybrid heuristic algorithm for dual-nozzle spray guns; including:

[0032] The second acquisition module is configured to: acquire the color of the target color block of the object to be sprayed, the position of the target color block of the object to be sprayed, and the distance between the center points of adjacent target color blocks;

[0033] The second problem description module is configured to: describe the multi-color spraying path planning of the dual-nozzle spray gun based on the hybrid heuristic algorithm as a cluster traveling salesman problem according to the acquired data; wherein the cluster traveling salesman problem includes: an objective function and constraints;

[0034] The second problem solving module is configured to: initialize the color combination probability when it is executed for the first time; combine the two clusters into a set according to the color combination probability; input the set into a greedy random adaptive search algorithm to solve the cluster traveling salesman problem and obtain an initial solution;

[0035] When it is not the first execution, the two clusters are combined into a set according to the color combination probability; the set is input into the greedy random adaptive search algorithm to solve the cluster traveling salesman problem and obtain an initial solution;

[0036] The second updating module is configured to: optimize the initial solution using a variable neighborhood search algorithm to obtain an updated solution; update the color combination probability according to the distance cost function of the updated solution, and return to the second problem solving module until an optimal solution is obtained;

[0037] The second spraying module is configured to: obtain a spraying sequence for different color blocks according to an optimal solution; and control a double-nozzle spray gun to spray the object to be sprayed according to the spraying sequence.

[0038] Compared with the prior art, the present invention has the following beneficial effects:

[0039] The present invention proposes a hybrid heuristic algorithm, including the GRASP algorithm and the VNS algorithm, to solve the multi-color spray path planning based on the hybrid heuristic algorithm for a single nozzle spray gun. The GRASP algorithm finds the initial solution, and then the VNS algorithm uses a specific perturbation to search the neighborhood of the solution. The GRASP algorithm can not only generate a good initial solution, but also ensure the diversity of the initial solution. A new solution can be formed in each iteration to avoid loops.

[0040] The present invention proposes a new hybrid heuristic algorithm for obtaining the minimum path for the movement of the spray gun. The initial solution of the path is obtained by the color combination probability and GRASP. The neighborhood structure of the solution is continuously changed by four variable neighborhood search operators, and the color combination probability is updated according to the distance cost of the corresponding solution. Finally, the present invention conducts a large number of experiments in patterns of different sizes and sizes, and verifies the feasibility of multi-color spray path planning based on a single nozzle spray gun and a double nozzle spray gun based on a hybrid heuristic algorithm. At the same time, the double nozzle spray gun can shorten the spray gun movement distance compared with the single nozzle spray gun. BRIEF DESCRIPTION OF THE DRAWINGS

[0041] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0042] Figure 1 is a flow chart of the method of embodiment 1;

[0043] Figure 2 This is a flow chart of the method of Embodiment 3;

[0044] Figure 3 This is a multi-color spray effect picture;

[0045] Figure 4 This is a multi-color spray block marker diagram. DETAILED DESCRIPTION

[0046] It should be noted that the following detailed descriptions are exemplary and are intended to provide further explanation of the present invention. Unless otherwise specified, all technical and scientific terms used in the present invention have the same meanings as those commonly understood by those skilled in the art to which the present invention belongs.

[0047] It should be noted that the terms used herein are only for describing specific embodiments, and are not intended to limit exemplary embodiments according to the present invention. As used herein, unless the context clearly indicates otherwise, the singular form is also intended to include the plural form. In addition, it should be understood that the terms "include" and "have" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.

[0048] In the absence of conflict, the embodiments of the present invention and the features of the embodiments may be combined with each other.

[0049] In this embodiment, all data is obtained in compliance with laws and regulations and based on the user's consent, and is used legally.

[0050] Embodiment 1

[0051] This embodiment provides a multi-color spraying path planning method based on a hybrid heuristic algorithm;

[0052] like Figure 1 As shown, a multi-color spraying path planning method based on a hybrid heuristic algorithm is applied to a single nozzle spray gun; including:

[0053] S101: Acquire the color of the target color block of the object to be sprayed, the position of the target color block of the object to be sprayed, and the distance between the center points of adjacent target color blocks;

[0054] S102: describing the multi-color spraying path planning of a single nozzle spray gun based on a hybrid heuristic algorithm as a cluster traveling salesman problem according to the acquired data; wherein the cluster traveling salesman problem includes: an objective function and constraints;

[0055] S103: using a greedy random adaptive search algorithm to solve the cluster traveling salesman problem and obtain an initial solution;

[0056] S104: using a variable neighborhood search algorithm to update the initial solution and obtain an optimal solution;

[0057] S105: Obtaining a spraying sequence for different color blocks according to the optimal solution; and controlling a single nozzle spray gun to spray the object to be sprayed according to the spraying sequence.

[0058] S101~S105 correspond to Algorithm 1:

[0059] Input: Vertex cluster V = {V1, V2, ... V m}, maximum number of restarts maxext, maximum number of VNS iterations maxint and maximum number of restarts to obtain the optimal solution maxnoim;

[0060] Output: optimal solution S best ;

[0061] First, the initial solution S is generated by the GRASP algorithm initial (see S103), and S best and S current Initialized to S initial , the following variable domain search is performed, looping maxint times, by changing S current The sequence of clusters in the middle forms a new initial solution, and then forms a new initial solution by changing the neighborhood structure (see S104), and repeats maxnoim times. If S current The cost function is less than S best The cost function is updated as follows: best :Solve the current solution current As the optimal solution S best The above process is repeated maxext times.

[0062] The three most important parameters in Algorithm 1 are maxext, maxint, and maxnoim, which correspond to the maximum number of restarts, the number of VNS iterations, and the maximum number of restarts to obtain the optimal solution, respectively.

[0063] S initial represents the initial solution, S current represents the current solution, S best represents the optimal solution, and each solution must satisfy that all color blocks in each set must be visited continuously. The quality of the solution is evaluated by the objective function cost(S), that is, the total distance.

[0064] Furthermore, the objective function is to find a spraying sequence that can minimize the moving distance of a single nozzle spray gun.

[0065] Furthermore, the constraints include:

[0066] Constraint 1: Ensure that each color block is sprayed only once;

[0067] Constraint 2: Ensure that when spraying more than n-1 color blocks, there is no duplication of sprayed color blocks;

[0068] Constraint three: Ensure that the color blocks in each cluster are sprayed continuously.

[0069] The center point of each color block is regarded as a vertex, and all vertices are connected to each other using connecting edges. The criterion for dividing clusters is that all color blocks with the same color are regarded as one cluster according to the color of the color block.

[0070] Further, the S102: based on the acquired data, the multi-color spraying path planning of the single nozzle spray gun based on the hybrid heuristic algorithm is described as a cluster traveling salesman problem; wherein the cluster traveling salesman problem includes: an objective function and constraints; specifically includes:

[0071] Introduce decision variable x ij ∈{0,1}, used to indicate the order of spraying the color blocks, the spray gun starts from v i Move to v j When x ij =1, otherwise x ij = 0. Define the Cartesian coordinates of node i as (α i ,β i ), d ij Indicates color block v i And color block v j The distance cost between them.

[0072]

[0073]

[0074]

[0075]

[0076]

[0077] u i -u j +nx ij ≤n-1,2≤i≠j≤n; (6)

[0078] u i ≥0,2≤i≤n; (7)

[0079]

[0080] The objective function G is to minimize the distance cost;

[0081] Formula (3), formula (4) and formula (5) ensure that each color block is sprayed once;

[0082] Formula (6) and formula (7) ensure that more than (n-1) color blocks are sprayed, eliminating the situation where the sprayed color blocks are repeated;

[0083] Formula (8) ensures that the color blocks in each cluster must be sprayed continuously;

[0084] Where i, j represents the number of the i-th color block and the j-th color block, i, j∈{0,1,2,...,n}, i≠j, n represents the number of color blocks, and the Cartesian coordinates of node i are defined as (α i ,β i ), d ij Indicates color block v i And color block v j The distance cost between them, the objective function G is to minimize the distance cost; ij ∈{0,1} is the decision variable introduced to represent the spraying order of the color blocks. The spray gun starts from the i-th color block v i Move to the jth color block v j When x ij =1, otherwise x ij = 0, formula (6) and formula (7) use the MTZ method to eliminate the sub-loop, u i and u j It is a newly added variable and has no physical meaning. V in formula (8) k represents the kth cluster, |V k | represents the number of color blocks in the kth cluster.

[0085] Furthermore, the step S103: using a greedy random adaptive search algorithm to solve the cluster traveling salesman problem to obtain an initial solution specifically includes:

[0086] A two-stage initialization algorithm is used to randomly select v from the same cluster. l , v l+1 and v l+2 As part of the initial solution S, vertices are randomly selected in the RCL for minimum cost insertion;

[0087] S initial : the set of initial solutions; C candidate : A set of candidate vertices; v: vertex (the center of each color block);

[0088] v1 refers to the first vertex;

[0089] Input: cluster vertex set V;

[0090] Output: initial solution S initial ;

[0091] Randomly select v from the same cluster l , v l+1 and v l+2 As a partial initial solution S initial The vertices of the candidate set C under the initial conditions candidate Contains all vertices in the same cluster except v l , v l+1 and vl+2 , repeat the following steps until the candidate set C candidate For an empty set:

[0092] Find k distance vertex sequence S initial The nearest vertex is the candidate vertex set C candidate , for each candidate vertex v k Calculate the increased cost function c(v k ), where v k ∈C candidate , find the minimum increment c of the cost function among all candidate vertices min and the maximum increment c max , find all vertices among k vertices that satisfy the following two conditions: v k ∈C candidate And c(v k )≤c min +α×(c max -c min ), where α is a random number between 0 and 0.1. The found vertex is called RCL. A vertex v is randomly selected from RCL. k , added to the initial solution S initial ←S initial ∪{v k}, then update the candidate set (set v k Remove from the candidate set)C candidate ←C candidate \{v k}, ending the loop.

[0093] Initialize the vertices in other clusters in the same way, and finally return to the initial solution S initial is the ordering of the vertices in all clusters.

[0094] The quality of the initial solution directly affects the performance of the algorithm. A good initial solution is conducive to quickly searching for a satisfactory solution. GRASP can generate various initial solutions by changing α, which is a randomly generated number with a value of 0-0.1.

[0095] Furthermore, the step S104: using a variable neighborhood search algorithm to update the initial solution to obtain an optimal solution specifically includes:

[0096] Enter the current solution S current ;

[0097] Randomly select one of the four types of operations to generate a new neighborhood structure N = {N1, N2, N3, N4}, where N is the cost function of the newly generated neighborhood structure and the current solution S current Comparison of the cost function, if S currentIf the cost function of is greater than the cost function of N, the newly generated neighborhood structure N replaces the current solution and the above steps are repeated 4 times;

[0098] Output the new feasible current solution S current .

[0099] Furthermore, the four types of operations include:

[0100] The first operation is to convert the vertex v k Insertion into the best position of the same set, the optimal solution is determined by an exhaustive search of all possible insertions;

[0101] The second operation is to find the two vertices with the largest distance and divide the vertex sequence into two parts. Consider the forward and reverse order of the sequences of the two paths to obtain the minimum cost. For example, the original path sequence is 1-3-4-5-2-6-8-7. If the distance between 5 and 2 is the largest, the present invention divides the path sequence into 1-3-4-5 and 2-6-8-7. Reverse the first path and rearrange it to get 5-4-3-1-2-6-8-7; you can also reverse the second sequence to get 1-3-4-5-7-8-6-2; both sequences are reversed to 5-4-3-1-7-8-6-2, and the path sequence with the lowest cost is selected.

[0102] The third operation is to exchange two vertices in the same set (2-Swap).

[0103] The fourth operation is based on the 2-opt algorithm within the set.

[0104] Local search is done by searching the neighborhood structure S current ,Based on four types of operations during local search, four neighborhood structures N={N1,N2,N3,N4} can be generated.

[0105] Furthermore, the S104: adopting a variable neighborhood search algorithm to update the initial solution to obtain an optimal solution; changing the arrangement order of the clusters to form a new current solution; and improving the current solution and the optimal solution through local search.

[0106] The present invention uses the multi-color spraying path planning based on the hybrid heuristic algorithm as a generalization method of the traveling salesman problem (TSP). The spraying modes of single / double nozzle spray guns are respectively given. Firstly, the multi-color spraying path planning based on the hybrid heuristic algorithm of the single nozzle spray gun is described as a cluster traveling salesman problem (CTSP), and the greedy random adaptive search algorithm (GRASP) and the variable neighborhood search algorithm (VNS) are applied to solve the problem.

[0107] Multicolor spraying path planning based on hybrid heuristic algorithm becomes complicated due to the diversity of colors and patterns, and a suitable path planning algorithm is needed to effectively guide the spray gun to cover the spraying surface. Multicolor spraying not only requires full coverage of each color block, but also requires determining the spraying order of each color block. The algorithm proposed in this invention is used to determine the spraying order of each color block.

[0108] The present invention describes the mathematical model of single nozzle spray gun path planning by cluster traveling salesman problem (CTSP). However, CTSP is not ideal for dual nozzle spray guns, because the CTSP model can only be applied to all color blocks of one color sprayed at a time, while dual nozzle spray guns can alternately spray two color areas. Therefore, the present invention proposes a cluster traveling salesman problem (set-CTSP) to describe the multi-color spray path planning of dual nozzle spray guns based on a hybrid heuristic algorithm, and the present invention not only considers the number of color changes and path distance, but also considers color combinations.

[0109] Consider the following scenario: an industrial spray painting robot can cover a two-dimensional surface with a personalized pattern of different colors, which consists of several non-overlapping irregularly shaped color blocks. The present invention assumes that if the nozzle passes through the center of the color block, then the color block will be covered. The problem to be solved is that the spray gun must pass through the center of all color blocks without repetition.

[0110] The multi-color spraying path planning based on a hybrid heuristic algorithm for a single nozzle spray gun is described as follows. A single nozzle spray gun can only carry one color at a time. If a different color is needed, the present invention must refill the spray gun. At the same time, the present invention stipulates that the spray gun can change colors at any position. During the color change process, the spray gun needs to wash off the paint and replace it with a different color, which will cause a waste of paint on the one hand and take more time on the other hand. The present invention must not only consider the shortest path of the robot, but also the cost of color change.

[0111] In actual situations, the cost of color change is much greater than the path cost. Therefore, under the premise of meeting the minimum number of color changes, the shortest path of the nozzle is considered. In order to minimize the number of color changes, the color blocks of the same color are divided into several clusters, and all the color blocks of each cluster are sprayed continuously, which is similar to CTSP.

[0112] This problem can be represented by a graph G = (V, E), where V is the vertex set and E is the edge set. n} represents the center point of the color block. The present invention divides the vertex into multiple clusters V1, V2, ... V m E={(v i ,v j ):v i ,v j∈V,i≠j} represents the edge between color blocks i and j. n represents the number of color blocks, and m represents the number of colors. The goal of the problem G is to find a spraying sequence with the shortest distance.

[0113] Figure 3 and Figure 4 The multi-color pattern shown is an example of the CTSP problem. The pattern consists of four clusters (V1, V2, V3 and V4) and 14 vertices, where V1 = {1,3,6,10,13}, V2={2,5,9}, V3={4,7,12}, V4={8,11,14}.

[0114] Although the problem can be solved by the proposed Integer Linear Programming (ILP) formulation, it consumes a lot of computing resources and becomes more difficult to achieve when the problem size becomes larger.

[0115] The present invention proposes a hybrid heuristic algorithm, including the GRASP algorithm and the VNS algorithm, to solve the multi-color spray path planning based on the hybrid heuristic algorithm for a single nozzle spray gun. The GRASP algorithm finds the initial solution, and then the VNS algorithm uses a specific perturbation to search the neighborhood of the solution. The GRASP algorithm can not only generate a good initial solution, but also ensure the diversity of the initial solution. A new solution can be formed in each iteration to avoid loops.

[0116] VNS is a simple and effective meta-heuristic algorithm for combinatorial and global optimization problems. It explores solutions in the process of constantly changing the neighborhood search and updates the current solution until a better solution is found. It consists of two steps, namely perturbing the current solution and local improvement. The first step changes the order of clusters to form a new current solution, and the second step is to improve the current solution and the optimal solution through local search.

[0117] Embodiment 2

[0118] This embodiment provides a multi-color spraying path planning system based on a hybrid heuristic algorithm;

[0119] A multi-color spray path planning system based on a hybrid heuristic algorithm for single-nozzle spray guns; including:

[0120] A first acquisition module is configured to: acquire the color of the target color block of the object to be sprayed, the position of the target color block of the object to be sprayed, and the distance between the center points of adjacent target color blocks;

[0121] The first problem description module is configured to: describe the multi-color spraying path planning of a single nozzle spray gun based on a hybrid heuristic algorithm as a cluster traveling salesman problem according to the acquired data; wherein the cluster traveling salesman problem includes: an objective function and constraints;

[0122] The first problem solving module is configured to: solve the cluster traveling salesman problem using a greedy random adaptive search algorithm to obtain an initial solution;

[0123] A first updating module is configured to: use a variable neighborhood search algorithm to update the initial solution to obtain an optimal solution;

[0124] The first spraying module is configured to: obtain a spraying sequence for different color blocks according to an optimal solution; and control a single nozzle spray gun to spray an object according to the spraying sequence.

[0125] It should be noted that the first acquisition module, the first problem description module, the first problem solving module, the first update module and the first spraying module correspond to steps S101 to S105 in Embodiment 1, and the examples and application scenarios implemented by the modules and the corresponding steps are the same, but are not limited to the contents disclosed in Embodiment 1. It should be noted that the modules as part of the system can be executed in a computer system such as a set of computer executable instructions.

[0126] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0127] Embodiment 3

[0128] This embodiment provides a multi-color spraying path planning method based on a hybrid heuristic algorithm;

[0129] like Figure 2 As shown, a multi-color spraying path planning method based on a hybrid heuristic algorithm is applied to a dual-nozzle spray gun; comprising:

[0130] S301: Acquire the color of the target color block of the object to be sprayed, the position of the target color block of the object to be sprayed, and the distance between the center points of adjacent target color blocks;

[0131] S302: Based on the acquired data, describing the multi-color spraying path planning of the dual-nozzle spray gun based on the hybrid heuristic algorithm as a cluster traveling salesman problem; wherein the cluster traveling salesman problem includes: an objective function and constraints;

[0132] S303: When executing for the first time, initialize the color combination probability; combine the two clusters into a set according to the color combination probability; input the set into a greedy random adaptive search algorithm to solve the cluster traveling salesman problem and obtain an initial solution;

[0133] When it is not the first execution, the two clusters are combined into a set according to the color combination probability; the set is input into the greedy random adaptive search algorithm to solve the cluster traveling salesman problem and obtain an initial solution;

[0134] S304: Optimize the initial solution using a variable neighborhood search algorithm to obtain an updated solution; update the color combination probability according to the distance cost function of the updated solution, and return to S303 until the optimal solution is obtained;

[0135] S305: Obtaining a spraying sequence for different color blocks according to the optimal solution; and controlling the double-nozzle spray gun to spray the object to be sprayed according to the spraying sequence.

[0136] The specific process corresponding to S301 to S305 includes:

[0137] Input: Vertex cluster V = {V1, V2, ... V m}, maximum number of restarts maxext, maximum number of VNS iterations maxint and maximum number of restarts to obtain the optimal solution maxnoim;

[0138] Output: optimal solution S best ;

[0139] First, initialize the color combination probability Ψ={p1,…p M}, randomly select a combination from them, and according to the combination, cluster V={V1,V2,…V m} are combined into a set C = {C1, C2, ... C m / 2};

[0140] Generate the initial solution S through the GRASP algorithm initial (See S303), and S best and S current Initialize to S initial , the following variable domain search is performed, looping maxint times, by changing S current The sequence of clusters in the middle forms a new initial solution, and then forms a new initial solution by changing the neighborhood structure (see S304), and repeats maxnoim times. If S current The cost function is less than S best The cost function is updated as follows: best :Solve the current solution current As the optimal solution S best After the variable domain search is completed, the color combination probability Ψ={p1,…p M}(see formula 14); S initial represents the initial solution, S current represents the current solution, S best Indicates the optimal solution.

[0141] The entire process described above is repeated maxext times.

[0142] Further, S302: based on the acquired data, the multi-color spraying path planning of the dual-nozzle spray gun based on the hybrid heuristic algorithm is described as a cluster traveling salesman problem; wherein the cluster traveling salesman problem includes: an objective function and constraints; specifically includes:

[0143]

[0144]

[0145]

[0146]

[0147]

[0148] u i -u j +nx ij ≤n-1,2≤i≠j≤n; (6)

[0149] u i ≥0,2≤i≤n; (7)

[0150]

[0151]

[0152]

[0153]

[0154] y ab =y ba (12)

[0155] The objective function G is to minimize the spray distance cost of the dual-nozzle spray gun;

[0156] Formula (3), formula (4) and formula (5) ensure that each color block is sprayed once;

[0157] Formula (6) and formula (7) ensure that more than (n-1) color blocks are sprayed, eliminating the situation where the sprayed color blocks are repeated;

[0158] Formula (8) ensures that the color blocks in each cluster must be sprayed continuously;

[0159] Formula (9) ensures that the color blocks in the same set are sprayed continuously;

[0160] Formulas (10) to (12) ensure that two color blocks of the same color are combined.

[0161] The above problem is an NP-hard integer linear programming problem.

[0162] Decision variable y ab ∈{0,1} to represent the combination of colors. ab =1, V a and V b into a set, otherwise, y a b=0. Where V a represents the ath cluster, |V a | represents the number of color blocks in the ath cluster, V b represents the bth cluster, |V b | represents the number of color blocks in the bth cluster, m represents the number of clusters, and n represents the number of color blocks.

[0163] The present invention introduces the decision variable y ab ∈{0,1} to represent the combination of colors. ab =1, V a and V b into a set, otherwise, y ab =0.

[0164] Furthermore, the two clusters are combined into a set according to the color combination probability; the set is input into a greedy random adaptive search algorithm to solve the cluster traveling salesman problem to obtain an initial solution; specifically including:

[0165] First, initialize the color combination probability Ψ={p1,…p M}, randomly select a combination from them, and according to the combination, cluster V={V1,V2,…V m} are combined into a set C = {C1, C2, ... C m / 2}.

[0166] Randomly select v from the same set l , v l+1 and v l+2 As a partial initial solution S initial The vertices of the candidate set C under the initial conditions candidate Contains all vertices in the same set except v l , v l+1 and v l+2 , repeat the following steps until the candidate set C candidate For an empty set:

[0167] Find k distance vertex sequence S initial The nearest vertex is the candidate vertex set C candidate , for each candidate vertex v k Calculate the increased cost function c(v k ), where v k ∈Ccandidate , find the minimum increment c of the cost function among all candidate vertices min and the maximum increment c max , find all vertices among k vertices that satisfy the following two conditions: v k ∈C candidate And c(v k )≤c min +α×(c max -c min ), where α is a random number between 0 and 0.1. The found vertex is called RCL. A vertex v is randomly selected from RCL. k , added to the initial solution S initial ←S initial ∪{v k}, then update the candidate set (set v k Remove from the candidate set)C candidate ←C candidate \{v k}, ending the loop.

[0168] Use the same method to initialize the vertices in the other set, and finally return to the initial solution S initial is the ordering of all vertices in the set.

[0169] Further, S304: using a variable neighborhood search algorithm to optimize the initial solution to obtain an updated solution; updating the color probability combination according to the distance cost function of the updated solution; specifically includes:

[0170] Input: Current solution S current

[0171] Output: New feasible current solution S current

[0172] Randomly select one of the four types of operations to generate a new neighborhood structure N = {N1, N2, N3, N4}, where N is the cost function of the newly generated neighborhood structure and the current solution S current Comparison of the cost function, if S current If the cost function of is greater than the cost function of N, the newly generated neighborhood structure N replaces the current solution and the above steps are repeated 4 times.

[0173] The dual nozzle spray gun can fill two colors at the same time, and the present invention needs to determine which two colors should be selected as a set.

[0174] Further, according to the distance cost function of the updated solution, the color combination probability is updated; specifically including:

[0175] Assume that the color combination probability Ψ={p1,…p M} is M possible color combinations. Initially, p i Evenly distributed.

[0176]

[0177] Formula (13) is the initialization probability distribution; taking four colors as an example, p1 is the probability of the combination of V1 and V2, p2 is the probability of the combination of V1 and V3, and p3 is the probability of the combination of V1 and V4.

[0178] After each initial solution completes the variable domain search, p i The value will be recalculated. is the probability β = β i The average cost of the current solution is obtained as follows, after K iterations:

[0179]

[0180] in, Formula (14) updates the color combination probability according to the average distance cost of the corresponding solution.

[0181] The present invention defines the multi-color spraying path planning based on a hybrid heuristic algorithm for a dual-nozzle spray gun as a set-cluster traveling salesman problem (set-CTSP), which is similar to the CTSP and has an NP-hard property.

[0182] The present invention proposes a new hybrid heuristic algorithm for obtaining the minimum path for the movement of the spray gun. The initial solution of the path is obtained by the color combination probability and GRASP. The neighborhood structure of the solution is continuously changed by four variable neighborhood search operators, and the color combination probability is updated according to the distance cost of the corresponding solution. Finally, the present invention conducts a large number of experiments in patterns of different sizes and sizes, and verifies the feasibility of multi-color spray path planning based on a single nozzle spray gun and a double nozzle spray gun based on a hybrid heuristic algorithm. At the same time, the double nozzle spray gun can shorten the spray gun movement distance compared with the single nozzle spray gun.

[0183] The multi-color spraying path planning based on hybrid heuristic algorithm for dual-nozzle spray gun is described as set-cluster traveling salesman problem (Set-CTSP). The dual-nozzle spray gun can fill two colors at a time. Figure 4 In this case, if the spray gun is filled with orange and yellow paint, the cost of changing colors between vertex 1 and vertex 11 is negligible.

[0184] Based on the mathematical model of single nozzle spray gun spray path planning, the present invention proposes a color clustering method. Any two colors (clusters) can be combined into a set, and the color blocks in the same set can be arranged arbitrarily. This ensures that the color of the spray gun can only be changed after all the color blocks of two colors have been sprayed.

[0185] There are three combinations of four colors:

[0186] Combination method 1: C1={V1,V2}C2={V3,V4};

[0187] Combination method 2: C1 = {V1, V3} C2 = {V2, V4};

[0188] Combination method three: C1={V1,V4}C2={V2,V3}.

[0189] Set-CTSP keeps objective function (2) unchanged and adds constraints (9)-(12) on the basis of constraints (3)-(8). The goal of this problem is still to find the shortest path, and each set of vertices is visited consecutively.

[0190] The difference between the dual-nozzle multi-color spraying path planning based on the hybrid heuristic algorithm and the single-nozzle one is that the probability of color combination is introduced. First, the color combination probability is initialized. The probability of any color combination in the initial state is the same. According to the color combination probability, the two clusters are combined into a set as the input of the GRASP algorithm to generate the initial solution. Then the initial solution is optimized by VNS. Finally, the color combination probability is updated according to the distance cost function of the generated solution. The probability of color combination Ψ and the update function are described in detail in the color combination probability.

[0191] The present invention takes into account the problem of covering any pattern with a single / double nozzle spray gun, and aims at the minimum color change cost and spray gun path length. The project uses the CMA GR6150HW robot, which can be equipped with two spray guns. The paint supply pipeline and cleaning pipeline of each spray gun are independent. The color change of the spray robot is achieved through a color-changing valve group. The color-changing valve group is integrated by color-changing blocks, and the number of color-changing blocks can be increased or decreased according to on-site needs. Each color of paint is connected to the color-changing block through a separate paint supply pipeline. When changing colors, the robot cleans the circulation pipeline and the rotary cup; fills the pipeline and the rotary cup before spraying the next color.

[0192] In addition, for a robot with a dual-nozzle spray gun, path planning to cover this surface is more challenging. Compared with a single-nozzle spray gun, which can only carry one color, a dual-nozzle spray gun can carry two different colors. During the spraying process, the two colors can be sprayed alternately by simply switching the spray gun. On the one hand, it provides the possibility of optimizing the path; on the other hand, it increases the difficulty of the optimization algorithm. If it is not possible to comprehensively consider multiple factors to design the spraying optimization path, not only can the advantages of the dual-nozzle spray robot not be fully utilized, but it may also reduce the spraying efficiency and cause more paint waste.

[0193] Embodiment 4

[0194] This embodiment provides a multi-color spraying path planning system based on a hybrid heuristic algorithm;

[0195] A multi-color spray path planning system based on a hybrid heuristic algorithm for dual-nozzle spray guns; including:

[0196] The second acquisition module is configured to: acquire the color of the target color block of the object to be sprayed, the position of the target color block of the object to be sprayed, and the distance between the center points of adjacent target color blocks;

[0197] The second problem description module is configured to: describe the multi-color spraying path planning of the dual-nozzle spray gun based on the hybrid heuristic algorithm as a cluster traveling salesman problem according to the acquired data; wherein the cluster traveling salesman problem includes: an objective function and constraints;

[0198] The second problem solving module is configured to: initialize the color combination probability when it is executed for the first time; combine the two clusters into a set according to the color combination probability; input the set into a greedy random adaptive search algorithm to solve the cluster traveling salesman problem and obtain an initial solution;

[0199] When it is not the first execution, the two clusters are combined into a set according to the color combination probability; the set is input into the greedy random adaptive search algorithm to solve the cluster traveling salesman problem and obtain an initial solution;

[0200] The second updating module is configured to: optimize the initial solution using a variable neighborhood search algorithm to obtain an updated solution; update the color combination probability according to the distance cost function of the updated solution, and return to the second problem solving module until an optimal solution is obtained;

[0201] The second spraying module is configured to: obtain a spraying sequence for different color blocks according to an optimal solution; and control a double-nozzle spray gun to spray the object to be sprayed according to the spraying sequence.

[0202] It should be noted that the second acquisition module, the second problem description module, the second problem solving module, the second update module and the second spraying module correspond to steps S301 to S305 in Embodiment 1, and the examples and application scenarios implemented by the modules are the same as those of the corresponding steps, but are not limited to the contents disclosed in Embodiment 1. It should be noted that the modules as part of the system can be executed in a computer system such as a set of computer executable instructions.

[0203] The description of each embodiment in the above embodiments has different emphases. For parts not described in detail in a certain embodiment, reference can be made to the relevant descriptions of other embodiments.

[0204] The above description is only a preferred embodiment of the present invention and is not intended to limit the present invention. For those skilled in the art, the present invention may have various modifications and variations. Any modification, equivalent replacement, improvement, etc. made within the spirit and principle of the present invention shall be included in the protection scope of the present invention.

Claims

1. A multi-color spraying path planning method based on a hybrid heuristic algorithm, characterized in that: For use with single nozzle spray guns; includes: Obtain the color of the target color block of the object to be sprayed, the position of the target color block of the object to be sprayed, and the distance between the center points of adjacent target color blocks; According to the acquired data, the multi-color spraying path planning of a single nozzle spray gun based on a hybrid heuristic algorithm is described as a cluster traveling salesman problem; wherein the cluster traveling salesman problem includes: an objective function and constraints; A greedy random adaptive search algorithm is used to solve the cluster traveling salesman problem to obtain an initial solution; the greedy random adaptive search algorithm is used to solve the cluster traveling salesman problem to obtain an initial solution, specifically including: A two-stage initialization algorithm is used to randomly select v from the same cluster. l , v l+1 and v l+2 As part of the initial solution S, vertices are randomly selected in the RCL for minimum cost insertion; Randomly select the first vertex v from the same cluster l , the l+1th vertex v l+1 and the l+2th vertex v l+2 As a partial initial solution S initial The vertices of the candidate set C under the initial conditions candidate Contains all vertices in the same cluster except v l , v l+1 and v l+2 , repeat the following steps until the candidate set C candidate For an empty set: Find k distance vertex sequence S initial The nearest vertex is the candidate vertex set C candidate , for each candidate vertex v k Calculate the increased cost function c(v k ), where v k ∈C candidate , find the minimum increment c of the cost function among all candidate vertices min and the maximum increment c max , find all vertices among k vertices that satisfy the following two conditions: v k ∈C candidate And c(v k )≤c min +α×(c max -c min ), where α is a random number between 0 and 0.

1. The found vertex is called RCL. A vertex v is randomly selected from RCL. k , added to the initial solution S initial ←S initial ∪{v k }, then update the candidate set, v k Delete from the candidate set and end the loop; Initialize the vertices in other clusters in the same way, and finally return to the initial solution S initial is the ordering of the vertices in all clusters; Adopt variable neighborhood search algorithm to update the initial solution and obtain the optimal solution; The spraying order of different color blocks is obtained according to the optimal solution; and according to the spraying order, the single nozzle spray gun is controlled to spray the object to be sprayed.

2. The multi-color spraying path planning method based on a hybrid heuristic algorithm as claimed in claim 1, characterized in that: The objective function is to find a spraying sequence that can minimize the moving distance of a single nozzle spray gun; The constraints include: Constraint 1: Ensure that each color block is sprayed only once; Constraint 2: Ensure that when spraying more than n-1 color blocks, there is no duplication of sprayed color blocks; Constraint three: Ensure that the color blocks in each cluster are sprayed continuously.

3. The multi-color spraying path planning method based on a hybrid heuristic algorithm as claimed in claim 1, characterized in that: The variable neighborhood search algorithm is used to update the initial solution to obtain the optimal solution; specifically, it includes: Enter the current solution S current ; Randomly select one of the four types of operations to generate a new neighborhood structure N = {N 1, N 2, N 3, N4}, where N is the cost function of the newly generated neighborhood structure and the current solution S current Comparison of the cost function, if S current If the cost function of is greater than the cost function of N, the newly generated neighborhood structure N replaces the current solution and the above steps are repeated 4 times; Output the new feasible current solution S current .

4. A multi-color spraying path planning system based on a hybrid heuristic algorithm using the multi-color spraying path planning method based on a hybrid heuristic algorithm as claimed in claim 1, characterized in that: For use with single nozzle spray guns; includes: A first acquisition module is configured to: acquire the color of the target color block of the object to be sprayed, the position of the target color block of the object to be sprayed, and the distance between the center points of adjacent target color blocks; The first problem description module is configured to: describe the multi-color spraying path planning of a single nozzle spray gun based on a hybrid heuristic algorithm as a cluster traveling salesman problem according to the acquired data; wherein the cluster traveling salesman problem includes: an objective function and constraints; The first problem solving module is configured to: solve the cluster traveling salesman problem using a greedy random adaptive search algorithm to obtain an initial solution; A first updating module is configured to: use a variable neighborhood search algorithm to update the initial solution to obtain an optimal solution; The first spraying module is configured to: obtain a spraying sequence for different color blocks according to an optimal solution; and control a single nozzle spray gun to spray an object according to the spraying sequence.

5. A multi-color spraying path planning method based on a hybrid heuristic algorithm, characterized in that: For use with dual nozzle spray guns; includes: (1) obtaining the color of the target color block of the object to be sprayed, the position of the target color block of the object to be sprayed, and the distance between the center points of adjacent target color blocks; (2) Based on the acquired data, the multi-color spraying path planning of the dual-nozzle spray gun based on the hybrid heuristic algorithm is described as a cluster traveling salesman problem; wherein the cluster traveling salesman problem includes: an objective function and constraints; (3) When executing for the first time, the color combination probability is initialized; according to the color combination probability, the two clusters are combined into a set; the set is input into the greedy random adaptive search algorithm to solve the cluster traveling salesman problem and obtain an initial solution; When it is not the first execution, the two clusters are combined into a set according to the color combination probability; the set is input into the greedy random adaptive search algorithm to solve the cluster traveling salesman problem and obtain an initial solution; The two clusters are combined into a set according to the color combination probability; the set is input into the greedy random adaptive search algorithm to solve the cluster traveling salesman problem to obtain an initial solution, which specifically includes: First, initialize the color combination probability Ψ={p1,…p M }, randomly select a combination from them, and according to the combination, cluster V={V1,V2,…V m } are combined into a set C = {C1, C2, ... C m / 2 }; Randomly select v from the same set l , v l+1 and v l+2 As a partial initial solution S initial The vertices of the candidate set C under the initial conditions candidate Contains all vertices in the same set except v l , v l+1 and v l+2 , repeat the following steps until the candidate set C candidate For an empty set: Find k distance vertex sequence S initial The nearest vertex is the candidate vertex set C candidate , for each candidate vertex v k Calculate the increased cost function c(v k ), where v k ∈C candidate , find the minimum increment c of the cost function among all candidate vertices min and the maximum increment c max , find all vertices among k vertices that satisfy the following two conditions: v k ∈C candidate And c(v k )≤c min +α×(c max -c min ), where α is a random number between 0 and 0.

1. The found vertex is called RCL. A vertex v is randomly selected from RCL. k , added to the initial solution S initial ←S initial ∪{v k }, then update the candidate set, v k Delete from the candidate set and end the loop; Use the same method to initialize the vertices in the other set, and finally return to the initial solution S initial is the ordering of all vertices in the set; (4) Using a variable neighborhood search algorithm, optimize the initial solution to obtain an updated solution; update the color combination probability according to the distance cost function of the updated solution, and return to (3) until the optimal solution is obtained; (5) A spraying sequence for different color blocks is obtained according to the optimal solution; and according to the spraying sequence, a dual-nozzle spray gun is controlled to spray the object to be sprayed.

6. The multi-color spraying path planning method based on a hybrid heuristic algorithm as claimed in claim 5, characterized in that: The objective function G is to minimize the spray distance cost of the dual-nozzle spray gun; The constraints are: Make sure each color block is sprayed once; Ensure that more than n-1 color blocks are sprayed to eliminate the duplication of sprayed color blocks; Ensure that the color blocks in each cluster must be sprayed continuously; Ensure that the color blocks in the same set are sprayed continuously; Ensure that two blocks of the same color are combined.

7. The multi-color spraying path planning method based on a hybrid heuristic algorithm as claimed in claim 5, characterized in that: The variable neighborhood search algorithm is used to optimize the initial solution to obtain an updated solution; the color combination probability is updated according to the distance cost function of the updated solution; specifically, it includes: Input: Current solution S curren t; Output: New feasible current solution S current ; Randomly select one of the four types of operations to generate a new neighborhood structure N = {N1, N2, N 3, N4}, where N is the cost function of the newly generated neighborhood structure and the current solution S current Comparison of the cost function, if S current If the cost function of is greater than the cost function of N, the newly generated neighborhood structure N replaces the current solution and the above steps are repeated 4 times; According to the distance cost function of the updated solution, the color combination probability is updated; specifically, it includes: Assume that the color combination probability Ψ={p1,...p M } is M possible color combinations. Initially, p i Even distribution; Formula (13) is the initialization probability distribution; taking four colors as an example, p1 is the probability of the combination of V1 and V2, p2 is the probability of the combination of V1 and V3, and p3 is the probability of the combination of V1 and V4; After each initial solution completes the variable domain search, p i The value of will be recalculated; is the probability β = β i The average cost of the current solution is obtained as follows, after K iterations: in, Formula (14) updates the color combination probability according to the average distance cost of the corresponding solution.

8. A multi-color spraying path planning system based on a hybrid heuristic algorithm using the multi-color spraying path planning method based on a hybrid heuristic algorithm as claimed in claim 5, characterized in that: For use with dual nozzle spray guns; includes: The second acquisition module is configured to: acquire the color of the target color block of the object to be sprayed, the position of the target color block of the object to be sprayed, and the distance between the center points of adjacent target color blocks; The second problem description module is configured to: describe the multi-color spraying path planning of the dual-nozzle spray gun based on the hybrid heuristic algorithm as a cluster traveling salesman problem according to the acquired data; wherein the cluster traveling salesman problem includes: an objective function and constraints; The second problem solving module is configured to: initialize the color combination probability when it is executed for the first time; combine the two clusters into a set according to the color combination probability; input the set into a greedy random adaptive search algorithm to solve the cluster traveling salesman problem and obtain an initial solution; When it is not the first execution, the two clusters are combined into a set according to the color combination probability; the set is input into the greedy random adaptive search algorithm to solve the cluster traveling salesman problem and obtain an initial solution; The second updating module is configured to: optimize the initial solution using a variable neighborhood search algorithm to obtain an updated solution; update the color combination probability according to the distance cost function of the updated solution, and return to the second problem solving module until an optimal solution is obtained; The second spraying module is configured to: obtain a spraying sequence for different color blocks according to an optimal solution; and control a double-nozzle spray gun to spray the object to be sprayed according to the spraying sequence.