A path planning method and device based on a multi-factor genetic algorithm
Patent Information
- Application Number
- CN202610584278.0
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-04-29
- Publication Date
- 2026-08-18
AI Technical Summary
但是传统的路径算法普遍存在单一路径求解时遍历节点多,时间复杂度随网络规模呈指数级增长的问题;难以一次性处理多维约束,需多次后处理修正,导致可行率降低;面对并发任务时只能串行或粗粒度并行处理,计算资源利用率低,响应延迟显著;仅通过横向扩展服务器数量提升并发能力,带来高昂能耗与通信开销;缺乏任务间知识共享机制,相同或相似子问题被重复求解,冗余计算严重
通过数据库中的节点坐标信息,构建得到规划拓扑图,并在此基础上,针对每个任务生成多个任务路径,即多个个体,并将每个任务对应的所有个体和相应的优化因子进行对应,通过多轮遗传迭代,在每轮遗传迭代的过程中,将各个个体随机进行交叉变异得到子代种群,并且子代种群中的子代个体垂直继承父代个体的优化因子以维持种群稳定度,并依据个体的优化因子进行筛选,得到优异度更高的下一代输入种群,通过多轮迭代,得到每个任务对应的相对最优的个体,作为该任务的最优路径,提高了路径规划的多任务并发场景下算法的收敛效率以及资源消耗的优化效果。
Smart Images

