CN115965169A - Path planning method, intelligent device and computer readable storage medium - Google Patents

Path planning method, intelligent device and computer readable storage medium Download PDF

Info

Publication number
CN115965169A
CN115965169A CN202211533427.9A CN202211533427A CN115965169A CN 115965169 A CN115965169 A CN 115965169A CN 202211533427 A CN202211533427 A CN 202211533427A CN 115965169 A CN115965169 A CN 115965169A
Authority
CN
China
Prior art keywords
population
determining
target
current
path planning
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Pending
Application number
CN202211533427.9A
Other languages
Chinese (zh)
Inventor
宋秀峰
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Goertek Techology Co Ltd
Original Assignee
Goertek Techology Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Goertek Techology Co Ltd filed Critical Goertek Techology Co Ltd
Priority to CN202211533427.9A priority Critical patent/CN115965169A/en
Publication of CN115965169A publication Critical patent/CN115965169A/en
Pending legal-status Critical Current

Links

Images

Landscapes

  • Management, Administration, Business Operations System, And Electronic Commerce (AREA)

Abstract

The invention discloses a path planning method, intelligent equipment and a computer readable storage medium, wherein the method comprises the following steps: acquiring each target location associated with the current path planning, and determining a distance value between each target location; generating an initial generation population based on each distance value and inputting the initial generation population into a preset genetic algorithm model to obtain different generations of offspring populations; the genetic variation probability in the genetic algorithm model is self-adaptive based on a preset simulated annealing algorithm; determining a target child population in the child population according to the total shortest path distance in each child population; and outputting target path planning information corresponding to the target child population. By applying the path planning method in the invention to aspects such as logistics distribution and the like which need path planning, the path planning efficiency is improved, the global optimal path target searching is realized, and the expectation of a user on the current path planning is achieved and even better.

Description

