Hole group machining path optimization method

By introducing simulated annealing algorithm and 3-opt algorithm in the genetic algorithm, the problem of local optimal solution in the optimization of hole group processing path is solved, and more efficient hole group processing path optimization is achieved, and shorter empty stroke paths and more Low processing time.

CN119247767APending Publication Date: 2025-01-03WUHAN UNIV OF TECH
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411250274.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-09-06
Publication Date
2025-01-03

AI Technical Summary

Technical Problem

In the optimization of hole group processing path, genetic algorithms are prone to fall into local optimal solutions, resulting in poor solution quality, especially when the number of hole groups increases, it is difficult to find the global optimal solution.

Method used

A simulated annealing algorithm is introduced, combined with genetic algorithms, and the hole group processing path is optimized by simulating local searches and random factors during the annealing process, and the path iteration is used to ensure that the optimal solution is found in the global scope.

Benefits of technology

It effectively improves the solution quality of hole group processing path optimization problems, obtains shorter empty travel paths and lower total processing time, which is significantly better than the use of genetic algorithms or simulated annealing algorithms alone.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119247767A_ABST
    Figure CN119247767A_ABST
Patent Text Reader

Abstract

The invention relates to a hole group processing path optimization method, and belongs to the technical field of hole group processing, and the method comprises the steps: S101, obtaining an initial population, the genes of individuals in the population comprising a hole group processing path, a genetic parameter and a simulated annealing parameter; s102, based on the genetic parameters of the initial population, performing selection, crossover and mutation operation on the simulated annealing parameters of the initial population to obtain an intermediate population; s103, based on the simulated annealing parameters of the intermediate population, performing simulated annealing operation on the hole group processing path of the intermediate population to obtain a target population; and step S104, substituting the target population as a new initial population into the step S102 until the genetic parameters of the target population meet a termination condition, and obtaining an optimal hole group machining path. By combining the advantages of the genetic algorithm and the simulated annealing algorithm, the solution quality of the hole group processing path optimization problem is effectively improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present application relates to the technical field of hole group processing, and in particular to a hole group processing path optimization method. Background Art

[0002] The path planning problem of hole group processing refers to the need to optimize multiple target problems such as tool retraction, tool change times, tool path length, etc. during the processing process in order to obtain better processing accuracy and efficiency and save costs when performing CNC processing on multiple parts on a workpiece. Among them, the processing path of the part pattern is mainly determined by the processing technology and tool path strategy. Therefore, the path planning problem of hole group processing is only regarded as the optimization problem of the idle travel path length of the tool during the processing process, that is, it is converted into a single-objective optimization problem for solution, and the shortest tool travel solution is found during the hole group processing process to improve the processing efficiency.

[0003] Most current research uses the generalized traveling salesman problem (GTSP) to solve the empty trip path optimization problem, and there is a "combinatorial explosion" in the solution space. This problem can be solved exactly in mathematics, but for large-scale nodes, this solution is very time-consuming. Therefore, in order to solve practical problems in engineering, some approximate solutions are often found to meet the actual needs of the engineering. Among them, genetic algorithms are widely used and have achieved certain results.

[0004] However, in the hole group machining path optimization problem, as the number of hole groups on the workpiece increases, the search space of TSP also increases rapidly. The genetic algorithm has poor local search ability and is prone to fall into the local optimal solution, resulting in poor solution quality. Summary of the invention

[0005] In view of this, it is necessary to provide a hole group processing path optimization method to solve the problem in the prior art that the genetic algorithm is prone to fall into the local optimal solution in the hole group processing path optimization problem, resulting in poor solution quality.

[0006] In order to solve the above problems, the present application provides a hole group processing path optimization method, comprising: Step S101, obtaining an initial population, wherein the genes of individuals in the population include hole group processing paths, genetic parameters and simulated annealing parameters; Step S102: Based on the genetic parameters of the initial population, performing selection, crossover and mutation operations on the simulated annealing parameters of the initial population to obtain an intermediate population; Step S103, based on the simulated annealing parameters of the intermediate population, performing a simulated annealing operation on the hole group processing path of the intermediate population to obtain a target population; Step S104, substituting the target population as a new initial population into S102, until the genetic parameters of the target population meet the termination condition, and obtaining the optimal hole group processing path.