Figure CN122596367A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of intelligent transportation technology, and more specifically, relates to a path planning method and apparatus based on a multi-factor genetic algorithm. Background Technology
[0002] In recent years, with the rapid development of my country's economy and society and the rapid rise of intelligent unmanned equipment, path planning has become a core fundamental problem in many fields such as transportation, communication, robotics, and emergency command. However, traditional path algorithms generally suffer from several problems: when solving a single path, they traverse many nodes, and the time complexity increases exponentially with the network size; they struggle to handle multi-dimensional constraints at once, requiring multiple post-processing corrections, which reduces feasibility; when facing concurrent tasks, they can only process them serially or in coarse-grained parallelism, resulting in low utilization of computational resources and significant response latency; simply increasing concurrency by horizontally scaling the number of servers leads to high energy consumption and communication overhead; and they lack knowledge-sharing mechanisms between tasks, resulting in repeated solutions to the same or similar subproblems and serious redundant computation.
[0003] Therefore, overcoming the shortcomings of the existing technology is an urgent problem to be solved in this technical field. Summary of the Invention
[0004] The problem this invention aims to solve is how to improve the convergence efficiency and resource consumption optimization of the algorithm in multi-task concurrent scenarios of path planning.
[0005] Firstly, a path planning method based on a multi-factor genetic algorithm is provided, including: Based on the node coordinate information in the database, a planned topology map is constructed; Obtain all task information, generate multiple individuals corresponding to each task information and the planning topology, and match all individuals corresponding to each task information with the corresponding optimization factors. Use all individuals of all task information as the initial population, and input the initial population as the input population into the iteration round. Each iteration includes: cross-mutating the input population as the parent population to generate the offspring population; each offspring individual in the offspring population vertically inherits the optimization factor of the corresponding parent individual in the parent population; merging the offspring population and the parent population to form a merged population; sorting all individuals in the merged population according to the dimension of the corresponding optimization factor; and selecting the next generation input population. When the iteration termination condition is met, the optimal individual for each individual in the next generation input population under the corresponding optimization factor dimension is obtained, and the optimal individual is taken as the optimal path corresponding to the corresponding task information.
[0006] Preferably, the task information includes one or more of the following: task start point, task end point, and task constraints.
[0007] Preferably, the step of using the input population as the parent population to perform crossover and mutation to generate the offspring population specifically includes: Swap the random intermediate paths between two random parent individuals in the parent population to obtain two child individuals corresponding to the two parent individuals; Mutate a random intermediate node of a parent individual in the parent population into another intermediate node to obtain the offspring individual corresponding to that parent individual; All the offspring individuals are considered as the offspring population.
[0008] Preferably, each offspring individual in the offspring population vertically inherits the optimization factor of the corresponding parent individual in the parent population, specifically including: When the optimization factors of two parent individuals are the same, the two child individuals generated by the corresponding crossover transformation inherit the optimization factors of the parent individuals. When the optimization factors of two parent individuals are different, then among the two child individuals generated by the corresponding cross transformation, one child individual randomly inherits the optimization factor of one parent individual, and the other child individual inherits the optimization factor of the other parent individual. The offspring generated by the mutation inherit the optimization factor of the corresponding parent individual.
[0009] Preferably, the step of merging the offspring and parent populations into a merged population, sorting all individuals in the merged population according to the dimension of the corresponding optimization factor, and selecting the next generation input population specifically includes: The fitness of each individual in the merged population is calculated according to its corresponding optimization factor. Sort all individuals with the same optimization factor in the merged population according to their fitness. For each optimization factor, the top 50% of individuals are selected as the preferred offspring individuals for that optimization factor. All the preferred offspring individuals corresponding to all optimization factors are used as the input population for the next generation.
[0010] Preferably, the termination condition specifically includes: If the current iteration number is greater than or equal to the preset iteration number, then the termination condition is met; If the current iteration round is less than the preset round, then the next generation input population will be input into the next iteration round.
[0011] Preferably, obtaining the optimal individual for each individual in the next-generation input population under the corresponding optimization factor dimension for each task information specifically includes: Obtain the fitness of all individuals in the next generation input population for each task information under the corresponding optimization factor dimension, and sort all individuals corresponding to each optimization factor according to the fitness; Select a predetermined number of individuals from all individuals corresponding to each optimization factor as the preferred individuals for that optimization factor. The constraint cost value of each preferred individual is calculated, and the preferred individual with the lowest constraint cost value among all preferred individuals of the optimization factor is taken as the optimal individual under the corresponding optimization factor dimension.
[0012] Preferably, the calculation of the constraint cost value for each preferred individual specifically includes: The expression for the constraint cost value is: ; in, To constrain cost values, Let be the distance from position node i to position node j. As decision variables, Let i be the shortest possible path between location node i and location node j. The cost of the m-th constraint factor, The weighted sum of costs for n different constraint factors. It is the minimum value of the weighted sum of costs for n different constraint factors.
[0013] In a second aspect, a path planning device based on a multi-factor genetic algorithm is provided, comprising at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the processor to perform the path planning method based on the multi-factor genetic algorithm.
[0014] Thirdly, the present invention also provides a non-volatile computer storage medium storing computer-executable instructions that are executed by one or more processors to perform the method described in the first aspect.
[0015] Fourthly, a chip is provided, comprising: a processor and an interface for calling and running a computer program stored in memory, performing the method as described in the first aspect.
[0016] Fifthly, a computer program product containing instructions is provided that, when executed on a computer or processor, causes the computer or processor to perform the method as described in the first aspect.
[0017] In a sixth aspect, a path planning system based on a multi-factor genetic algorithm is provided, including a path planning device based on a multi-factor genetic algorithm as described in the second aspect, and using a path planning method based on a multi-factor genetic algorithm as described in the first aspect.
[0018] Unlike existing technologies, the present invention has at least the following beneficial effects: By using node coordinate information from the database, a planning topology graph is constructed. Based on this, multiple task paths (i.e., multiple individuals) are generated for each task. All individuals corresponding to each task are matched with their respective optimization factors. Through multiple rounds of genetic iteration, each individual is randomly cross-mutated to obtain a offspring population. Offspring individuals in the offspring population vertically inherit the optimization factors of their parents to maintain population stability. Based on the optimization factors of the individuals, a next-generation input population with higher performance is obtained. Through multiple rounds of iteration, the relatively optimal individual for each task is obtained as the optimal path for that task. This improves the convergence efficiency and resource consumption optimization effect of the algorithm in multi-task concurrent path planning scenarios. Attached Figure Description
[0019] To more clearly illustrate the technical solutions of the embodiments of the present invention, the accompanying drawings used in the embodiments of the present invention will be briefly described below. Obviously, the drawings described below are merely some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without any creative effort.
[0020] Figure 1 This is a flowchart of a path planning method based on a multi-factor genetic algorithm provided in an embodiment of the present invention; Figure 2 This is a flowchart of a method for obtaining offspring individuals based on a path planning method using a multi-factor genetic algorithm, provided in an embodiment of the present invention. Figure 3 This is a flowchart of a path planning method based on a multi-factor genetic algorithm, provided in an embodiment of the present invention, showing a method for offspring individuals to inherit optimization factors. Figure 4 This is a flowchart illustrating the acquisition of the next-generation input population for a path planning method based on a multi-factor genetic algorithm, as provided in an embodiment of the present invention. Figure 5 This is a flowchart of a method for obtaining the optimal individual based on a path planning method using a multi-factor genetic algorithm, provided in an embodiment of the present invention. Figure 6 This is an overall method block diagram of a path planning method based on a multi-factor genetic algorithm provided in an embodiment of the present invention; Figure 7This is a schematic diagram of a path planning device based on a multi-factor genetic algorithm provided in an embodiment of the present invention. Detailed Implementation
[0021] To make the objectives, technical solutions, and advantages of this invention clearer, the invention will be further described in detail below with reference to the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the invention.
[0022] Unless the context otherwise requires, throughout the specification and claims, the term "comprising" is interpreted as openly inclusive, meaning "including, but not limited to." In the description of the specification, terms such as "one embodiment," "some embodiments," "exemplary embodiment," "example," "specific example," or "some examples" are intended to indicate that a particular feature, structure, material, or characteristic associated with that embodiment or example is included in at least one embodiment or example of this disclosure. The illustrative representations of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics mentioned may be included in any suitable manner in any one or more embodiments or examples; that is, although they may be incorporated into embodiments or examples using the above terms for reasons such as order and position, it does not limit them to be incorporated in combination by a single embodiment or example.
[0023] In the description of this invention, the terms "first" and "second" are used for descriptive purposes only and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features. Thus, a feature defined with "first" or "second" may explicitly or implicitly include one or more of that feature. In the description of embodiments of this disclosure, unless otherwise stated, "a plurality of" means two or more. Furthermore, for example, the description may use the prefix "A" or "B" to describe the same type of nouns as two independent entities. In this case, the corresponding features defined with "A" and "B" are used only to distinguish between similar entities and should not be construed as indicating or implying relative importance or implicitly specifying the number of indicated technical features.
[0024] In the description of this invention, the expression “A and / or B” (where A and B are used to formally represent specific features) will be used. The corresponding expression includes the following three combinations: only A, only B, and a combination of A and B.
[0025] As used in this invention, “about,” “approximately,” or “approximately” includes the stated value and the average value within an acceptable range of deviation from a particular value, wherein the acceptable range of deviation is determined by a person skilled in the art taking into account the measurement under discussion and the error associated with the measurement of the particular quantity (i.e., the limitations of the measurement system).
[0026] Furthermore, the technical features involved in the various embodiments of the present invention described below can be combined with each other as long as they do not conflict with each other.
[0027] Example 1: This embodiment provides a path planning method based on a multi-factor genetic algorithm, such as... Figure 1 As shown, the method flow includes the following.
[0028] In step 101, a planned topology map is constructed based on the node coordinate information in the database.
[0029] In this embodiment, the application scenario of the corresponding method is that multiple drones start from the same starting point (e.g., drone base) and arrive at different target locations to perform different tasks. The different tasks have different requirements. For example, some tasks focus on the speed of task execution, requiring drones to reach the target location faster, while some tasks focus on energy consumption during task execution, requiring the drones to minimize energy consumption during the process of reaching the target location. Therefore, it is necessary to plan the flight path of the drones in each task so that the drones can achieve the best optimization in the corresponding requirement dimension (e.g., the fastest speed or the minimum energy consumption) during the process of flying to the corresponding target location.
[0030] Before performing path planning for the above scenario, it is necessary to encode and input the coordinate information of each location node in all airspaces that the UAV can fly through, and construct a topology map in the form of location nodes, which is the planned topology map. The planned topology map contains all possible location nodes that the UAV can reach.
[0031] In step 102, all task information is obtained, and multiple individuals are generated according to each task information and the planning topology diagram. All individuals corresponding to each task information are matched with the corresponding optimization factors. All individuals of all task information are used as the initial population, and the initial population is used as the input population in the iteration round.
[0032] In this embodiment, the task information includes one or more of the following: task start point, task end point, and task constraints. The task start point is the starting point for the UAV to perform the task, the task end point is the destination that the UAV needs to reach during the task, and the task constraints are: during the UAV's performance of the corresponding task, it needs to be within a preset range of conditions, such as the total duration of the task being within a set time range, the total energy consumption of the task being within a set energy consumption range, and the node positions that the UAV cannot pass through during the task. The task constraints can be set by those skilled in the art according to the actual situation.
[0033] In this embodiment, the individual corresponding to the task information is the flight path plan of the UAV from the task start point to the task end point, that is, the plan of the position nodes that need to be passed during the flight. It should be noted that all individuals corresponding to each task information need to be randomly generated based on the task constraints. Through the task constraints, the individuals generated for each task information are generated under the premise of the task constraints, avoiding the generated individuals not meeting the constraint requirements. Furthermore, for all individuals generated by task information, the number of individuals generated for each task information is random, and the number of individuals generated for different task information can be different.
[0034] In this embodiment, the optimization factor is the optimization direction, such as optimizing towards the fastest speed or optimizing towards the minimum energy consumption. Each task needs to correspond to an optimization factor. Therefore, all individuals generated by each task information need to be associated with the corresponding optimization factor. In actual scenarios, different optimization factors can be represented by corresponding codes, and the corresponding codes can be associated with all individuals under the corresponding task.
[0035] All individuals from all tasks are collectively used as the initial population, which is then fed into the first iteration of the genetic iteration as the input population.
[0036] In step 103, each iteration includes: using the input population as the parent population for crossover mutation to generate the offspring population; each offspring individual in the offspring population vertically inherits the optimization factor of the corresponding parent individual in the parent population; merging the offspring population and the parent population to form a merged population; sorting all individuals in the merged population according to the dimension of the corresponding optimization factor; and selecting the next generation input population.
[0037] In this embodiment, in each iteration of the genetic iteration, random crossover transformation is performed on any two individuals in the input population, and each individual is randomly mutated to obtain offspring individuals, thereby increasing the exploration depth during the iteration process. After generating offspring individuals, it is also necessary to inherit the corresponding optimization factors from the corresponding parent individuals and sort them according to the optimization factors. The higher the sorting, the better the corresponding individual is in the dimension of the corresponding optimization factor, and the lower the sorting, the worse the corresponding individual is in the dimension of the corresponding optimization factor. Thus, the relatively better individuals are selected as the individuals in the next generation of the input population, so that the overall iteration converges in a better direction.
[0038] In step 104, when the iteration termination condition is met, the optimal individual of all individuals of each task information in the next generation input population under the corresponding optimization factor dimension is obtained, and the optimal individual is taken as the optimal path corresponding to the corresponding task information.
[0039] In this embodiment, the termination condition can be a preset maximum number of iterations. If the number of iterations exceeds the maximum number of iterations, the iteration is terminated. Specifically, if the current iteration round is greater than or equal to the preset round, the termination condition is met; if the current iteration round is less than the preset round, the next generation input population is input into the next iteration round. The preset round is set by those skilled in the art based on actual conditions. Alternatively, if the fitness of individuals corresponding to each optimization factor converges within a preset tolerance interval in multiple iterations, and the preset tolerance interval is set by those skilled in the art based on actual conditions, the iteration can also be terminated. The next generation input population obtained in this round is taken as the final population, and based on the fitness of each individual, the individual with the best fitness in each optimization factor dimension is obtained. This individual is taken as the optimal path for the task corresponding to the corresponding optimization factor, thereby achieving efficient optimization of multiple task paths.
[0040] In this embodiment, a planning topology map is constructed using node coordinate information from the database. Based on this, multiple task paths (i.e., multiple individuals) are generated for each task. All individuals corresponding to each task are matched with their respective optimization factors. Through multiple rounds of genetic iteration, each individual is randomly cross-mutated to obtain a offspring population. Offspring individuals in the offspring population vertically inherit the optimization factors of their parents to maintain population stability. Based on the optimization factors of the individuals, a next-generation input population with higher performance is obtained. Through multiple rounds of iteration, the relatively optimal individual for each task is obtained as the optimal path for that task. This achieves optimization of the algorithm's convergence efficiency and resource consumption in multi-task concurrent scenarios, improving the optimization effect of task execution in multi-task concurrent scenarios.
[0041] Furthermore, in this embodiment, the task information is used to generate multiple feasible path schemes, i.e. individuals, for the corresponding task. These individuals must all meet the requirements of the corresponding task to avoid generating individuals that do not match the task. For example, the destination of the generated individual may not be consistent with the destination required by the task, or the flight time of the individual may not meet the requirements of the task. Therefore, this embodiment also involves the following design: the task information includes one or more of the following: task start point, task end point, and task constraints.
[0042] In this embodiment, the task start point is the takeoff position of the UAV when performing the corresponding task; the task end point is the flight end point of the UAV when performing the corresponding task; the task constraint is the constraint on the UAV in different dimensions during the execution of the task, which may include duration constraints, such as the flight time of the UAV from takeoff to arrival at the end point needing to be less than a preset duration; it may include position constraints, i.e. the range of locations the UAV can pass through during flight; and it may also include energy consumption constraints, i.e. the energy consumption of the UAV from takeoff to arrival at the end point needing to be less than a preset energy consumption. The preset duration and preset energy consumption are set by those skilled in the art according to the actual situation.
[0043] Furthermore, in this embodiment, to ensure the exploration depth of the genetic iterative algorithm in each iteration, the new individuals generated in each iteration need to possess randomness under corresponding constraints. Therefore, this embodiment also includes the following design: the input population is used as the parent population for crossover and mutation to generate the offspring population, such as... Figure 2 The following are included.
[0044] In step 201, the random intermediate paths of two random parent individuals in the parent population are swapped to obtain two child individuals corresponding to the two parent individuals.
[0045] In this embodiment, the intermediate path is the path between the task start point and the task end point. For example, the path of an individual is A to B, B to C, C to D, and D to E, where A is the task start point and E is the task end point. Therefore, the intermediate path can be B to C, C to D, and B to D. Two parent individuals are randomly selected from the parent population, and a segment of the intermediate path is randomly selected from each of the two parent individuals and exchanged. This will result in two new individuals, namely two offspring individuals. For example, parent individuals a and b are selected. The path of parent individual a is A to B, B to C, C to D, and D to E, and the path of parent individual b is A to D, D to F, F to C, and C to G. The path C to D in parent individual a and the path F to C in parent individual b are replaced. The resulting path of one offspring individual is A to B, B to F, F to C, and C to E, and the path of the other offspring individual is A to D, D to C, C to D, and D to G. In this embodiment, the probability of selecting a parent individual from the parent population and the probability of a path among the parent individuals being selected for exchange are both set by those skilled in the art based on the actual situation.
[0046] In step 202, the random intermediate node of a random parent individual in the parent population is mutated into another intermediate node to obtain the offspring individual corresponding to that parent individual.
[0047] In step 203, all the offspring individuals are considered as the offspring population.
[0048] Furthermore, in this embodiment, while performing crossover transformations on parent individuals in the parent population, it is also necessary to randomly mutate the parent individuals to increase the exploration depth. This random mutation involves randomly selecting parent individuals from the parent population and randomly selecting task nodes from those parent individuals, then randomly mutating them into any legal location node other than the task start and end points (the legal location node is a node within the constrained flight range of the UAV). In this embodiment, the probability of selecting parent individuals from the parent population and the probability of selecting and mutating location nodes within parent individuals are set by those skilled in the art based on actual conditions. It is worth noting that the number of offspring individuals in the offspring population can be the same as the number of parent individuals in the parent population.
[0049] Furthermore, for each generated offspring population, it is also necessary to map it to a corresponding optimization factor to ensure the correctness of the subsequent convergence direction. Therefore, each newly generated offspring individual needs to inherit the corresponding optimization factor. Thus, this embodiment also involves the following design: each offspring individual in the offspring population vertically inherits the optimization factor of the corresponding parent individual in the parent population, such as... Figure 3 As shown, the method flow includes the following.
[0050] In step 301, when the optimization factors of two parent individuals are the same, the two child individuals generated by the corresponding crossover transformation inherit the optimization factors of the parent individuals.
[0051] In this embodiment, when the optimization factors of two parent individuals are consistent, the optimization factors inherited by the two child individuals are consistent with those of the parent individuals.
[0052] In step 302, when the optimization factors of the two parent individuals are different, one of the two child individuals generated by the corresponding cross transformation will randomly inherit the optimization factor of one of the parent individuals, and the other child individual will inherit the optimization factor of the other parent individual.
[0053] In this embodiment, since it is necessary to ensure that the proportion of individuals corresponding to each optimization factor in the entire population remains unchanged in each iteration, if the parent individuals of two different optimization factors undergo cross-change, the two offspring individuals generated need to inherit two different optimization factors respectively, so as to ensure that the proportion of individuals corresponding to each optimization factor remains unchanged.
[0054] In step 303, the offspring individuals generated by the mutation inherit the optimization factors of the corresponding parent individuals.
[0055] Similarly, in order to ensure that the proportion of individuals corresponding to each optimization factor remains constant, the offspring individuals generated by mutation directly inherit the optimization factors of their corresponding parent individuals.
[0056] Furthermore, in this embodiment, to avoid local convergence, the next generation input population cannot directly use the offspring population. Instead, it is necessary to select high-quality individuals from both the parent and offspring populations as the next generation input population to improve convergence efficiency. Therefore, this embodiment involves the following design: The offspring and parent populations are merged into a merged population. All individuals in the merged population are sorted according to the dimension of the corresponding optimization factor, and the next generation input population is obtained through selection. Figure 4 As shown, the method flow includes the following.
[0057] In step 401, the fitness of all individuals in the merged population is calculated according to their corresponding optimization factors.
[0058] In step 402, all individuals with the same optimization factor in the merged population are sorted according to their fitness.
[0059] In this embodiment, the fitness represents the excellence of the corresponding individual in the corresponding optimization factor dimension. For example, in the optimization factor dimension of duration, the task execution time of each individual corresponding to the optimization factor of duration is simulated and abstracted as fitness. The shorter the duration, the higher the excellence, and the longer the duration, the lower the excellence.
[0060] In step 403, among all individuals corresponding to each optimization factor, the top 50% of individuals are selected as the preferred offspring individuals corresponding to that optimization factor.
[0061] In step 404, all the preferred offspring individuals corresponding to all optimization factors are used as the next generation input population.
[0062] In this embodiment, to ensure the stability of the number of individuals corresponding to each optimization factor in the next generation input population, it is necessary to select half of the individuals corresponding to each optimization factor in the parent and offspring populations in the current iteration. This number is consistent with the number of individuals corresponding to the corresponding optimization factors in the parent and offspring populations. Furthermore, to ensure that each iteration converges towards a relatively superior direction, it is necessary to select relatively superior individuals. Therefore, the top 50% of individuals for each optimization factor in the merged population are selected as the preferred offspring individuals for that optimization factor, and all selected individuals are used as the next generation input population.
[0063] Furthermore, in this embodiment, when the iteration meets the termination condition, it is necessary to select the relatively optimal individual for each optimization factor in the latest iteration round. Therefore, screening is required in the population of the last iteration round, and this screening also needs to consider the corresponding constraints. While ensuring the superiority of fitness under the optimization factor dimension, the influence of each constraint factor is also considered to select the relatively optimal individual for each optimization factor. Therefore, this embodiment also involves the following design: obtaining the optimal individual for each task information of the next generation input population under the corresponding optimization factor dimension, such as... Figure 5 As shown, the method flow includes: In step 501, the fitness of all individuals in each task information of the next generation input population under the corresponding optimization factor dimension is obtained, and all individuals corresponding to each optimization factor are sorted according to the fitness.
[0064] In step 502, a preset number of individuals are selected from all individuals corresponding to each optimization factor before sorting as the preferred individuals for the corresponding optimization factor.
[0065] In this embodiment, the preset quantity is set by those skilled in the art according to the actual situation, and the preset quantity can be 3 to 4.
[0066] In step 503, the constraint cost value of each preferred individual is calculated, and the preferred individual with the lowest constraint cost value among all preferred individuals of the optimization factor is taken as the optimal individual under the corresponding optimization factor dimension.
[0067] The calculation yields the constraint cost value for each preferred individual, specifically including: The expression for the constraint cost value is: ; in, To constrain cost values, Let be the distance from position node i to position node j. As decision variables, Let i be the shortest possible path between location node i and location node j. The cost of the m-th constraint factor, The weighted sum of costs for n different constraint factors. It is the minimum value of the weighted sum of costs for n different constraint factors.
[0068] In this embodiment, the cost of the constraint factors includes time constraints, energy constraints, and individual factor cost constraints, wherein the matrix of the time constraints is: ; Where Time is the time constraint matrix. Let be the time from position node i to the current node j.
[0069] The energy constraint matrix is as follows: ; Where price is an energy-constrained matrix, Let be the energy consumption from position node i to position node j.
[0070] The time constraint formula is obtained from the time constraint matrix: ; in, To constrain costs by time, M represents the maximum duration in the time-constrained matrix, and M is the amplification factor for the constraint penalty.
[0071] The energy constraint formula is obtained from the energy constraint matrix as follows: ; in, To constrain costs by energy, Let M be the maximum energy consumption in the energy-constrained matrix, and M be the constraint penalty amplification factor.
[0072] In this embodiment, the individual factor cost depends on the distance between the task start point and the task end point, and the expression for the individual factor cost is: ; ; in, The individual factor cost is len, and the path length is len. Let the factor cost be the i-th individual on the j-th task. These are the weighting coefficients. Let represent the degree to which the i-th individual violates the constraints when completing the j-th task. Let $\frac{i}{j}$ be the normal cost for the i-th individual to complete the j-th task.
[0073] In summary, the expression for the cost of the constraint factor is: ; in, Cost of the constraint factor.
[0074] In summary, as Figure 6 The diagram shown is an overall flowchart of the path planning method based on a multi-factor genetic algorithm provided in this embodiment.
[0075] Example 3: Based on the path planning method based on multi-factor genetic algorithm provided in the foregoing embodiments, the present invention also provides an apparatus for implementing the above method based on multi-factor genetic algorithm path planning, such as... Figure 7 The diagram shown is a schematic representation of the device architecture according to an embodiment of the present invention. The path planning device based on a multi-factor genetic algorithm in this embodiment includes one or more processors 41 and a memory 42. Figure 7 Take a processor 41 as an example.
[0076] Processor 41 and memory 42 can be connected via a bus or other means. Figure 7 Taking the example of a connection between China and Israel via a bus.
[0077] The memory 42 serves as a non-volatile computer-readable storage medium for path planning based on a multi-factor genetic algorithm. It can be used to store non-volatile software programs and non-volatile computer-executable programs, such as the path planning method based on a multi-factor genetic algorithm in the foregoing embodiments. The processor 41 executes various functional applications and data processing of the path planning device based on a multi-factor genetic algorithm by running the non-volatile software programs, instructions, and modules stored in the memory 42, thereby implementing the path planning method based on a multi-factor genetic algorithm in the foregoing embodiments.
[0078] Memory 42 may include high-speed random access memory, and may also include non-volatile memory, such as at least one disk storage device, flash memory device, or other non-volatile solid-state storage device. In some embodiments, memory 42 may include memory remotely located relative to processor 41, which can be connected to processor 41 via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.
[0079] The program instructions / modules are stored in memory 42. When executed by one or more processors 41, they perform the path planning method based on the multi-factor genetic algorithm in the foregoing embodiments, for example, performing the steps shown in the figures described above.
[0080] This invention also provides a non-volatile computer storage medium storing computer-executable instructions that are executed by one or more processors, for example... Figure 7 One of the processors 41 can enable the one or more processors to execute the path planning method based on the multi-factor genetic algorithm in the foregoing embodiments, for example, to perform the steps shown in the figures described above.
[0081] It is worth noting that the information interaction and execution process between the modules and units in the above-mentioned device and system are based on the same concept as the processing method embodiment of the present invention. For details, please refer to the description in the method embodiment of the present invention, and will not be repeated here.
[0082] Those skilled in the art will understand that all or part of the steps in the various methods of the embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, which may include: read-only memory (ROM), random access memory (RAM), disk or optical disk, etc.
[0083] Those skilled in the art will readily understand that the above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention. Any modifications, equivalent substitutions, and improvements made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A path planning method based on a multi-factor genetic algorithm, characterized in that, include: Based on the node coordinate information in the database, a planned topology map is constructed; Obtain all task information, generate multiple individuals corresponding to each task information and the planning topology, and match all individuals corresponding to each task information with the corresponding optimization factors. Use all individuals of all task information as the initial population, and input the initial population as the input population into the iteration round. Each iteration includes: cross-mutating the input population as the parent population to generate the offspring population; each offspring individual in the offspring population vertically inherits the optimization factor of the corresponding parent individual in the parent population; merging the offspring population and the parent population to form a merged population; sorting all individuals in the merged population according to the dimension of the corresponding optimization factor; and selecting the next generation input population. When the iteration termination condition is met, the optimal individual for each individual in the next generation input population under the corresponding optimization factor dimension is obtained, and the optimal individual is taken as the optimal path corresponding to the corresponding task information.
2. The path planning method based on multi-factor genetic algorithm according to claim 1, characterized in that, The task information includes one or more of the following: task start point, task end point, and task constraints.
3. The path planning method based on multi-factor genetic algorithm according to claim 1, characterized in that, The step of using the input population as the parent population for crossover and mutation to generate the offspring population specifically includes: Swap the random intermediate paths between two random parent individuals in the parent population to obtain two child individuals corresponding to the two parent individuals; Mutate a random intermediate node of a parent individual in the parent population into another intermediate node to obtain the offspring individual corresponding to that parent individual; All the offspring individuals are considered as the offspring population.
4. The path planning method based on multi-factor genetic algorithm according to claim 1, characterized in that, Each offspring in the offspring population vertically inherits the optimization factors from the corresponding parent individual in the parent population, specifically including: When the optimization factors of two parent individuals are the same, the two child individuals generated by the corresponding crossover transformation inherit the optimization factors of the parent individuals. When the optimization factors of two parent individuals are different, then among the two child individuals generated by the corresponding cross transformation, one child individual randomly inherits the optimization factor of one parent individual, and the other child individual inherits the optimization factor of the other parent individual. The offspring generated by the mutation inherit the optimization factor of the corresponding parent individual.
5. The path planning method based on multi-factor genetic algorithm according to claim 1, characterized in that, The process of merging the offspring and parent populations into a merged population, sorting all individuals in the merged population according to the dimension of the corresponding optimization factor, and then selecting the next generation input population specifically includes: The fitness of each individual in the merged population is calculated according to its corresponding optimization factor. Sort all individuals with the same optimization factor in the merged population according to their fitness. For each optimization factor, the top 50% of individuals are selected as the preferred offspring individuals for that optimization factor. All the preferred offspring individuals corresponding to all optimization factors are used as the input population for the next generation.
6. The path planning method based on multi-factor genetic algorithm according to claim 1, characterized in that, The termination conditions specifically include: If the current iteration number is greater than or equal to the preset iteration number, then the termination condition is met; If the current iteration round is less than the preset round, then the next generation input population will be input into the next iteration round.
7. The path planning method based on multi-factor genetic algorithm according to claim 1, characterized in that, The step of obtaining the optimal individual for each individual in the next-generation input population under the corresponding optimization factor dimension for each task information specifically includes: Obtain the fitness of all individuals in the next generation input population for each task information under the corresponding optimization factor dimension, and sort all individuals corresponding to each optimization factor according to the fitness; Select a predetermined number of individuals from all individuals corresponding to each optimization factor as the preferred individuals for that optimization factor. The constraint cost value of each preferred individual is calculated, and the preferred individual with the lowest constraint cost value among all preferred individuals of the optimization factor is taken as the optimal individual under the corresponding optimization factor dimension.
8. The path planning method based on multi-factor genetic algorithm according to claim 7, characterized in that, The calculation yields the constraint cost value for each preferred individual, specifically including: The expression for the constraint cost value is: ; in, To constrain cost values, Let be the distance from position node i to position node j. As decision variables, Let i be the shortest possible path between location node i and location node j. The cost of the m-th constraint factor, The weighted sum of costs for n different constraint factors. It is the minimum value of the weighted sum of costs for n different constraint factors.
9. A path planning device based on a multi-factor genetic algorithm, characterized in that, The method includes at least one processor and a memory communicatively connected to the at least one processor; wherein the memory stores instructions executable by the at least one processor, the instructions being executed by the processor for performing the path planning method based on a multi-factor genetic algorithm as described in any one of claims 1-8.
10. A non-volatile computer storage medium, characterized in that, The computer storage medium stores computer program instructions that, when executed by one or more processors, implement the path planning method based on a multi-factor genetic algorithm as described in any one of claims 1-8.