Path planning method, intelligent device and computer readable storage medium
Technical Field
The present invention relates to the field of path planning technologies, and in particular, to a path planning method, an intelligent device, and a computer-readable storage medium.
Background
At present, along with the continuous progress and development of technologies such as computer technology, telecommunication technology and the like, the logistics mode also has the characteristics of diversification and intellectualization. Currently, intelligent logistics faces a number of challenges and opportunities. The optimization of the logistics distribution route becomes an effective way for reducing the operation cost and improving the economic benefit. However, the optimization of the logistics distribution path is a technical problem with high complexity, and relates to a modern optimization algorithm problem.
Aiming at the technical problem, the genetic algorithm has more related researches and applications in the aspect of logistics path optimization, for example, the genetic algorithm is applied to the distribution of the intelligent unmanned aerial vehicle, but because the conventional genetic algorithm has inherent defects that the conventional genetic algorithm cannot iterate according to diversity differences of populations, the convergence is poor, the search benefit is low, the planning effect of path planning is poor directly, and the user expectation of the path planning is difficult to achieve.
Disclosure of Invention
The invention mainly aims to provide a path planning method, a path planning device, intelligent equipment and a computer readable storage medium, and aims to solve the technical problems that the planning effect of path planning is poor and the user expectation of the path planning is difficult to achieve when the traditional genetic algorithm is applied to the path planning.
In order to achieve the above object, the present invention provides a path planning method, which is applied to an intelligent device, and comprises the following steps:
acquiring each target location associated with the current path planning, and determining a distance value between each target location;
generating an initial generation population based on each distance value and inputting the initial generation population into a preset genetic algorithm model to obtain the offspring populations of different generations; the genetic variation probability in the genetic algorithm model is self-adaptive based on a preset simulated annealing algorithm;
determining a target child population in the child population according to the total shortest path distance in each child population;
and outputting target path planning information corresponding to the target child population.
Optionally, the step of obtaining each target location associated with the current path plan and determining a distance value between each target location includes:
acquiring position coordinates of each target location associated with the current path planning; wherein the destination location comprises a start point and an end point and a stop point between the start point and the end point;
and determining distance values among the target positions according to the position coordinates.
Optionally, the primary population comprises a plurality of primary individuals; the step of inputting the primary generation population into a preset genetic algorithm model to obtain different generations of offspring populations comprises the following steps:
inputting the primary population into a preset genetic algorithm model, and determining random values corresponding to genes of each primary individual;
determining the current gene mutation probability in the genetic algorithm model, and comparing the random value with the current gene mutation probability to determine whether the gene is a gene to be mutated;
if the gene is a gene to be mutated, determining a mutated gene corresponding to the gene;
changing the gene into the variant gene when the chromosomes of each primary generation individual are crossed to obtain a filial generation population corresponding to the primary generation population;
and taking the filial generation population as the initial generation population, and circularly executing the step of determining random values corresponding to the genes of the initial generation individuals respectively to obtain the filial generation populations of different generations.
Optionally, the step of determining the probability of the current genetic variation in the genetic algorithm model comprises:
judging the current generation number of the current generation population; wherein the contemporary population characterizes a newly acquired population;
and if the current generation is a generation, taking a preset gene mutation probability as the current gene mutation probability in the genetic algorithm model.
Optionally, after the step of determining the current generation number of the current generation population, the method further includes:
if the current algebra is larger than one algebra, acquiring the total distance of each path of the current algebra population;
determining the average distance of the paths of the contemporary population according to the total distance of the paths;
determining a target path total distance which is greater than the path average distance in the path total distances and the number of paths of the target path total distance;
if the number of the paths is smaller than a preset number threshold, determining a target individual corresponding to the total distance of the target paths in the contemporary population;
and determining the current genetic variation probability of the target individual in the genetic algorithm model according to the maximum genetic variation probability and the minimum genetic variation probability in the genetic algorithm model and the total iteration number and the current iteration number corresponding to the current generation population.
Optionally, after the step of determining the target individual corresponding to the total distance of the target path, the method further includes:
and determining non-target individuals in the contemporary population, and taking the gene variation maximum probability as the current gene variation probability of the non-target individuals in the genetic algorithm model.
Optionally, after the step of determining the current genetic variation probability in the genetic algorithm model, the method further comprises:
determining a descendant population corresponding to the current generation population, and determining the total distance of the shortest path in the descendant population;
if the total distance of the shortest paths in the current generation population is smaller than the total distance of the shortest paths in the later generation population, determining the corresponding mutation probability based on the simulated degradation algorithm and a preset exponential cooling rule;
and determining a corresponding mutation probability based on the simulated degradation algorithm and a preset index cooling rule as the gene mutation minimum probability in the genetic algorithm model, and circularly executing the step of obtaining the total distance of each path of the contemporary population.
Optionally, the step of determining a target child population in the child population according to the total shortest path distance in each child population includes:
respectively taking each filial generation population as a current generation population, and determining a previous generation population and a descendant population which are adjacent to the current generation population algebra;
and if the total distance of the shortest paths of the current generation population is greater than the total distance of the shortest paths of the previous generation population and greater than the shortest path corresponding to the descendant population, determining that the current generation population is a target descendant population in the descendant population.
In addition, to achieve the above object, the present invention further provides a path planning apparatus, including:
the distance operation module is used for acquiring each target location associated with the current path planning and determining a distance value between each target location;
the genetic iteration module is used for generating an initial generation population based on each distance value and inputting the initial generation population to a preset genetic algorithm model to obtain offspring populations of different generations; the genetic variation probability in the genetic algorithm model is self-adaptive based on a preset simulated annealing algorithm;
the path output module is used for determining a target child population in the child population according to the total shortest path distance in each child population; and outputting target path planning information corresponding to the target child population.
In addition, to achieve the above object, the present invention further provides an intelligent device, which includes a processor, a storage unit, and a path planning program stored in the storage unit and executable by the processor, wherein when the path planning program is executed by the processor, the steps of the path planning method described above are implemented.
The present invention also provides a computer-readable storage medium having a path planning program stored thereon, wherein the path planning program, when executed by a processor, implements the steps of the path planning method as described above.
According to the path planning method in the technical scheme, each target location associated with the current path planning is obtained, and the distance value between each target location is determined; generating an initial generation population based on each distance value and inputting the initial generation population into a preset genetic algorithm model to obtain different generations of offspring populations; the genetic variation probability in the genetic algorithm model is self-adaptive based on a preset simulated annealing algorithm; determining a target child population in the child population according to the total shortest path distance in each child population; and outputting target path planning information corresponding to the target child population.
The invention is mainly based on combining genetic algorithm and path planning and provides a concept of gene mutation probability self-adaption, a user formulates a plan of current path planning, a plurality of distance values between each target location are obtained through the target locations covered by the current path planning, a plurality of distance values are randomly generated into an initial generation population with various initial path planning information, initial generation individuals in the initial generation population represent the initial path planning information, and then iterative behaviors such as heredity, crossing, mutation and the like are carried out through the genetic algorithm to obtain a plurality of offspring populations, in the process of iteration, the gene mutation probability corresponding to each individual in each population is not always fixed but is changed based on the diversity of the population, namely, the gene mutation probability has a self-adaption process, particularly, the self-adaption is carried out through a preset simulated annealing algorithm, so that the situation that the current path planning is expected by a user is avoided, the situation that a population and an individual with low adaptability are obtained due to early convergence of a genetic algorithm is prevented, the traditional genetic algorithm with basically fixed mutation probability is improved based on the genetic mutation probability and the simulated annealing algorithm, the improved genetic algorithm is applied to specific path planning, compared with the traditional path planning scheme based on the genetic algorithm, the population and the individual with higher adaptability are obtained, namely, the total distance of the path planning is determined to be shorter, in the process of carrying out the genetic mutation self-adaption through population iteration, the path planning efficiency is greatly improved, the target search of the global optimal path (target path planning information) is realized, and then the behaviors of carrying out logistics distribution and the like based on the obtained target path planning information are achieved, the path distance is greatly shortened, the logistics distribution efficiency is improved, and the logistics transportation cost is saved.
Drawings
Fig. 1 is a schematic structural diagram of a hardware operating environment of an intelligent device according to an embodiment of the present invention;
FIG. 2 is a schematic flow chart illustrating a first embodiment of a path planning method according to the present invention;
fig. 3 is a detailed flowchart of step S20 according to an embodiment of the path planning method of the present invention;
fig. 4 is a schematic detailed flow chart of step S22 according to an embodiment of the path planning method of the present invention;
fig. 5 is a detailed flowchart of step S220 related to the first embodiment of the path planning method according to the present invention;
fig. 6 is a schematic flowchart of the path planning method according to the first embodiment of the present invention after step S22;
FIG. 7 is a basic flow chart of a genetic algorithm involved in the path planning method of the present invention;
FIG. 8 is a schematic diagram of a single-point crossover operation involved in the path planning method of the present invention;
FIG. 9 is a path planning test chart of a conventional genetic algorithm according to the path planning method of the present invention;
FIG. 10 is a test chart of the optimized genetic algorithm path planning related to the path planning method of the present invention;
fig. 11 is a schematic diagram of a frame structure of the path planning apparatus according to the present invention.
The implementation, functional features and advantages of the present invention will be further described with reference to the accompanying drawings.
Detailed Description
It should be understood that the specific embodiments described herein are merely illustrative of the invention and are not intended to limit the invention.
The embodiment of the invention provides intelligent equipment. The smart device may include any type of smart device, such as a personal computer, workstation, server, etc., without limitation.
As shown in fig. 1, fig. 1 is a schematic structural diagram of a hardware operating environment of an intelligent device according to an embodiment of the present invention.
As shown in fig. 1, the smart device may include: a processor 1001, e.g. a CPU, a network interface 1004, a user interface 1003, a storage unit 1005, a communication bus 1002. Wherein a communication bus 1002 is used to enable connective communication between these components. The user interface 1003 may include a Display (Display), an input unit such as a control panel, and the optional user interface 1003 may also include a standard wired interface, a wireless interface. The network interface 1004 may optionally include a standard wired interface, a wireless interface (e.g., a WIFI interface). The storage unit 1005 may be a high-speed RAM storage unit, or may be a non-volatile memory (non-volatile memory), such as a magnetic disk storage unit. The storage unit 1005 may alternatively be a storage device separate from the processor 1001. A path planning program may be included in the storage unit 1005, which is a kind of computer storage medium.
Those skilled in the art will appreciate that the hardware configuration shown in fig. 1 does not constitute a limitation of the apparatus, and may include more or fewer components than those shown, or some components may be combined, or a different arrangement of components.
With continued reference to fig. 1, the storage unit 1005 of fig. 1, which is a type of computer-readable storage medium, may include an operating system, a user interface module, a network communication module, and a path planning program.
In fig. 1, the network communication module is mainly used for connecting a server and performing data communication with the server; and the processor 1001 may call the path planning program stored in the storage unit 1005 and perform the following operations:
acquiring each target location associated with the current path planning, and determining a distance value between each target location;
generating an initial generation population based on each distance value and inputting the initial generation population into a preset genetic algorithm model to obtain the offspring populations of different generations; the genetic variation probability in the genetic algorithm model is self-adaptive based on a preset simulated annealing algorithm;
determining a target child population in the child population according to the total distance of the shortest paths in each child population;
and outputting target path planning information corresponding to the target child population.
Further, the processor 1001 may call a path planning program stored in the memory 1005, and further perform the following operations:
acquiring position coordinates of each target location associated with the current path planning; wherein the destination location comprises a start point and an end point and a stop point between the start point and the end point;
and determining distance values among the target positions according to the position coordinates.
Further, the processor 1001 may call a path planning program stored in the memory 1005, and further perform the following operations:
inputting the initial generation population into a preset genetic algorithm model, and determining random values corresponding to genes of each initial generation individual;
determining the current gene mutation probability in the genetic algorithm model, and comparing the random value with the current gene mutation probability to determine whether the gene is a gene to be mutated;
if the gene is a gene to be mutated, determining a mutated gene corresponding to the gene;
changing the gene into the variant gene when the chromosomes of each initial generation individual are crossed so as to obtain a progeny population corresponding to the initial generation population;
and taking the filial generation population as the initial generation population, and circularly executing the step of determining random values corresponding to the genes of the initial generation individuals respectively to obtain the filial generation populations of different generations.
Further, the processor 1001 may call a path planning program stored in the memory 1005, and further perform the following operations:
judging the current generation number of the current generation population; wherein the contemporary population characterizes a newly acquired population;
and if the current generation is a generation, taking a preset gene mutation probability as the current gene mutation probability in the genetic algorithm model.
Further, the processor 1001 may call a path planning program stored in the memory 1005, and further perform the following operations:
if the current algebra is larger than one algebra, acquiring the total distance of each path of the current algebra population;
determining the average distance of the paths of the contemporary population according to the total distance of the paths;
determining a target path total distance which is greater than the path average distance in the path total distances and the path number of the target path total distance;
if the number of the paths is smaller than a preset number threshold, determining a target individual corresponding to the total distance of the target paths in the contemporary population;
and determining the current genetic variation probability of the target individual in the genetic algorithm model according to the maximum genetic variation probability and the minimum genetic variation probability in the genetic algorithm model and the total iteration number and the current iteration number corresponding to the current generation population.
Further, the processor 1001 may call the path planning program stored in the memory 1005, and further perform the following operations:
and determining non-target individuals in the contemporary population, and taking the gene variation maximum probability as the current gene variation probability of the non-target individuals in the genetic algorithm model.
Further, the processor 1001 may call a path planning program stored in the memory 1005, and further perform the following operations:
determining a descendant population corresponding to the current generation population, and determining the total distance of the shortest path in the descendant population;
if the total shortest path distance in the current generation population is smaller than the total shortest path distance in the descendant population, determining the corresponding mutation probability based on the simulated degradation algorithm and a preset exponential cooling rule;
and determining a corresponding mutation probability based on the simulated degradation algorithm and a preset index cooling rule as the gene mutation minimum probability in the genetic algorithm model, and circularly executing the step of obtaining the total distance of each path of the contemporary population.
Further, the processor 1001 may call the path planning program stored in the memory 1005, and further perform the following operations:
respectively taking each filial generation population as a current generation population, and determining a previous generation population and a descendant population which are adjacent to the current generation population algebra;
and if the total shortest path distance of the current generation population is greater than the total shortest path distance of the previous generation population and greater than the shortest path corresponding to the descendant population, determining that the current generation population is a target descendant population in the descendant population.
Based on the hardware structure of the intelligent device, the invention provides various embodiments of the path planning method.
The embodiment of the invention provides a path planning method.
Referring to fig. 2, fig. 2 is a schematic flow chart diagram of a path planning method according to a first embodiment of the present invention; in a first embodiment of the present invention, the path planning method is applied to an intelligent device, and the method includes the following steps:
step S10, acquiring each target location associated with the current path planning, and determining a distance value between each target location;
in this embodiment, the current path plan refers to a plan of the path plan currently made by the user, for example, what path mode the user desires to sequentially deliver to each delivery location in the delivery plan in the process of logistics delivery, that is, from a starting point, which location to go first and then which location to go, finally completing delivery tasks at all locations and returning to the starting point.
Each target point associated with the current path plan may be, for each delivery point covered by the current logistics delivery plan, after each target point is determined, a distance value between each target point is determined according to a position of each target point, that is, a distance value from each target point to another target point is obtained by taking any one target point as a center (reference), where, for example, the target points include: location 1, location 2, and location 3, where the distance values between the respective target locations may include: a distance value from point 1 to point 2, a distance value from point 1 to point 3, a distance value from point 2 to point 1, a distance value from point 2 to point 3, a distance value from point 3 to point 1, and a distance value from point 3 to point 2.
In one embodiment, the step S10 includes:
step a, acquiring position coordinates of each target location associated with current path planning; wherein the destination location comprises a start point and an end point and a stop point between the start point and the end point;
in this embodiment, each target location may be determined by position coordinates of each target location, where the position coordinates may be plane coordinates, such as [100,100], or latitude and longitude coordinates, and the form of the position coordinates is not limited as long as the position of each target location can be determined. The target points are all points including a starting point, an end point and a stop point between the starting point and the end point, wherein the starting point and the end point can be the same target point, for example, the logistics distribution often needs to start from the starting point of the distribution and finally return to the starting point of the distribution.
And b, determining distance values among the target places according to the position coordinates.
After the position coordinates corresponding to each target location are determined, the distance value between each target location can be directly calculated. According to the embodiment, the distance values among the target positions can be simply and efficiently obtained in a coordinate calculation mode, the target positions are randomly combined in a front-back sequence, and the combined total path planning distance is determined, so that the initial individual is provided for the initial generation population.
S20, generating an initial generation population based on each distance value and inputting the initial generation population into a preset genetic algorithm model to obtain offspring populations of different generations; the genetic variation probability in the genetic algorithm model is self-adaptive based on a preset simulated annealing algorithm;
after determining each target location and each distance value, randomly combining the target locations to obtain a plurality of initial path planning information, and obtaining a total path planning distance corresponding to each of the initial path planning information based on each of the distance values, where an initial path planning information is, for example: and the distance values from the location 1 to the location 2 to the location 3 and finally back to the location 1 are 1km, 3km, 4km and 6km respectively, so that the total distance of the corresponding path planning is 1km +3km +4km +6km =14km. Each initial total path distance corresponds to an individual in the primary population, so that the primary population is generated based on a plurality of individuals, that is, the initial total path distance can be represented by the primary individuals in the primary population.
The primary generation population is encoded to be converted into machine-recognizable data information, and considering that the traditional binary coding has high requirements on a computer memory, a gray code encoding mode can be selected to encode the primary generation population and input the encoded primary generation population into a preset genetic algorithm model, wherein the gray code encoding mode can be expressed as follows:
Figure BDA0003975304360000101
(1) In the formula: x is a radical of a fluorine atom i And y i Binary codes of the primary generation individual and the filial generation individual respectively; wherein, X = X m x m-1 …x 2 x 1 In binary coded form.
The genetic algorithm model in the embodiment takes a traditional genetic algorithm as a frame, but is different from the traditional genetic algorithm in that the model annealing algorithm and the genetic algorithm are combined by the genetic algorithm model, so that the genetic variation probability of an individual is controlled to change in a self-adaptive manner in the population iteration process, the defects that the existing genetic algorithm is easy to converge in advance and fall into a local optimal solution are avoided, and a better, namely a shorter path planning total distance is obtained from a global level when the genetic algorithm model is applied to path planning.
The genetic algorithm model can include a genetic algorithm and a simulated annealing algorithm, and can also include a maximum iteration number, a population crossing probability, a gene mutation probability, an expected path planning total distance and the like input by a user, wherein the maximum iteration number is the maximum allowable number of times of iteration of the genetic algorithm on a population and can be used as a termination condition of the genetic algorithm, the population crossing probability refers to the possibility of chromosome crossing between individuals in a certain population, and the population crossing probability can be a probability interval formed by a preset maximum crossing probability and a preset minimum crossing probability, wherein the gene mutation probability is the possibility of gene mutation of the individuals in the process of iteration and can include a mutation probability interval formed by the preset maximum probability and the minimum probability of gene mutation. The expected path planning total distance refers to the total distance of the shortest path which the user wants to obtain through the genetic algorithm according to the actual situation, and this can also be used as a termination condition for the iteration of the genetic algorithm.
Obtaining each generation of progeny population of the initial generation population through the genetic algorithm is an inherent function of the genetic algorithm, and for convenience of understanding the related concepts in this embodiment, the genetic algorithm needs to be described in the following steps:
genetic algorithms are typically implemented as a computer simulation. For an optimization problem, a population of abstract representations (called chromosomes) of a certain number of candidate solutions (called individuals) evolves towards better solutions. Traditionally, solutions are represented in binary (i.e., strings of 0's and 1's), but other methods of representation are possible. Evolution starts with a population of completely random individuals, followed by one generation. In each generation, fitness of the entire population is evaluated, a number of individuals are randomly selected from the current population, and a new life population is generated by natural selection and mutation, which becomes the current population (the current generation population) in the next iteration of the algorithm.
Referring to fig. 7, as shown, the implementation of a basic genetic algorithm needs to include the following processes:
initializing a population, detecting fitness, judging whether an iteration termination condition is met, and outputting a result if the iteration termination condition is met; if not, selecting heredity and cross variation; and further obtaining a new population and carrying out fitness detection in a circulating manner.
Referring to fig. 3, in an embodiment, the primary population includes a plurality of primary individuals; the step S20 includes:
s21, inputting the initial generation population into a preset genetic algorithm model, and determining random values corresponding to genes of each initial generation individual;
in this example, the individual genes may be represented in binary, i.e., 1 and 0 represent the genes. After the initial generation population is input into the genetic algorithm model, the random values r corresponding to the genes of the initial generation individuals in the initial generation population can be randomly determined i The purpose of this is to mimic the randomness of biological genetic variation in biology, where the range of random values may be (0, 1).
Step S22, determining the current gene mutation probability in the genetic algorithm model, and comparing the random value with the current gene mutation probability to determine whether the gene is a gene to be mutated;
in the genetic algorithm model, the gene mutation maximum probability and the gene mutation minimum probability input by the user may be included, the current gene mutation probability may be randomly determined in an interval formed by the gene mutation maximum probability and the gene mutation minimum probability, and the gene mutation maximum probability or the gene mutation minimum probability may also be used as the current gene mutation probability, for example: the maximum probability of genetic variation is 0.1, and the minimum probability of genetic variation is 0.05, so that the current probability of genetic variation can be any value in the probability interval [0.05,0.1 ]. The self-adaptation of the genetic variation can be realized to a certain extent through the form of the probability interval, and the local optimal solution is avoided. Because the invention also adopts the simulated annealing algorithm, the current genetic variation probability can be changed by combining the simulated annealing algorithm in the population iteration process, thereby realizing the self-adaption of the genetic variation probability and the population diversity. The current genetic variation probability is for a certain population, that is, whether the gene of the next generation individual is varied or not is determined according to the corresponding current genetic variation probability in the iterative process of the population.
In determiningAfter the current gene mutation probability is obtained, each gene of each individual is compared with the current gene mutation probability respectively, and the random value r i Less than the current gene mutation probability P m When is, i.e. r i <P m . Or may be at a random value r i Greater than the current gene mutation probability P m When the corresponding gene is to be mutated, the gene is determined as the gene to be mutated. Correspondingly, i.e., the coding position of the gene is changed, the individual chromosome string is assumed to be s = a 1 a 2 a 3 …a l Wherein a is 1 a 2 a 3 Each gene in the chromosome is represented, and the corresponding gene can be mutated into:
Figure BDA0003975304360000121
the formula (2) shows that at the random value r i Less than the current genetic variation probability m Then, the corresponding gene is changed to 1 if it codes for 0, and to 0 if it codes for 1. And when the random value is greater than or equal to the current gene mutation probability, the original gene code is kept, namely the corresponding gene does not have mutation. Thus, randomness simulating genetic variation in a biological sense is realized.
Step S23, if the gene is a gene to be mutated, determining a mutated gene corresponding to the gene;
if the corresponding gene is determined to be the gene to be mutated, the gene code of the gene is converted, if the corresponding gene is binary code, namely 0 to 1 or 1 to 0, and if the corresponding gene is other types of codes, the gene code can also be converted into the gene code of the form.
Step S24, changing the gene into the variant gene when the chromosomes of the primary individuals are crossed to obtain a filial generation population corresponding to the primary population;
in the iterative process of the initial generation population or other populations, variation exists and chromosome crossing also exists, and the gene to be varied, which needs to be varied, is changed into a variation gene in the process of carrying out chromosome crossing among the initial generation individuals. And obtaining the offspring population corresponding to the primary population after crossing and mutation.
Whether chromosomes need to be crossed depends on the current crossing probability in the genetic algorithm model, the current crossing probability can be a probability interval formed by a preset maximum crossing probability and a preset minimum crossing probability, for example, the preset maximum crossing probability is 0.5, the preset minimum crossing probability is 0.05, then the probability interval is [0.05,0.5], a consistent value can be arbitrarily taken from the probability interval as the current crossing probability, correspondingly, each individual in the population can be crossed according to the current crossing probability when iteration is carried out, or individuals with high fitness (greater than a preset fitness threshold or greater than the population average fitness) are selected to be crossed according to the current crossing probability.
To more intuitively understand crossover and variation in computer languages, reference may be made to fig. 8, in which X1 and X2 represent two individuals in the primary population, the corresponding binary code strings represent chromosomes of the individuals, and binary codes 1 and 0 represent genes. The binary form of the gene code can be relatively intuitively recognized from the figure, and the mutation is to convert the corresponding gene code into another value, i.e., 0 to 1 or 1 to 0. The offspring individuals Y1 and Y2 are obtained by carrying out chromosome crossing on X1 and X2, and the chromosomes of Y1 and Y2 are seen to be transformed in the fifth gene at the left due to the crossing.
And S25, taking the filial generation population as the initial generation population, and circularly executing the step of determining the random values corresponding to the genes of the initial generation individuals respectively to obtain the filial generation populations of different generations.
Before the termination condition of iteration is not reached, the child population is required to be used as the initial generation population, and then the steps S21 to S25 are executed in a circulating manner, so that the multi-generation population is obtained. According to the embodiment, a plurality of populations with richer diversity are obtained through heredity, intersection and variation, a plurality of selectable path planning information are determined from the iteration overall situation, and then comparison is carried out among the populations, so that an overall optimal solution, namely the total distance of the shortest paths in the whole iteration process is obtained.
Referring to fig. 4, in an embodiment, the step S22 of determining the current genetic variation probability in the genetic algorithm model includes:
step S220, judging the current generation number of the current generation group; wherein the contemporary population represents a newly obtained population;
step S230, if the current generation is a generation, using a preset gene mutation probability as the current gene mutation probability in the genetic algorithm model.
In this embodiment, the current generation number of the current generation population is determined, and the first generation population is obtained from the beginning according to each distance value, and so on. The present generation population in this embodiment may be the most recently generated and obtained population. If the current generation is a generation, that is, the initial generation population, a preset genetic variation probability may be used as the current genetic variation probability in the genetic algorithm model, where the preset genetic variation probability may be set according to actual needs, for example, 0.2, and is not limited herein. In addition, an interval composed of the gene mutation maximum probability and the gene mutation minimum probability input by the user can be randomly selected as a preset gene mutation probability as the current gene mutation probability. The embodiment ensures the predictability of the iteration from the initial generation population and the diversity of the generated various offspring populations, thereby realizing the purpose of heredity.
Referring to fig. 5, in an embodiment, after the step S220 of determining the current generation number of the current generation group, the method further includes:
step S221, if the current algebra is larger than one generation, acquiring the total distance of each path of the current generation population;
if the current generation number is larger than one generation, namely the child population which is generated by continuous iteration after the corresponding initial generation population, the total distance of each path of the current generation population, namely the individuals of the current generation population, is obtained.
Step S222, determining the path average distance of the contemporary population according to the total distance of each path;
and accumulating and calculating the total distance of each path, and dividing the total distance by the corresponding individual number to obtain and determine the path average distance of the contemporary population.
Step S223, determining a total target path distance greater than the average path distance in the total path distances and the number of paths of the total target path distance;
determining the total distance of the paths corresponding to the individuals in the current generation population as a target total distance of the paths and a target individual according to whether the total distance of the paths is greater than the average distance of the paths, determining the total distance of the paths as a non-target total distance of the paths and a non-target individual according to whether the total distance of the paths is less than or equal to the average distance of the paths, and counting the number of the paths of the target total distance of the paths, for example, the total distance of the paths corresponding to 30 individuals in one population is greater than the average distance of the paths of the one population.
Step S224, if the number of the paths is smaller than a preset number threshold, determining a target individual corresponding to the total distance of the target paths in the contemporary population;
the preset number threshold may be set according to actual needs, for example, half or one third of the number of individuals, which is not limited herein. When the number of the paths is smaller than a preset number threshold, a target individual corresponding to the total distance of the target paths in the current generation population can be determined, the target individual serving as an individual with better fitness can be used as an individual participating in iterative optimization, and other non-target individuals can not be subjected to iteration of the next generation population. When the number of the paths is smaller than the preset number threshold, the diversity of the population is poor, the search space is limited, the population is easy to fall into a local optimal solution, at the moment, a new species can be introduced to enhance the variation difference, and the variation operation can be carried out according to the self-adaptive variation, if the number of the paths is larger than or equal to the preset number threshold, the diversity of the population is good, and the advance convergence generally does not occur. The next operation, i.e., no processing, may not be performed.
Step S225, determining the current genetic variation probability of the target individual in the genetic algorithm model according to the maximum genetic variation probability and the minimum genetic variation probability in the genetic algorithm model, and the total iteration number and the current generation number corresponding to the current generation population.
Taking into account the cross probability P c And probability of mutation P m Affecting the convergence of the algorithm. When P is present c 、P m When the solution is larger, the convergence rate is higher, and part of individuals with higher fitness are damaged, so that the solution is easy to fall into a local optimal solution; and P is c 、P m When the value is smaller, the speed of generating a new individual is slower, and the search stagnation is easy to occur. Therefore, P is selected using an adaptive principle c 、P m That is, the current genetic variation probability of the target individual in the genetic algorithm model is determined according to the maximum probability and the minimum probability of genetic variation in the genetic algorithm model, and the total iteration number and the current generation number corresponding to the current population.
The calculation formula corresponding to step S225 is:
Figure BDA0003975304360000151
in the formula (3), F avg As population mean fitness (path mean distance), P m_max 、P m_min The maximum probability of genetic variation and the minimum probability of genetic variation are respectively; it max is the total iteration number, iter is the current generation number, and F is the individual fitness (total distance of the path).
From equation (3), it can be seen that for the target individual, the probability of genetic variation can be gradually reduced to avoid premature convergence.
From the formula (3), it can also be seen that for non-target individuals, because the fitness of the non-target individuals is poor, the current genetic variation probability corresponding to the non-target individuals can be set as the maximum probability of genetic variation to improve the population diversity of the individuals after iteration.
Likewise, determining the current crossover probability of the target individual in the genetic algorithm model may be: determining the current cross probability of the target individual in the genetic algorithm model according to a preset maximum cross probability and a preset minimum cross probability in the genetic algorithm model and a total iteration number and the current iteration number corresponding to the current generation population, wherein the current cross probability can be expressed as:
Figure BDA0003975304360000152
in the formula (4), F avg Is the population mean fitness (path mean distance), P c_max 、P c_min Respectively representing a preset maximum cross probability and a preset minimum cross probability; it max is the total iteration number, iter is the current generation number, and F is the individual fitness (total distance of the path).
From equation (4), it can be seen that for the target individual, the probability of its intersection can be gradually reduced to avoid premature convergence.
From the formula (4), it can also be seen that for non-target individuals, because the fitness of the non-target individuals is poor, the current crossover probability corresponding to the non-target individuals can be set as the preset maximum crossover probability to improve the iterative population diversity of the individuals.
By the embodiment, the problem of population diversity is fully considered, the genes and the cross probability are self-adapted in the mode of the probability interval, under the condition that the population diversity ratio is poor, the probability of cross and gene variation is timely adjusted in the iterative process in an adaptive mode, the diversity of the population is sequentially enhanced, the cross and variation probability of target individuals with good adaptability is gradually reduced, non-target individuals with poor adaptability are endowed with higher cross and variation probability, different individuals in the comprehensive population are respectively subjected to adaptive processing, and therefore a more reliable global optimal solution can be obtained in the iterative process.
In an embodiment, after the step of determining the target individual corresponding to the total distance of the target path, the method further includes:
and determining non-target individuals in the contemporary population, and taking the gene variation maximum probability as the current gene variation probability of the non-target individuals in the genetic algorithm model.
For non-target individuals in the current generation population, the maximum probability of genetic variation is used as the current probability of genetic variation of the non-target individuals in the genetic algorithm model, so as to enhance the diversity of the offspring individuals generated by the non-target individuals, and similarly, the cross probability is also set to be maximum, and the specific process is combined with the above embodiment, formula (3) and formula (4), which is not described herein again.
Referring to fig. 6, in an embodiment, after the step of determining the current gene variation probability in the genetic algorithm model in step S22, the method further includes:
step S1000, determining the offspring population corresponding to the current generation population, and determining the total distance of the shortest path in the offspring population;
in this embodiment, based on the current generation population and the corresponding offspring population, the shortest path total distance (optimal solution) between the two is compared;
step S2000, if the total distance of the shortest paths in the current generation population is smaller than the total distance of the shortest paths in the later generation population, determining the corresponding mutation probability based on the simulated degradation algorithm and a preset exponential cooling rule;
if the total shortest path distance in the current generation population is greater than or equal to the total shortest path distance in the descendant population, namely the fitness in the current generation population is less than or equal to the fitness in the descendant population, the situation that the descendant population is stronger than the current generation population in the optimal solution is reflected, the iterative optimization accords with the user expectation, and the current gene change probability can be kept from being adjusted at the moment. This part of the process can be referred to as equation (6) below.
If the total distance of the shortest paths in the current generation population is smaller than the total distance of the shortest paths in the offspring population, that is, the fitness in the current generation population is greater than the fitness in the offspring population, it is reflected that the offspring population starts to be inferior to the current generation population on the optimal solution, and thus the optimal solution is inevitably converged in advance and falls into a local optimal solution after the method is continued. To avoid this situation persisting, a simulated degradation algorithm is introduced:
Figure BDA0003975304360000171
in the formula (5), t represents a temperature control parameter, the Monte Carlo formula P (i- > j) is a genetic variation probability, the value range (0, 1) can be used as the minimum probability of the genetic variation or directly used as the current genetic variation probability, the attenuation mode of t determines the variation speed and accuracy, f (j) is an initial solution (the optimal solution of the current generation population, namely the total shortest path distance), and f (i) is an objective function (the optimal solution of the later generation population, namely the total shortest path distance).
As shown in equation (5), when the optimal solution of the current generation population is less than or equal to the optimal solution of the offspring population, 1 represents that the current gene variation probability is maintained. When the optimal solution of the contemporary population is greater than the optimal solution of the offspring population, the probability is determined
Figure BDA0003975304360000172
As the gene variation minimum probability or directly as the current gene variation probability.
This embodiment also employs an exponential cooling rule, which is denoted t = δ n T 0 (6) In the formula (6), a constant delta epsilon (0, 1) is formed, n is the cycle number of the simulated annealing algorithm, and T is 0 Initial temperature > 0. Substituting equation (6) into equation (5) yields:
Figure BDA0003975304360000173
the content of the change in equation (7) compared to equation (5) is
Figure BDA0003975304360000174
Become->
Figure BDA0003975304360000175
By combining the formula (5), the formula (6) and the formula (7), it can be seen that as the iteration times increase, the corresponding cycle times n increase, the value t gradually decreases, and the corresponding gene variation minimum probability or the current gene variation probability gradually increases, so that the diversity of the iterative population is continuously improved, the self-adaptation of the gene variation probability is further enhanced, the self-adaptation is closely associated with the population diversity, and the gene variation probability is timely adjusted under the condition that the population diversity is poor or gradually worsened, so that the finally obtained global optimal solution reaches the user expectation or is even higher than the user expectation.
In the embodiment, the population searching capability is ensured by a mode of simulating an annealing algorithm (Metropolis criterion), and the situation that a local optimal solution is trapped is avoided.
Step S3000, determining a corresponding mutation probability based on the simulated degradation algorithm and a preset exponential cooling rule as the gene mutation minimum probability in the genetic algorithm model, and circularly performing the step of obtaining the total distance of each path of the contemporary population.
And determining the corresponding variation probability as the minimum probability of the genetic variation by using the simulated degradation algorithm and the preset index cooling rule, so that the current genetic variation probability can be limited to be higher than the variation probability, and when the iterative population diversity begins to deteriorate in the process of comparing the current generation population with the offspring population, the genetic variation probability is timely and gradually improved, so that the diversity of the subsequent population is improved, the local optimal solution is avoided, the global optimal solution is obtained, and the global shortest planning total distance corresponding to the optimal individual in each population is also obtained. The minimum probability of genetic variation is determined through the simulated annealing algorithm, and then the step S200 and the subsequent steps are executed in a circulating manner, so that the probability of genetic variation is continuously self-adapted under the probability interval and the rules of the simulated annealing algorithm, and a better solution compared with the traditional genetic algorithm is obtained, namely a shorter total path planning distance and corresponding target path planning information are obtained.
Step S30, determining a target child population in the child population according to the total shortest path distance in each child population;
during the iteration, the end condition of the iteration is reached, such as the number of iterations reaching the maximum number of iterations, or during the iteration fromWhen one or more individuals in the population reach the expected planning total distance, a multi-generation offspring population is obtained. And (3) extracting the fitness optimal solution in each generation of (individual) filial generation population and comparing the fitness optimal solution to determine a global optimal solution, wherein the filial generation population corresponding to the global optimal solution is the target filial generation population. It should be noted that the fitness of an individual is related to the total distance of the path of the individual, that is, the fitness function can be expressed as:
Figure BDA0003975304360000181
wherein F (x) i ) The fitness of the individual is represented, N is the number of individuals in the population, and distance represents the total path distance corresponding to the individual, and as can be seen, the fitness is higher when the total path distance is shorter, and conversely, the fitness is lower, and in this embodiment, the fitness may also be represented by the total path distance directly. And comparing the fitness of each individual in the child population to determine the total shortest path distance in the child population, and comparing the total shortest path distances corresponding to the child populations to determine the total global shortest path distance.
In an embodiment, the step S30 includes:
step S31, taking each filial generation population as a current generation population respectively, and determining a previous generation population and a subsequent generation population which are adjacent to the current generation population;
in the iteration process, each child population can be used as a current generation population (current population), and the current generation population is compared with a previous generation population directly generating the current generation population through iteration and a child population directly generating the current generation population through iteration, and specifically, the total distance of shortest paths in the three generation populations can be compared.
Step S32, if the total shortest path distance of the current generation population is greater than the total shortest path distance of the previous generation population and greater than the shortest path corresponding to the descendant population, determining that the current generation population is a target descendant population in the descendant population.
If the total shortest path distance of the current generation population is greater than the total shortest path distance of the previous generation population and greater than the shortest path corresponding to the descendant population, it can be shown that if the iteration is continued next, the total shortest planned distance corresponding to the target descendant population is the global optimal solution, and the corresponding target path planning information is also the more optimal path planning, so that the genetic algorithm can be terminated when the generation of the descendant population corresponding to the current generation population is reached, the current generation population is taken as the target descendant population, and the total distribution distance can be greatly shortened for the logistics distribution according to the target path planning information, thereby improving the distribution efficiency and greatly reducing the distribution cost.
And S40, outputting target path planning information corresponding to the target child population.
The target path planning information corresponding to the target child population refers to rules including how to move, and colloquially, the target path planning information includes target path planning information of moving sequences of various places. Because the shortest planning total distance corresponding to the target offspring population is a global optimal solution, the moving efficiency can be greatly improved under the guidance of the target path planning information, the blindness of path planning is avoided for logistics distribution, the total distribution route is shortened, the manual planning work is omitted, the distribution efficiency is greatly improved, and the distribution cost is reduced.
The invention is mainly based on combining genetic algorithm and path planning, and provides a concept of genetic variation probability self-adaption, a user sets a plan of current path planning, a plurality of distance values between each target location are obtained through the target locations covered by the current path planning, the plurality of distance values are randomly generated into an initial generation population with various initial path planning information, initial generation individuals in the initial generation population represent the initial path planning information, and then iterative behaviors such as heredity, intersection, variation and the like are carried out through the genetic algorithm to obtain a plurality of offspring populations, in the process of iteration, the genetic variation probability corresponding to each individual in each population is not always fixed, but is changed based on the diversity of the population, namely the genetic variation probability has a self-adaption process, particularly, the self-adaptation is carried out through a preset simulated annealing algorithm, so that the situation that the current path planning is expected by a user is avoided, the situation that a population and individuals with low adaptability are obtained due to early convergence of a genetic algorithm is prevented, the genetic algorithm with basically fixed mutation probability is improved based on the genetic mutation probability and the simulated annealing algorithm in the invention, the improved genetic algorithm is applied to specific path planning, compared with the traditional path planning scheme based on the genetic algorithm, the population and the individuals with higher adaptability are obtained, namely, the total distance of the path planning is determined to be shorter, in the process of carrying out the genetic mutation self-adaptation through population iteration, the path planning efficiency is greatly improved, the target search of the global optimal path (target path planning information) is realized, and the behaviors of carrying out logistics distribution and the like based on the obtained target path planning information are further reached, the path distance is greatly shortened, the logistics distribution efficiency is improved, and the logistics transportation cost is saved.
In order to further verify the effect of the optimized genetic algorithm-based model in the present invention, the following simulation tests were performed with reference to table 1 below:
Figure BDA0003975304360000201
TABLE 1
As shown in table 1, first, 32 points are numbered. And taking the number 1 as a distribution starting point, and returning to the planning problem of the shortest distribution route with the number 1 after 32 distribution places. The population number of individuals is set to be 200, the maximum iteration number is 400 times, the initial population cross probability is 0.95, and the initial variation probability is 0.3.
1) Position coordinates of 32 delivery locations are initialized:
Position[32]={{100,100},{200,100},{300,100},{400,100},{500,100},{600,100},{100,220},{200,200},{300,200},{400,180},{500,190},{600,195},{100,300},{300,300},{400,300},{200,280},{500,300},{600,300},{100,410},{200,390},{300,390},{400,400},{500,400},{100,500},{200,500},{300,500},{400,500},{500,500},{200,600},{300,600},{400,600},{500,600}};
2) Calculating distance values distance [ i ] [ j ] between each location and the other location; i, j respectively represent different places;
3) Generating a primary population, and inputting the primary population into a genetic algorithm model to calculate an adaptive value (degree);
4) The optimal fitness (optimal solution) is obtained through cross mutation iteration, and the mutation probability self-adapting based on the simulated annealing algorithm is adopted in the iteration process
Figure BDA0003975304360000211
The automatic acquisition of fitness is realized, and 400 iterations are performed;
5) Obtaining the optimal path (Global shortest planning total distance)
Similarly, the traditional genetic algorithm is also adopted to carry out iterative optimization on the path planning of the 32 places to obtain an optimal solution.
The path plan obtained for the conventional genetic algorithm is shown in fig. 9, the path plan obtained for the present invention is shown in fig. 10, and the optimal path distance obtained by the conventional genetic algorithm is 3342, whereas the optimal path distance obtained by the present invention is 3258. And the convergence performance of the two is very different, as shown in table 2:
Figure BDA0003975304360000212
therefore, the total distance of the path planning is shown in the path planning by the traditional genetic algorithm, and the iteration time, the precocity times and the iteration times for obtaining the optimal solution show that the genetic algorithm is applied to the logistics distribution field in the aspects of the optimal solution, the convergence performance and the efficiency for obtaining the optimal solution by the traditional genetic algorithm, so that the logistics distribution efficiency is greatly improved, and the logistics distribution cost is reduced.
In addition, referring to fig. 11, fig. 11 is a schematic diagram of a frame structure of the path planning apparatus of the present invention. The invention also provides a path planning device, which comprises:
the distance operation module A10 is used for acquiring each target location associated with the current path planning and determining a distance value between each target location;
the genetic iteration module A20 is used for generating an initial generation population based on each distance value and inputting the initial generation population into a preset genetic algorithm model to obtain offspring populations of different generations; the genetic variation probability in the genetic algorithm model is self-adaptive based on a preset simulated annealing algorithm;
the path output module a30 is configured to determine a target child population in each child population according to the total shortest path distance in each child population; and outputting target path planning information corresponding to the target child population.
Optionally, the distance operation module a10 is further configured to:
acquiring position coordinates of each target location associated with the current path planning; wherein the destination location comprises a start point and an end point and a stop point between the start point and the end point;
and determining distance values among the target positions according to the position coordinates.
Optionally, the genetic iteration module a20 is further configured to:
inputting the initial generation population into a preset genetic algorithm model, and determining random values corresponding to genes of each initial generation individual;
determining the current gene mutation probability in the genetic algorithm model, and comparing the random value with the current gene mutation probability to determine whether the gene is a gene to be mutated;
if the gene is a gene to be mutated, determining a mutated gene corresponding to the gene;
changing the gene into the variant gene when the chromosomes of each primary generation individual are crossed to obtain a filial generation population corresponding to the primary generation population;
and taking the filial generation population as the initial generation population, and circularly executing the step of determining random values corresponding to the genes of the initial generation individuals respectively to obtain the filial generation populations of different generations.
Optionally, the genetic iteration module a20 is further configured to:
judging the current generation number of the current generation population; wherein the contemporary population represents a newly obtained population;
and if the current generation is a generation, taking a preset gene mutation probability as the current gene mutation probability in the genetic algorithm model.
Optionally, the genetic iteration module a20 is further configured to:
if the current algebra is larger than one algebra, acquiring the total distance of each path of the current algebra population;
determining the average distance of the paths of the contemporary population according to the total distance of the paths;
determining a target path total distance which is greater than the path average distance in the path total distances and the path number of the target path total distance;
if the number of the paths is smaller than a preset number threshold, determining a target individual corresponding to the total distance of the target paths in the contemporary population;
and determining the current genetic variation probability of the target individual in the genetic algorithm model according to the maximum genetic variation probability and the minimum genetic variation probability in the genetic algorithm model and the total iteration number and the current iteration number corresponding to the current generation population.
Optionally, the genetic iteration module a20 is further configured to:
and determining non-target individuals in the contemporary population, and taking the gene variation maximum probability as the current gene variation probability of the non-target individuals in the genetic algorithm model.
Optionally, the genetic iteration module a20 is further configured to:
determining a descendant population corresponding to the current generation population, and determining the total distance of the shortest path in the descendant population;
if the total shortest path distance in the current generation population is smaller than the total shortest path distance in the descendant population, determining the corresponding mutation probability based on the simulated degradation algorithm and a preset exponential cooling rule;
and determining a corresponding mutation probability based on the simulated degradation algorithm and a preset index cooling rule as the gene mutation minimum probability in the genetic algorithm model, and circularly executing the step of obtaining the total distance of each path of the contemporary population.
Optionally, the path output module a30 is further configured to:
respectively taking each filial generation population as a current generation population, and determining a previous generation population and a descendant population which are adjacent to the current generation population algebra;
and if the total shortest path distance of the current generation population is greater than the total shortest path distance of the previous generation population and greater than the shortest path corresponding to the descendant population, determining that the current generation population is a target descendant population in the descendant population.
The specific implementation of the path planning apparatus of the present invention is substantially the same as the embodiments of the path planning method described above, and is not described herein again.
In addition, the invention also provides a computer readable storage medium. The computer readable storage medium of the present invention stores a path planning program, wherein when the path planning program is executed by the processor, the steps of the path planning method as described above are implemented.
The method implemented when the path planning program is executed may refer to the embodiments of the path planning method of the present invention, and is not described herein again.
As will be appreciated by one skilled in the art, embodiments of the present invention may be provided as a method, system, or computer program product. Accordingly, the present invention may take the form of an entirely hardware embodiment, an entirely software embodiment or an embodiment combining software and hardware aspects. Furthermore, the present invention may take the form of a computer program product embodied on one or more computer-usable storage media (including, but not limited to, disk storage, CD-ROM, optical storage, and the like) having computer-usable program code embodied therein.
The present invention is described with reference to flowchart illustrations and/or block diagrams of methods, apparatus (systems), and computer program products according to embodiments of the invention. It will be understood that each flow and/or block of the flowchart illustrations and/or block diagrams, and combinations of flows and/or blocks in the flowchart illustrations and/or block diagrams, can be implemented by computer program instructions. These computer program instructions may be provided to a processor of a general purpose computer, special purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, create means for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be stored in a computer-readable memory unit that can direct a computer or other programmable data processing apparatus to function in a particular manner, such that the instructions stored in the computer-readable memory unit produce an article of manufacture including instruction means which implement the function specified in the flowchart flow or flows and/or block diagram block or blocks.
These computer program instructions may also be loaded onto a computer or other programmable data processing apparatus to cause a series of operational steps to be performed on the computer or other programmable apparatus to produce a computer implemented process such that the instructions which execute on the computer or other programmable apparatus provide steps for implementing the functions specified in the flowchart flow or flows and/or block diagram block or blocks.
It should be noted that in the claims, any reference signs placed between parentheses shall not be construed as limiting the claim. The word "comprising" does not exclude the presence of elements or steps not listed in a claim. The word "a" or "an" preceding an element does not exclude the presence of a plurality of such elements. The invention can be implemented by means of hardware comprising several distinct elements, and by means of a suitably programmed computer. In the unit claims enumerating several means, several of these means can be embodied by one and the same item of hardware. The usage of the words first, second and third, etcetera do not indicate any ordering. These words may be interpreted as names.
While preferred embodiments of the present invention have been described, additional variations and modifications in those embodiments may occur to those skilled in the art once they learn of the basic inventive concepts. Therefore, it is intended that the appended claims be interpreted as including the preferred embodiment and all changes and modifications that fall within the scope of the invention.
The above description is only a preferred embodiment of the present invention, and is not intended to limit the scope of the present invention, and all modifications and equivalents of the present invention, which are made by the contents of the present specification and the accompanying drawings, or directly/indirectly applied to other related technical fields, are included in the scope of the present invention.