[0007] In some possible implementations, obtaining an initial population includes: Obtain the initial hole group processing path; Performing simulated annealing operation on the initial hole group processing path, retaining the optimal target hole group processing path after each cooling; Based on the target hole group processing path and its corresponding simulated annealing parameters and genetic parameters, an initial population is determined.

[0008] In some possible implementations, the genetic parameters include a fitness value and a selection operator, and the selection operator is determined by a roulette wheel method.

[0009] In some possible implementations, the genetic parameters include a fitness value, a crossover operator, and a mutation operator, and the crossover operator and the mutation operator are both determined by the fitness value.

[0010] In some possible implementations, the crossover operator is:

[0011] In the formula, represents the crossover probability, represents the maximum fitness value in the population, represents the average fitness value of the population, Indicates the larger fitness value of the two individuals crossed, and represents a constant; The mutation operator is:

[0012] In the formula, represents the probability of mutation, Indicates the fitness value of the individual to be mutated. and Represents a constant.

[0013] In some possible implementations, the simulated annealing parameters include energy value, initial temperature, termination temperature, cooling coefficient and number of temperature iterations. When the simulated annealing parameters of the initial population are mutated, one of the simulated annealing parameters is changed each time.

[0014] In some possible implementations, based on the simulated annealing parameters of the intermediate population, a simulated annealing operation is performed on the hole group processing path of the intermediate population to obtain a target population, including: Step S301, at the initial temperature, iterating the hole group processing path of the intermediate population based on the Metropolis criterion until the temperature iteration number is reached, and obtaining the optimal hole group processing path at the temperature; Step S302, based on the initial temperature and the deheating coefficient, obtain the target temperature, substitute the target temperature as the new initial temperature into S301, until the initial temperature reaches the termination temperature, obtain the optimal hole group processing path at the termination temperature, and determine the target population based on the optimal hole group processing path at the termination temperature.

[0015] In some possible implementations, the acceptance probability of the new hole cluster processing path in the Metropolis criterion is for:

[0016] In the formula, Indicates the energy value of the current hole group processing path. Represents the energy value of the new hole group processing path, Indicates the current temperature.

[0017] In some possible implementations, when the hole group processing path of the intermediate population is iterated based on the Metropolis criterion, the opt algorithm is used to generate a new hole group processing path.

[0018] In some possible implementations, the opt algorithm is a 3-opt algorithm.

[0019] The beneficial effects of the present application are as follows: the hole group processing path optimization method provided by the present application introduces a simulated annealing algorithm into the genetic algorithm, performs local search during the annealing process, and introduces random factors into the local search process, which is conducive to obtaining the optimal solution in the global range, and fully combines the advantages of the genetic algorithm and the simulated annealing algorithm, and effectively improves the solution quality of the hole group processing path optimization problem. BRIEF DESCRIPTION OF THE DRAWINGS

[0020] Figure 1 A schematic flow chart of an embodiment of the hole group machining path optimization method provided in the present application; Figure 2 For this application Figure 1 A schematic flow chart of an embodiment of step S101; Figure 3 For this application Figure 1 A schematic flow chart of an embodiment of step S103; Figure 4 DXF model diagram provided for this application; Figure 5This is a schematic diagram of the optimization results of each algorithm provided in this application. DETAILED DESCRIPTION

[0021] The technical solutions in the embodiments of the present application will be described clearly and completely below in conjunction with the drawings in the embodiments of the present application. Obviously, the described embodiments are only part of the embodiments of the present application, rather than all of the embodiments. Based on the embodiments in the present application, all other embodiments obtained by those skilled in the art without creative work are within the scope of protection of the present application.

[0022] It should be understood that the schematic drawings are not drawn to scale. The flowcharts used in this application illustrate operations implemented according to some embodiments of the present application. It should be understood that the operations of the flowcharts may be implemented out of order, and steps without logical contextual relationships may be reversed in order or implemented simultaneously. In addition, those skilled in the art may add one or more other operations to the flowcharts, or may remove one or more operations from the flowcharts, under the guidance of the content of this application. Some of the block diagrams shown in the accompanying drawings are functional entities, and do not necessarily correspond to physically or logically independent entities. These functional entities may be implemented in software form, or implemented in one or more hardware modules or integrated circuits, or implemented in different networks and / or processor systems and / or microcontroller systems.

