Path planning method based on improved genetic annealing algorithm
By improving the genetic annealing algorithm, combining area division and adaptive temperature adjustment, the problem of path travel direction and smoothness in path planning is solved, and more efficient path planning and spraying operations are achieved.
Patent Information
- Application Number
- CN202510328926.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-20
- Publication Date
- 2025-07-04
AI Technical Summary
The existing path planning algorithm does not consider the path travel direction and path smoothness, resulting in singular values during the movement of the robotic arm, affecting the efficiency and quality of spraying operations.
The improved genetic annealing algorithm is adopted to divide the area to be planned into areas, initialize the chromosome, improve the fitness function, and perform cyclic operations based on the annealing algorithm to adjust the temperature to improve the accuracy and stability of path planning.
It improves the accuracy and stability of path planning, reduces the angle rate, shortens the planned path distance, ensures the smoothness of the path and the efficiency of spraying operations.
Smart Images

Figure CN120244949A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the field of path planning, and particularly relates to a path planning method based on an improved genetic annealing algorithm. Background Art
[0002] At present, many experts and scholars at home and abroad are committed to the research of path planning algorithms. The commonly used optimization algorithms mainly include genetic algorithms, ant colony algorithms, immune algorithms, particle swarm optimization algorithms, and artificial potential field methods. In the actual spraying path planning scenario, the traditional model does not consider the path traveling direction and does not involve the smoothness problem of the overall path. Therefore, the planned path may have too many acute-angle paths, causing the manipulator to reach a singular value during the movement and unable to move forward. At the same time, the traditional genetic algorithm is mostly used to solve this problem, but the local search ability of this method is weak and it is prone to premature convergence. This leads to a large deviation between the path planning result generated based on this model and the actual optimal path, thereby affecting the efficiency of the spraying operation and the final spraying quality. Summary of the Invention
[0003] The present invention provides a path planning method based on an improved genetic annealing algorithm to solve the problems that the current path planning does not consider the path traveling direction, path smoothness, and the low accuracy and stability of path planning.
[0004] According to the first aspect of the embodiments of the present invention, a path planning method based on an improved genetic annealing algorithm is provided, including:
[0005] Step S100: Divide the area to be planned into n sections, initialize m populations, so that the chromosome of each population includes n genes, and each gene corresponds to the starting point or ending point of a different section. Only the starting point or ending point of the same section is allowed to exist in one chromosome, and each chromosome corresponds to a path. Both n and m are integers greater than 1;
[0006] Step S200: For each chromosome in the m populations, determine the improved fitness of the chromosome corresponding to the current path, and retain the corresponding chromosome according to the size of the improved fitness, where the improved fitness is determined according to the length of the current path corresponding to the chromosome, the lengths of the longest path and the shortest path among the paths corresponding to each chromosome, and the number of obtuse angles in the current path;
[0007] Step S300: Take the retained chromosomes as the initial input sequences, and perform cyclic annealing operations on each chromosome in the input sequences based on the improved annealing algorithm to obtain the final solutions corresponding to each chromosome respectively, where the temperature and input sequence for each annealing operation are determined by the difference in the improved fitness between the old solution and the new solution before and after the previous annealing operation;
[0008] Step S400: Compare the improved fitness of each retained chromosome and the improved fitness of each final solution to determine the planned path.
[0009] Optionally, it further includes: establishing a set of area points, a set of paths, a set of path lengths, and a set of path angles. The set of area points is the set of starting and ending points of each area. The set of paths is the set of paths between any two points in the set of area points. The set of path lengths includes the lengths of each path in the set of paths. When the two endpoints of a path are respectively the starting and ending points of the same area, the length of the path is 0. The set of path angles is a set of angles and angle weights between the previous segment and the next segment passing through each intermediate point on each path in the set of paths. When the angle is greater than 90 degrees, the angle weight of the upper and lower segments is 1. When the angle is less than or equal to 90 degrees, the angle weight of the upper and lower segments is 0.
[0010] Optionally, the improved fitness is determined according to the following steps:
[0011] Step S1: According to the set of path lengths, determine the paths corresponding to each chromosome to be analyzed. For each chromosome in each chromosome to be analyzed, obtain the length of the longest path, the length of the shortest path, and the length of the current path corresponding to the chromosome in the determined paths.
[0012] Step S2: According to the length of the longest path, the length of the shortest path, and the length of the current path, determine the length normalization value of the current path.
[0013] Step S3: According to the angle weight representing the number of obtuse angles in the current path in the set of path angles, determine the normalization value of the number of obtuse angles in the current path.
[0014] Step S4: According to the length normalization value of the current path and the normalization value of the number of obtuse angles in the current path, determine the improved fitness of the current path, that is, the improved fitness of the chromosome.
[0015] Optionally, in step S2, the length normalization value f1 of the current path is determined according to the following formula:
[0016]
[0017] where Z represents the length of the current path, l mx represents the length of the longest path, l m represents the length of the shortest path, and n represents the number of genes of each chromosome;
[0018] In step S3, the normalization value f2 of the number of obtuse angles in the current path is determined according to the following formula:
[0019]
[0020] Among them, F m represents the angle weight for representing the number of obtuse angles in the current path;
[0021] In step S4, the improved fitness G of the current path is determined according to the following formula m :
[0022] G m = k1f1 - k2f2
[0023] where k1 and k2 respectively represent the weights of f1 and f2.
[0024] Optionally, in step S200, each chromosome to be analyzed is: each chromosome in m populations; in step S300, each chromosome to be analyzed is: each chromosome corresponding to each old solution and each new solution before and after each annealing operation;
[0025] The genes in each chromosome are represented by different numerical values, each numerical value represents a section, and the numerical value adopts an integer coding method.
[0026] Optionally, step S300 specifically includes:
[0027] Step S10: Set the initial temperature T0, threshold ε, first counter i, second counter j, first sensitivity value u, second sensitivity value v, and both i and j are integers with an initial value of 0;
[0028] Step S20: Perform annealing operations on each chromosome in the input sequence at the corresponding temperature to obtain new solutions corresponding to each chromosome respectively, calculate the improved fitness of each new solution, use the retained chromosomes as the initial input sequence and the initial solution of the annealing operation, for each new solution, judge whether the difference in the improved fitness between the old solution and the new solution before and after this annealing operation is less than 0. If it is less than 0, accept this new solution; if it is greater than or equal to 0, accept the new solution according to the corresponding probability of this annealing operation, the initial probability is a set value, and execute step S30;
[0029] Step S30: Judge whether the annealing cycle end condition is reached. If so, use the accepted new solutions and the remaining old solutions as the final solutions corresponding to each chromosome; otherwise, use the accepted new solutions and the remaining old solutions as the input sequence for the next annealing operation, and execute step S40;
[0030] Step S40: For each new solution after this annealing operation, determine whether the absolute value of the difference in improved fitness between the old solution and the new solution before and after this annealing operation is greater than the threshold ε. If so, increment the first counter i by 1 and execute Step S50; otherwise, increment the second counter j by 1 and execute Step S50;
[0031] Step S50: Determine whether the first counter i is greater than the first sensitivity value u. If so, increase the temperature; otherwise, execute Step S60;
[0032] Step S60: Determine whether the second counter j is greater than the second sensitivity value v. If so, reset the first counter i and the second counter j to zero; otherwise, decrease the temperature; return to execute Step S20.
[0033] Optionally, in Step S10, an annealing cycle number L, a temperature increase coefficient β, and a temperature decrease coefficient α are also set, where L is an integer with an initial value of 0; in Step S60, before returning to execute Step S20, it further includes: incrementing the annealing cycle number L by 1;
[0034] Whether the loop end condition is reached in Step S20 includes: determining whether the temperature reaches the set value and / or whether the annealing cycle number L reaches the set value.
[0035] Optionally, the corresponding probability P in Step S20 is:
[0036]
[0037] where ΔE represents the difference in improved fitness between the old solution and the new solution before and after this annealing operation, and T k represents the temperature based on which this annealing operation is performed.
[0038] Optionally, Step S400 specifically includes: after completing the cyclic annealing operation, for each chromosome in the initial input sequence, compare the improved fitness of the chromosome with the improved fitness of its final solution, and select the chromosome with the larger improved fitness as the new chromosome;
[0039] Determine whether the path planning end condition is reached. If so, use the path corresponding to the chromosome with the largest improved fitness among the new chromosomes as the planned path; otherwise, return to execute Step S200.
[0040] Optionally, before Step S300, operations of selection, crossover, and mutation are also performed on the retained chromosomes.
[0041] The beneficial effects of the present invention are:
[0042] 1. The present invention abstracts the starting point and the ending point of each section into two genes, such that only the starting point or the terminal of the same section is allowed to exist in each chromosome. Thus, the chromosome can not only include the length information, but also contain the direction information of each section, thereby avoiding confusion during decoding. The present invention improves the fitness function in the genetic algorithm, such that the fitness of the chromosome is related to the length and the number of obtuse angles of the corresponding current path, as well as the minimum path length and the maximum path length in the population. Thereby, the turning rate of the planned path can be reduced, the smoothness of the planned path can be ensured, and the distance of the planned path can be shortened. The present invention performs cyclic annealing on each chromosome respectively based on the improved annealing algorithm, and the temperature and the input sequence for each annealing operation are determined by the difference in the improved fitness between the old solution and the new solution before and after the previous annealing operation. It can be seen that the present invention proposes an adaptive temperature adjustment strategy based on the change of the objective function value to improve the annealing operation, thereby preventing the algorithm from converging prematurely and improving the accuracy and stability of path planning.
[0043] 2. The present invention uses integers to encode different sections, such that the numerical values corresponding to each gene in each chromosome are different and are integers, which has a better processing effect for combinatorial optimization problems.
[0044] 3. Before performing the annealing operation, the present invention first performs selection, crossover, and mutation operations on each reserved chromosome, which can further improve the diversity of the chromosomes and the inheritance probability of excellent genes, thereby improving the accuracy of path planning. BRIEF DESCRIPTION OF THE DRAWINGS
[0045] Figure 1 is a flowchart of an embodiment of the path planning method based on the improved genetic annealing algorithm of the present invention. DETAILED DESCRIPTION OF THE EMBODIMENTS
[0046] In order to enable those skilled in the art to better understand the technical solutions in the embodiments of the present invention and make the above-mentioned objects, features, and advantages of the embodiments of the present invention more obvious and understandable, the technical solutions in the embodiments of the present invention will be further described in detail below with reference to the drawings.
[0047] In the description of the present invention, unless otherwise specified and limited, it should be noted that the term "connection" should be understood in a broad sense. For example, it can be a mechanical connection or an electrical connection, or it can be the communication inside two components. It can be directly connected or indirectly connected through an intermediate medium. For those of ordinary skill in the art, the specific meaning of the above terms can be understood according to the specific situation.
[0048] See Figure 1 , which is a flowchart of an embodiment of the path planning method based on the improved genetic annealing algorithm of the present invention. The method may include the following steps:
[0049] Step S100: Divide the area to be planned into n sections, and initialize m populations, such that the chromosome of each population includes n genes, each gene corresponding to the start point or end point of a different section. Only the start point or end point of the same section is allowed to exist in one chromosome, and each chromosome corresponds to a path. Both n and m are integers greater than 1.
[0050] In this embodiment, perform a Z-shaped trajectory planning for each section to obtain the start point and end point of each section. This method may further include: establishing a section point set, a path set, a path length set, and a path angle set. The section point set is the set of the start points and end points of each section. The path set is the set of paths between any two points in the section point set. The path length set includes the lengths of each path in the path set. When the two end points of the path are respectively the start point and end point of the same section, the length of the path is 0. The path angle set is, for each intermediate point on each path in the path set, the set of the angle and angle weight between the previous section and the next section passing through this intermediate point. When the angle is greater than 90 degrees, the angle weight of the upper and lower sections is 1. When the angle is less than or equal to 90 degrees, the angle weight of the upper and lower sections is 0.
[0051] Among them, the area to be planned may be a workpiece area. The start point and end point of each section can be abstracted as two cities. Two cities in the same section form a city cluster. There are a total of 2n cities. Establish a path planning model (such as the generalized traveling salesman SGTSP model): G=(V, E, W, U), where V={v1, v2... v n} is the city cluster set (i.e., the section point set), v i ={v i1 , v i2} is the set of city points in any one city cluster. E is the set of paths between any two city points in the city cluster set (path set). W is the length of each path in the path set E. If the two end points corresponding to the path come from the same city cluster, the length of the path is 0. Otherwise, it is the actual distance between the two cities. The path angle set U is, for each intermediate point on each path in the path set, the set of the angle and angle weight between the previous section and the next section passing through this intermediate point. When the angle is greater than 90 degrees, the angle weight of the upper and lower sections is 1. When the angle is less than or equal to 90 degrees, the angle weight of the upper and lower sections is 0.
[0052] The population initialization method in traditional path planning cannot guarantee the direction within each area, which may lead to confusion during decoding. To solve this problem, in the present invention, the starting point and the ending point of each area are abstracted into two genes, so that only the starting point or the terminal of the same area is allowed to exist in each chromosome. Thus, the chromosome can include not only the length information but also the direction information of each area, thereby avoiding confusion during decoding. Among them, the genes in each chromosome are represented by different numerical values, each numerical value represents an area, and the numerical value adopts an integer coding method. The present invention encodes different areas by integers, so that the numerical values corresponding to the genes in each chromosome are different and are integers, which has a better processing effect on combinatorial optimization problems.
[0053] Step S200: For each chromosome in the m populations, determine the improved fitness of the chromosome corresponding to the current path, and retain the corresponding chromosome according to the magnitude of the improved fitness, where the improved fitness is determined according to the length of the current path corresponding to the chromosome, the lengths of the longest path and the shortest path in the paths corresponding to each chromosome, and the number of obtuse angles in the current path.
[0054] In genetic algorithms, the fitness function is usually used to measure the quality of each chromosome individual in the population, and whether a chromosome individual can be defined as an elite individual is also judged by the fitness function. In traditional combined path planning of industrial robots, the fitness function is usually defined as the derivative of the path length represented by an individual. However, during the movement of the robot, the rotation angle of the robotic arm is likely to reach a singular value, reducing the efficiency. Therefore, the present invention proposes an improved fitness function. Specifically, the improved fitness can be determined according to the following steps:
[0055] Step S1: According to the set of path lengths, determine the paths corresponding to the chromosomes to be analyzed. For each chromosome in the chromosomes to be analyzed, obtain the length of the longest path, the length of the shortest path, and the length of the current path corresponding to the chromosome in the determined paths; in step S200, the chromosomes to be analyzed are: each chromosome in the m populations.
[0056] Step S2: According to the length of the longest path, the length of the shortest path, and the length of the current path, determine the length normalization value of the current path. In this embodiment, the length normalization value f1 of the current path can be determined according to the following formula:
[0057]
[0058] where Z represents the length of the current path, l mx represents the length of the longest path, l m represents the length of the shortest path, and n represents the number of genes of each chromosome.
[0059] Step S3: Determine the normalized value of the number of obtuse angles in the current path according to the angle weight in the path angle set used to represent the number of obtuse angles in the current path. In this embodiment, the normalized value f2 of the number of obtuse angles in the current path can be determined according to the following formula:
[0060]
[0061] where F m Represents the angle weight used to represent the number of obtuse angles in the current path.
[0062] Step S4: Determine the improved fitness of the current path, i.e., the improved fitness of the chromosome, according to the normalized value of the length of the current path and the normalized value of the number of obtuse angles in the current path. In this embodiment, the improved fitness of the current path can be determined according to the following formula G: m :
[0063] G m =k1f1-k2f2
[0064] Where k1 and k2 represent the weights of f1 and f2 respectively.
[0065] The present invention improves the fitness function in the genetic algorithm so that the fitness of the chromosome is related to the length and the number of obtuse angles of the corresponding current path, as well as the minimum path length and the maximum path length in the population, thereby reducing the turning rate of the planned path, ensuring the smoothness of the planned path, and shortening the planned path distance.
[0066] After determining the improved fitness of each chromosome in the m populations, the improved fitness of each chromosome may be first sorted in descending order, and then the chromosomes with a corresponding proportion (eg 30%) at the top may be retained.
[0067] Step S300: taking the retained chromosomes as the initial input sequence, performing cyclic annealing operations on the chromosomes in the input sequence based on the improved annealing algorithm to obtain final solutions corresponding to the chromosomes, wherein the temperature and input sequence based on each annealing operation are determined by the improved fitness difference between the old solution and the new solution before and after the last annealing operation.
[0068] In the annealing algorithm, when the change value of the target drops too fast within a certain range, it may be necessary to maintain a higher temperature to search for more solution spaces. In order to prevent the fixed cooling strategy from causing the algorithm to converge prematurely in some cases, the present invention proposes an adaptive temperature adjustment strategy based on the change of the value of the objective function to improve the simulated annealing operation. Specifically, the step S300 may include:
[0069] Step S10: Set the initial temperature T0, threshold ε, first counter i, second counter j, first sensitivity value u, and second sensitivity value v. L, i, and j are all integers with an initial value of 0.
[0070] In this step, the number of annealing cycles L, heating coefficient β, and cooling coefficient α can also be set. L is an integer with an initial value of 0.
[0071] Step S20: Anneal each chromosome in the input sequence at the corresponding temperature to obtain new solutions corresponding to each chromosome, calculate the improved fitness of each new solution, and use the retained chromosomes as the initial input sequence and the initial solution for the annealing operation. For each new solution, determine whether the difference in improved fitness between the old solution and the new solution before and after this annealing operation is less than 0. If it is less than 0, accept the new solution; if it is greater than or equal to 0, accept the new solution according to the corresponding probability of this annealing operation. The initial probability is a set value, and then execute Step S30. Among them, when calculating the improved fitness of each old solution and new solution, the chromosomes to be analyzed in the improved fitness calculation step are: the chromosomes corresponding to each old solution and each new solution before and after each annealing operation.
[0072] The corresponding probability P in Step S20 is:
[0073]
[0074] where ΔE represents the difference in improved fitness between the old solution and the new solution before and after this annealing operation, and T k represents the temperature based on which this annealing operation is performed.
[0075] Step S30: Determine whether the annealing cycle end condition is reached. If so, use the accepted new solutions and the remaining old solutions as the final solutions corresponding to each chromosome; otherwise, use the accepted new solutions and the remaining old solutions as the input sequence for the next annealing operation, and execute Step S40. Whether the cycle end condition is reached in this step can include: determining whether this temperature reaches the set value and / or whether the number of annealing cycles L reaches the set value.
[0076] Step S40: For each new solution after this annealing operation, determine whether the absolute value of the difference in improved fitness between the old solution and the new solution before and after this annealing operation is greater than the threshold ε. If so, increment the first counter i by 1 and execute Step S50; otherwise, increment the second counter j by 1 and execute Step S50.
[0077] Step S50: Determine whether the first counter i is greater than the first sensitivity value u. If so, increase the temperature; otherwise, execute Step S60.
[0078] Step S60: Determine whether the second counter j is greater than the second sensitivity value v. If so, reset the first counter i and the second counter j to zero. Otherwise, cool down the temperature and return to execute Step S20.
[0079] Based on the improved annealing algorithm, the present invention performs cyclic annealing on each chromosome respectively. The temperature and input sequence for each annealing operation are determined by the difference in the improved fitness values of the old and new solutions before and after the previous annealing operation. It can be seen that the present invention proposes an adaptive temperature adjustment strategy based on the change of the objective function value to improve the annealing operation, thereby preventing the algorithm from converging prematurely and improving the accuracy and stability of path planning.
[0080] Step S400: Compare the improved fitness of each retained chromosome with the improved fitness of each final solution to determine the planned path. The step S400 may specifically include: after completing the cyclic annealing operation, for each chromosome in the initial input sequence, compare the improved fitness of the chromosome with the improved fitness of its final solution, and select the chromosome with the larger improved fitness as the new chromosome; determine whether the path planning end condition is reached. If so, take the path corresponding to the chromosome with the largest improved fitness among all the new chromosomes as the planned path; otherwise, return to execute Step S200. The path planning end condition may include a preset number of iterations or a convergence condition.
[0081] In addition, before the step S300, operations of selection, crossover, and mutation may also be performed on each retained chromosome. Among them, when performing the selection operation, the roulette wheel algorithm may be used for selection: first calculate the population fitness and the fitness of each individual in the population. Thereafter, dividing the fitness of a single individual by the population fitness can obtain a proportional value k between 0 and 1. This proportional value k is equivalent to the area occupied by the individual on the "roulette wheel". Subsequently, a random value q is generated. If q is between 0 and k, the individual is retained without performing crossover and mutation operations. Otherwise, crossover and mutation operations are performed. The role of the proportion and its corresponding area is to represent the probability of the individual being selected. If the fitness of the individual is high, the probability of its being retained is higher.
[0082] When performing the crossover operation, part of the genes of two (or more) selected parent individuals are exchanged and combined to generate new offspring individuals. In this solution, the single-point crossover method is adopted. A crossover point is randomly determined in the coding string of the individual, and then part of the genes of the two parent individuals after (or before) the crossover point are exchanged. When performing the mutation operation, some genes of the individual are randomly changed. Its role is to introduce new gene combinations to maintain the diversity of the population. In this solution, a gene in the individual is randomly selected with a probability and randomly perturbed within the selectable nodes to obtain a new individual.
[0083] Before performing the annealing operation, the present invention first performs selection, crossover, and mutation operations on each retained chromosome, which can further improve the diversity of chromosomes and the inheritance probability of excellent genes, thereby improving the accuracy of path planning.
[0084] As can be seen from the above embodiments, the present invention abstracts the starting point and the ending point of each area into two genes, such that only the starting point or the terminal of the same area is allowed to exist within each chromosome. Thus, the chromosome can not only include length information, but also include the direction information of each area, thereby avoiding confusion during decoding; the present invention improves the fitness function in the genetic algorithm, such that the fitness of the chromosome is related to the length and the number of obtuse angles of its corresponding current path, as well as the minimum path length and the maximum path length in the population. Thus, the turning rate of the planned path can be reduced, the smoothness of the planned path can be ensured, and the distance of the planned path can be shortened; the present invention performs cyclic annealing on each chromosome based on the improved annealing algorithm, and the temperature and the input sequence for each annealing operation are determined by the difference in the improved fitness between the old solution and the new solution before and after the previous annealing operation. It can be seen that the present invention proposes an adaptive temperature adjustment strategy based on the change of the objective function value to improve the annealing operation, thereby preventing the algorithm from converging prematurely and improving the accuracy and stability of path planning.
[0085] Those skilled in the art will readily conceive of other embodiments of the present invention after considering the specification and practicing the invention disclosed herein. This application is intended to cover any variations, uses, or adaptations of the present invention that follow the general principles of the present invention and include known common knowledge or conventional technical means in the technical field not disclosed by the present invention. The specification and examples are only illustrative, and the true scope and spirit of the present invention are pointed out by the following claims.
[0086] It should be understood that the present invention is not limited to the exact structures described above and shown in the drawings, and various modifications and changes can be made without departing from its scope.
Claims
1. A path planning method based on an improved genetic annealing algorithm, characterized in that, Including: Step S100: Divide the area to be planned into n sections, initialize m populations, such that each chromosome of each population includes n genes, each gene corresponding to the start point or end point of a different section. Only the start point or end point of the same section is allowed to exist in one chromosome, and each chromosome corresponds to a path. Both n and m are integers greater than 1. Step S200: For each chromosome in the m populations, determine the improved fitness of the path corresponding to this chromosome, and retain the corresponding chromosome according to the magnitude of this improved fitness, where this improved fitness is determined according to the length of the path corresponding to this chromosome, the lengths of the longest path and the shortest path among the paths corresponding to each chromosome, and the number of obtuse angles in the current path. Step S300: Use the retained chromosomes as the initial input sequences, and perform cyclic annealing operations on each chromosome in the input sequences respectively based on the improved annealing algorithm to obtain the final solutions corresponding to each chromosome respectively, where the temperature and input sequence for each annealing operation are determined by the difference in the improved fitness between the old solution and the new solution before and after the previous annealing operation. Step S400: Compare the improved fitness of the retained chromosomes and the improved fitness of each final solution to determine the planned path.
2. The path planning method based on the improved genetic annealing algorithm according to claim 1, wherein It also includes: establishing a section point set, a path set, a path length set, and a path angle set. The section point set is the set of the start points and end points of each section. The path set is the set of paths between any two points in the section point set. The path length set includes the lengths of each path in the path set, where when the two end points of the path are respectively the start point and end point of the same section, the length of the path is 0. The path angle set is, for each intermediate point on each path in the path set, the set of the angle and angle weight between the previous section and the next section passing through this intermediate point. When the angle is greater than 90 degrees, the angle weight of the upper and lower sections is 1. When the angle is less than or equal to 90 degrees, the angle weight of the upper and lower sections is 0.
3. The path planning method based on the improved genetic annealing algorithm according to claim 2, wherein, Determine the improved fitness according to the following steps: Step S1: According to the path length set, determine the paths corresponding to each chromosome to be analyzed. For each chromosome among the chromosomes to be analyzed, obtain the length of the longest path, the length of the shortest path, and the length of the path corresponding to this chromosome in the determined paths. Step S2: According to the length of the longest path, the length of the shortest path, and the length of the current path, determine the length normalization value of the current path. Step S3: According to the angle weight in the path angle set representing the number of obtuse angles in the current path, determine the normalization value of the number of obtuse angles in the current path. Step S4: According to the length normalization value of the current path and the normalization value of the number of obtuse angles in the current path, determine the improved fitness of the current path, that is, the improved fitness of this chromosome.
4. The path planning method based on the improved genetic annealing algorithm according to claim 3, wherein In step S2, determine the length normalization value f1 of the current path according to the following formula: where Z represents the length of the current path, and l mx represents the length of the longest path, and l m represents the length of the shortest path, and n represents the number of genes in each chromosome; In step S3, determine the normalization value f2 of the number of obtuse angles in the current path according to the following formula: Among them, F m represents the included angle weight for representing the number of obtuse angles in the current path; In the step S4, the improved fitness G of the current path is determined according to the following formula m :[[]]END]] G m = k1f1 - k2f2 where k1 and k2 respectively represent the weights of f1 and f2.
5. The path planning method based on the improved genetic annealing algorithm according to any one of claims 2 to 4, characterized in that, In the step S200, each chromosome to be analyzed is: each chromosome in m populations; in the step S300, each chromosome to be analyzed is: each chromosome corresponding to each old solution and each new solution before and after each annealing operation. Genes in each chromosome are represented by different numerical values, each numerical value represents a section, and the numerical values adopt integer coding.
6. The path planning method based on the improved genetic annealing algorithm according to claim 1, wherein The step S300 specifically includes: Step S10: Set the initial temperature T0, threshold ε, first counter i, second counter j, first sensitivity value u, and second sensitivity value v. Both i and j are integers with an initial value of 0. Step S20: Anneal each chromosome in the input sequence at the corresponding temperature to obtain new solutions corresponding to each chromosome respectively, calculate the improved fitness of each new solution, use the retained chromosomes as the initial input sequence and the initial solution of the annealing operation. For each new solution, judge whether the difference in improved fitness between the old solution and the new solution before and after this annealing operation is less than 0. If it is less than 0, accept this new solution; if it is greater than or equal to 0, accept the new solution according to the corresponding probability of this annealing operation. The initial probability is a set value, and then execute step S30. Step S30: Judge whether the annealing cycle end condition is reached. If so, use the accepted new solutions and the remaining old solutions as the final solutions corresponding to each chromosome; otherwise, use the accepted new solutions and the remaining old solutions as the input sequence for the next annealing operation, and execute step S40. Step S40: For each new solution after this annealing operation, judge whether the absolute value of the difference in improved fitness between the old solution and the new solution before and after this annealing operation is greater than the threshold ε. If so, increment the first counter i by 1 and execute step S50; otherwise, increment the second counter j by 1 and execute step S50. Step S50: Judge whether the first counter i is greater than the first sensitivity value u. If so, increase the temperature; otherwise, execute step S60. Step S60: Judge whether the second counter j is greater than the second sensitivity value v. If so, reset the first counter i and the second counter j to zero; otherwise, decrease the temperature; then return to execute step S20.
7. The path planning method based on the improved genetic annealing algorithm according to claim 6, wherein, In the step S10, an annealing cycle number L, a heating coefficient β, and a cooling coefficient α are also set. L is an integer with an initial value of 0; in the step S60, before returning to execute step S20, it also includes: incrementing the annealing cycle number L by 1. Whether the cycle end condition is reached in the step S20 includes: judging whether the temperature reaches the set value and / or whether the annealing cycle number L reaches the set value.
8. The path planning method based on the improved genetic annealing algorithm according to claim 6, wherein The corresponding probability P in the step S20 is: where ΔE represents the difference in the improved fitness between the old solution and the new solution before and after this annealing operation, and T k represents the temperature on which this annealing operation is based.
9. The path planning method based on the improved genetic annealing algorithm according to claim 6, characterized in that, The step S400 specifically includes: after completing the cyclic annealing operation, for each chromosome in the initial input sequence, compare the improved fitness of this chromosome with the improved fitness of its final solution, and select the chromosome with a larger improved fitness as the new chromosome. Judge whether the path planning end condition is reached. If so, use the path corresponding to the chromosome with the largest improved fitness among each new chromosome as the planned path; otherwise, return to execute step S200.
10. The path planning method based on the improved genetic annealing algorithm according to claim 1, characterized in that Before the step S300, it further includes performing selection, crossover, and mutation operations on each of the remaining chromosomes.