Claims (10)

1. A path planning method, characterized in that the path planning method comprises the steps of:
acquiring each target location associated with the current path planning, and determining a distance value between each target location;
generating an initial generation population based on each distance value and inputting the initial generation population into a preset genetic algorithm model to obtain the offspring populations of different generations; the genetic variation probability in the genetic algorithm model is self-adaptive based on a preset simulated annealing algorithm;
determining a target child population in the child population according to the total shortest path distance in each child population;
and outputting target path planning information corresponding to the target child population.
2. The path planning method according to claim 1, wherein the step of obtaining each destination point associated with the current path plan and determining a distance value between each destination point comprises:
acquiring position coordinates of each target location associated with the current path planning; wherein the destination location comprises a start point and an end point and a stop point between the start point and the end point;
and determining distance values among the target positions according to the position coordinates.
3. A path planning method according to claim 1 in which the primary population comprises a plurality of primary individuals; the step of inputting the initial generation population into a preset genetic algorithm model to obtain the offspring populations of different generations comprises the following steps:
inputting the initial generation population into a preset genetic algorithm model, and determining random values corresponding to genes of each initial generation individual;
determining the current gene mutation probability in the genetic algorithm model, and comparing the random value with the current gene mutation probability to determine whether the gene is a gene to be mutated;
if the gene is a gene to be mutated, determining a mutated gene corresponding to the gene;
changing the gene into the variant gene when the chromosomes of each initial generation individual are crossed so as to obtain a progeny population corresponding to the initial generation population;
and taking the filial generation population as the initial generation population, and circularly executing the step of determining random values corresponding to the genes of the initial generation individuals respectively to obtain the filial generation populations of different generations.
4. The path planning method according to claim 3, wherein the step of determining the current genetic variation probability in the genetic algorithm model comprises:
judging the current generation number of the current generation population; wherein the contemporary population characterizes a newly acquired population;
and if the current generation is a generation, taking a preset gene mutation probability as the current gene mutation probability in the genetic algorithm model.
5. The path planning method of claim 4, wherein after the step of determining the current generation number of the current generation group, the method further comprises:
if the current algebra is larger than one algebra, acquiring the total distance of each path of the current algebra population;
determining the average distance of the paths of the contemporary population according to the total distance of the paths;
determining a target path total distance which is greater than the path average distance in the path total distances and the number of paths of the target path total distance;
if the number of the paths is smaller than a preset number threshold, determining a target individual corresponding to the total distance of the target paths in the contemporary population;
and determining the current genetic variation probability of the target individual in the genetic algorithm model according to the maximum genetic variation probability and the minimum genetic variation probability in the genetic algorithm model and the total iteration number and the current iteration number corresponding to the current generation population.
6. The path planning method according to claim 5, wherein after the step of determining the target individual corresponding to the total distance of the target path, the method further comprises:
and determining non-target individuals in the contemporary population, and taking the gene variation maximum probability as the current gene variation probability of the non-target individuals in the genetic algorithm model.
7. The path planning method according to claim 5, wherein after the step of determining the current genetic variation probability in the genetic algorithm model, the method further comprises:
determining a descendant population corresponding to the current generation population, and determining the total distance of the shortest path in the descendant population;
if the total shortest path distance in the current generation population is smaller than the total shortest path distance in the descendant population, determining the corresponding mutation probability based on the simulated degradation algorithm and a preset exponential cooling rule;
and determining a corresponding mutation probability based on the simulated degradation algorithm and a preset index cooling rule as the gene mutation minimum probability in the genetic algorithm model, and circularly executing the step of obtaining the total distance of each path of the contemporary population.
8. The method for path planning according to claim 1, wherein the step of determining the target child population in the child population according to the total shortest path distance in each child population includes:
respectively taking each filial generation population as a current generation population, and determining a previous generation population and a descendant population which are adjacent to the current generation population;
and if the total shortest path distance of the current generation population is greater than the total shortest path distance of the previous generation population and greater than the shortest path corresponding to the descendant population, determining that the current generation population is a target descendant population in the descendant population.
9. A smart device comprising a processor, a storage unit, and a path planning program stored on the storage unit and executable by the processor, wherein the path planning program, when executed by the processor, implements the steps of the path planning method of any one of claims 1 to 8.
10. A computer-readable storage medium, having a path planning program stored thereon, wherein the path planning program, when executed by a processor, implements the steps of the path planning method according to any one of claims 1 to 8.
CN202211533427.9A 2022-12-01 2022-12-01 Path planning method, intelligent device and computer readable storage medium Pending CN115965169A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211533427.9A CN115965169A (en) 2022-12-01 2022-12-01 Path planning method, intelligent device and computer readable storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211533427.9A CN115965169A (en) 2022-12-01 2022-12-01 Path planning method, intelligent device and computer readable storage medium