[0023] The descriptions of "first", "second", etc. involved in the embodiments of the present application are only used to describe the implicit purpose, and cannot be understood as indicating or implying their relative importance or implicitly indicating the number of the indicated technical features. Therefore, the technical features defined as "first" and "second" may explicitly or implicitly include at least one of the features. "And / or" describes the association relationship of the associated objects, indicating that three relationships may exist, for example: A and / or B, which can represent: A exists alone, A and B exist at the same time, and B exists alone.

[0024] Reference to "embodiments" herein means that a particular feature, structure, or characteristic described in conjunction with the embodiments may be included in at least one embodiment of the present application. The appearance of the phrase in various locations in the specification does not necessarily refer to the same embodiment, nor is it an independent or alternative embodiment that is mutually exclusive with other embodiments. It is explicitly and implicitly understood by those skilled in the art that the embodiments described herein may be combined with other embodiments.

[0025] The present application provides a method for optimizing hole group processing paths, which is described below.

[0026] Figure 1 A schematic diagram of an embodiment of the hole group processing path optimization method provided in this application is shown in FIG. Figure 1As shown in the figure, the hole group machining path optimization method includes: S101, obtaining an initial population, wherein the genes of individuals in the population include hole group processing paths, genetic parameters and simulated annealing parameters; It should be noted that the optimization goal of the hole group processing path is to make the hole group processing path shortest, and the objective function value Machining paths for hole groups The length of the individual is that the genetic operation and simulated annealing operation are required, so the individual's gene also includes genetic parameters and simulated annealing parameter information. The gene is encoded in real number encoding. Among them, the genetic parameters include the number of iterations, fitness value, selection operator, crossover operator and mutation operator. The genetic algorithm is used to maximize. In the example, the fitness value is set and the objective function value Inversely proportional: ; The simulated annealing parameters include energy value, initial temperature, end temperature, cooling coefficient and number of temperature iterations. The simulated annealing algorithm is used to seek the minimum. In the example, the energy value is set as the objective function value.

[0027] S102, based on the genetic parameters of the initial population, performing selection, crossover and mutation operations on the simulated annealing parameters of the initial population to obtain an intermediate population; It should be noted that the simulated annealing parameter gene blocks in the two parent individuals are exchanged by single-point crossover. The mutation operation can retain the excellent genes of the parents while increasing the population diversity. In the mutation operation, one parameter of the simulated annealing parameters is changed each time.

[0028] S103, based on the simulated annealing parameters of the intermediate population, performing a simulated annealing operation on the hole group processing path of the intermediate population to obtain a target population; It should be noted that by performing a simulated annealing operation on the hole group processing path of the intermediate population, while updating the hole group processing path, the genetic parameters will also be updated according to the updated hole group processing path, thereby obtaining the target population.

[0029] S104, substituting the target population as a new initial population into S102, until the genetic parameters of the target population meet the termination condition, and obtaining the optimal hole group processing path.

[0030] It should be noted that the genetic parameters used here are the number of iterations and the fitness value, and the termination condition is that the number of iterations is greater than the maximum number of iterations and the fitness value reaches convergence.

[0031] Compared with the prior art, the present application introduces a simulated annealing algorithm into the genetic algorithm, performs local search during the annealing process, and introduces random factors into the local search process, which is conducive to obtaining the optimal solution in the global range. It fully combines the advantages of the genetic algorithm and the simulated annealing algorithm, and effectively improves the solution quality of the hole group processing path optimization problem.

[0032] In order to obtain a better initial population, in some embodiments, such as Figure 2 As shown, step S101 includes: S201, obtaining an initial hole group processing path; It should be noted that the initial hole group processing path is obtained by inputting a set of point sets TSP of a group of hole groups.

[0033] S202, performing a simulated annealing operation on the initial hole group processing path, and retaining the optimal target hole group processing path after each cooling; It should be noted that the specific process is: setting the initial temperature, the end temperature and the cooling coefficient to perform the cooling operation, and recording the optimal value after each cooling as the target hole group processing path.

[0034] S203, determining the initial population based on the target hole group processing path and its corresponding simulated annealing parameters and genetic parameters.

[0035] In order to better perform the selection operation of the genetic algorithm, in some embodiments, the selection operator is determined by a roulette wheel method, and the specific process is as follows: 1) Use the formula Calculate the number of The probability of an individual being selected is, where Indicates the population The probability of an individual being selected is Indicates the population The fitness value of each individual, Represents the total fitness value of all individuals in the population; 2) Let the cumulative probability of the first individual in the population be for , and then use the formula Calculate the remaining individual cumulative probabilities; 3) In Pick a random number from ,like , then select individuals, repeat the operation to obtain another parent individual.

[0036] In order to facilitate the retention of dominant individuals and better perform crossover and mutation operations, in some embodiments, individuals with fitness values ​​higher than the average fitness value of the population are given lower crossover probability and mutation probability, otherwise they are given higher crossover probability and mutation probability. Specifically, the crossover operator is:

[0037] In the formula, represents the crossover probability, represents the maximum fitness value in the population, represents the average fitness value of the population, Indicates the larger fitness value of the two individuals crossed, and represents a constant; The mutation operator is:

[0038] In the formula, represents the probability of mutation, Indicates the fitness value of the individual to be mutated. and Represents a constant.

[0039] In order to obtain a better individual, the generated new individual is subjected to a simulated annealing operation. In some embodiments, Figure 3 As shown, step S103 specifically includes: S301, at the initial temperature, iterating the hole group processing path of the intermediate population based on the Metropolis criterion until the temperature iteration number is reached, and obtaining the optimal hole group processing path at the temperature; S302. Based on the initial temperature and the cooling coefficient, the target temperature is obtained, and the target temperature is substituted into S301 as the new initial temperature until the initial temperature reaches the termination temperature, and the optimal hole group processing path at the termination temperature is obtained. The target population is determined based on the optimal hole group processing path at the termination temperature.

[0040] Furthermore, in order to improve the solution efficiency of the algorithm, in some embodiments, when the hole group processing path of the intermediate population is iterated based on the Metropolis criterion, the 3-opt algorithm is introduced to perform local search and update of the individual hole group processing path. The 3-opt algorithm is more efficient in neighborhood search. Specifically, three numbers are randomly generated within the population number range to represent three points in the hole group processing path and the three points are guaranteed to be non-adjacent. Then, the 3-opt algorithm is used to search for the points adjacent to the three points in the hole group processing path to obtain a new individual. If the fitness value of the new individual is better, the new individual is used as the next generation. Otherwise, the new individual is accepted according to the Metropolis criterion. The acceptance probability of the new hole group processing path in the Metropolis criterion is for:

[0041] In the formula, Indicates the energy value of the current hole group processing path. Represents the energy value of the new hole group processing path, Indicates the current temperature.

[0042] It should be noted that the initial value of the tolerance for receiving differential solution is set to 1.

[0043] In other embodiments, other opt algorithms such as Or-opt may also be used.

[0044] In summary, this application fully combines the advantages of Genetic Algorithm (GA), Simulated Annealing (SA), and 3-opt algorithm to construct a heuristic genetic simulated annealing 3-opt algorithm (GASA3-opt), which greatly improves the efficiency of the algorithm.

[0045] In order to verify the efficiency of the heuristic genetic simulated annealing 3-opt algorithm of this application, Figure 4 Taking the DXF model shown in the figure as an example, GA, SA, 3opt and GASA3-opt algorithms are used to optimize the idle stroke path of the hole group when the engraving machine processes the foam workpiece, and then the processing experiment is carried out according to the optimization results.

[0046] like Figure 4 As shown in the figure, the DXF model contains a part pattern of 36 circular holes, in which the outermost rectangle represents the reference range for processing. The center point of the lower edge of the rectangle is used as the processing origin, the starting point and the end point are marked as 1, and the part number range is marked from 2 to 37, as shown in Table 1: Table 1: Part pattern locations in the DXF model

[0047] When the processing starting points are located at the center point and four corners of the rectangular frame, GA, SA, 3opt and GASA3-opt algorithms are used to optimize the path. The optimization results are shown in Table 2: Table 2: Optimization results of each algorithm at different starting points of DXF model

[0048] When the machining starting point is located at the origin of the workpiece coordinate system during machining, the optimization results of each algorithm are as follows: Figure 5 shown.

[0049] Table 2 and Figure 5The path optimization results of the DXF model shown in the figure show that when hole groups are processed from different starting points, the GASA3-opt algorithm proposed in this application has better solution quality and a shorter idle stroke processing path than the other three algorithms; among them, when the starting point is located at the origin of the workpiece coordinate system, the result of GASA3-opt is 2.3823% better than the genetic algorithm, 0.1582% better than the simulated annealing algorithm, and 1.2489% better than the 3-opt algorithm.

[0050] The machining experiment was carried out in the order optimized by the above algorithm. During the machining process, the cutting feed speed was 800 mm / min, the air cutting feed speed was 1000 mm / min, and the machining time was shown in Table 3: Table 3: Comparison of DXF model processing time corresponding to different algorithms

[0051] It can be seen from Table 3 that the GASA3-opt algorithm proposed in this application makes the idle travel path of hole group processing shorter, the total processing time is the lowest, and the effect is the best in path optimization.

[0052] The above is a detailed introduction to a hole group processing path optimization method provided by the present application. Specific examples are used in this article to illustrate the principles and implementation methods of the present application. The description of the above embodiments is only used to help understand the method of the present application and its core idea; at the same time, for technical personnel in this field, according to the idea of ​​the present application, there will be changes in the specific implementation method and application scope. In summary, the content of this specification should not be understood as a limitation on the present application.

[0053] The above is only a preferred specific implementation of the present application, but the protection scope of the present application is not limited thereto. Any changes or substitutions that can be easily conceived by any technician familiar with the technical field within the technical scope disclosed in the present application should be covered within the protection scope of the present application.

Claims

1. A hole group processing path optimization method, characterized in that: include: Step S101, obtaining an initial population, wherein the genes of individuals in the population include hole group processing paths, genetic parameters and simulated annealing parameters; Step S102: Based on the genetic parameters of the initial population, performing selection, crossover and mutation operations on the simulated annealing parameters of the initial population to obtain an intermediate population; Step S103, based on the simulated annealing parameters of the intermediate population, performing a simulated annealing operation on the hole group processing path of the intermediate population to obtain a target population; Step S104, substituting the target population as a new initial population into S102, until the genetic parameters of the target population meet the termination condition, and obtaining the optimal hole group processing path.

2. The hole group machining path optimization method according to claim 1, characterized in that: Get the initial population, including: Obtain the initial hole group processing path; Performing simulated annealing operation on the initial hole group processing path, retaining the optimal target hole group processing path after each cooling; Based on the target hole group processing path and its corresponding simulated annealing parameters and genetic parameters, an initial population is determined.

3. The hole group machining path optimization method according to claim 1, characterized in that: The genetic parameters include a fitness value and a selection operator, and the selection operator is determined by a roulette wheel method.

4. The hole group machining path optimization method according to claim 1, characterized in that: The genetic parameters include a fitness value, a crossover operator and a mutation operator, and both the crossover operator and the mutation operator are determined by the fitness value.

5. The hole group machining path optimization method according to claim 4, characterized in that: The crossover operator is: In the formula, represents the crossover probability, represents the maximum fitness value in the population, represents the average fitness value of the population, Indicates the larger fitness value of the two individuals crossed, and represents a constant; The mutation operator is: In the formula, represents the probability of mutation, Indicates the fitness value of the individual to be mutated. and Represents a constant.

6. The hole group machining path optimization method according to claim 1, characterized in that: The simulated annealing parameters include energy value, initial temperature, termination temperature, cooling coefficient and temperature iteration times. When the simulated annealing parameters of the initial population are mutated, one of the simulated annealing parameters is changed each time.

7. The hole group machining path optimization method according to claim 6, characterized in that: Based on the simulated annealing parameters of the intermediate population, a simulated annealing operation is performed on the hole group processing path of the intermediate population to obtain a target population, including: Step S301, at the initial temperature, iterating the hole group processing path of the intermediate population based on the Metropolis criterion until the temperature iteration number is reached, and obtaining the optimal hole group processing path at the temperature; Step S302, based on the initial temperature and the deheating coefficient, obtain the target temperature, substitute the target temperature as the new initial temperature into S301, until the initial temperature reaches the termination temperature, obtain the optimal hole group processing path at the termination temperature, and determine the target population based on the optimal hole group processing path at the termination temperature.

8. The hole group machining path optimization method according to claim 7, characterized in that: Acceptance probability of new hole cluster machining paths in the Metropolis criterion for: In the formula, Indicates the energy value of the current hole group processing path. Represents the energy value of the new hole group processing path, Indicates the current temperature.

9. The hole group machining path optimization method according to claim 7, characterized in that: When the hole group processing path of the intermediate population is iterated based on the Metropolis criterion, the opt algorithm is used to generate a new hole group processing path.

10. The hole group machining path optimization method according to claim 9, characterized in that: The opt algorithm is a 3-opt algorithm.