Publications (1)

Publication Number Publication Date
CN115965169A true CN115965169A (en) 2023-04-14

Family

ID=87358974

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211533427.9A Pending CN115965169A (en) 2022-12-01 2022-12-01 Path planning method, intelligent device and computer readable storage medium

Country Status (1)

Country Link
CN (1) CN115965169A (en)

Cited By (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116151505A (en) * 2023-04-20 2023-05-23 深圳市明源云科技有限公司 Cell line planning method and device, electronic equipment and readable storage medium
CN116934205A (en) * 2023-09-15 2023-10-24 成都工业职业技术学院 Public-iron hollow shaft spoke type logistics network optimization method
CN117087170A (en) * 2023-10-17 2023-11-21 西安空天机电智能制造有限公司 3D printing path planning method, device, computer equipment and storage medium
CN117575123A (en) * 2024-01-15 2024-02-20 成都电科星拓科技有限公司 Sowing path planning method, sowing path planning device, electronic equipment and readable storage medium

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN116151505A (en) * 2023-04-20 2023-05-23 深圳市明源云科技有限公司 Cell line planning method and device, electronic equipment and readable storage medium
CN116151505B (en) * 2023-04-20 2023-08-04 深圳市明源云科技有限公司 Cell line planning method and device, electronic equipment and readable storage medium
CN116934205A (en) * 2023-09-15 2023-10-24 成都工业职业技术学院 Public-iron hollow shaft spoke type logistics network optimization method
CN116934205B (en) * 2023-09-15 2024-04-19 成都工业职业技术学院 Public-iron hollow shaft spoke type logistics network optimization method
CN117087170A (en) * 2023-10-17 2023-11-21 西安空天机电智能制造有限公司 3D printing path planning method, device, computer equipment and storage medium
CN117087170B (en) * 2023-10-17 2024-03-12 西安空天机电智能制造有限公司 3D printing path planning method, device, computer equipment and storage medium
CN117575123A (en) * 2024-01-15 2024-02-20 成都电科星拓科技有限公司 Sowing path planning method, sowing path planning device, electronic equipment and readable storage medium
CN117575123B (en) * 2024-01-15 2024-03-29 成都电科星拓科技有限公司 Sowing path planning method, sowing path planning device, electronic equipment and readable storage medium

Similar Documents

Publication Publication Date Title
CN115965169A (en) Path planning method, intelligent device and computer readable storage medium
CN110389819B (en) Method and system for scheduling calculation intensive batch processing tasks
Shen et al. Mathematical modeling and multi-objective evolutionary algorithms applied to dynamic flexible job shop scheduling problems
CN112035116B (en) Agent modeling method for multi-target compiling optimization sequence selection
CN109271320B (en) Higher-level multi-target test case priority ordering method
CN111611274A (en) Database query optimization method and system
CN104866904A (en) Parallelization method of BP neural network optimized by genetic algorithm based on spark
WO2019154215A1 (en) Robot running path generation method, computing device and storage medium
CN113128432B (en) Machine vision multitask neural network architecture searching method based on evolution calculation
CN110909787A (en) Method and system for multi-objective batch scheduling optimization based on clustering evolutionary algorithm
CN117077981B (en) Method and device for distributing stand by fusing neighborhood search variation and differential evolution
CN115617690A (en) Parallel test task scheduling method based on improved adaptive genetic algorithm
CN109582985A (en) A kind of NoC mapping method of improved genetic Annealing
CN110705758B (en) Underwater network-oriented network element optimization layout method
JP7137074B2 (en) Optimization calculation method, optimization calculation device, and optimization calculation program
CN110222816B (en) Deep learning model establishing method, image processing method and device
CN112148030B (en) Underwater glider path planning method based on heuristic algorithm
CN115455899A (en) Analytic layout method based on graph neural network
CN113220437B (en) Workflow multi-target scheduling method and device
CN113487031A (en) Multi-unmanned aerial vehicle task allocation method based on improved simulated annealing fusion genetic algorithm
CN115494840A (en) Monte Carlo factor-based MC-IACO welding robot path planning method
CN107480768A (en) Bayesian network structure adaptive learning method and device, storage device and terminal device
CN113419532A (en) Path planning ant colony algorithm parameter selection method based on uniform design
CN113051938A (en) Machine translation model optimization method based on Transformer model
CN113741482B (en) Multi-agent path planning method based on asynchronous genetic algorithm

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination