A global path planning method for point inspection based on multi-vehicle collaborative scheduling
Through the improved ant colony algorithm and multi-vehicle collaborative scheduling method, the environmental protection inspection path planning is optimized, solving the problem of inefficiency of the traditional environmental protection inspection method, realizing the coordination of the global path planning and the optimization of resource allocation, and improving the efficiency of environmental protection inspection. and coverage capabilities.
Patent Information
- Application Number
- CN202410905417.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-08
- Publication Date
- 2024-10-01
- Estimated Expiration
- 2044-07-08
AI Technical Summary
The traditional environmental protection inspection method is inefficient and lacks information interaction and collaborative work among multiple vehicles. As a result, the allocation of environmental protection inspection resources is not optimized and it is difficult to fully cover key areas and key links.
Adopt a full-area path planning method for point inspection based on multi-vehicle collaborative scheduling, and use an improved ant colony algorithm to adjust the inspection route according to the pollution point situation, and output a planning plan that considers the interaction between multiple inspectors' paths. By obtaining the points to be inspected bit data and the basic data of inspectors to construct a traffic time matrix, and optimize the path planning through the pheromone transmission and path selection mechanism of the ant colony.
It improves the overall inspection efficiency of environmental protection inspectors, ensures a balanced workload, helps inspectors discover and deal with environmental pollution problems more effectively, and solves the problem of inefficiency in manually planning paths alone.
Smart Images

Figure CN118446399B_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field of urban environmental protection inspection, and in particular to a method for global path planning for point inspection based on multi-vehicle collaborative scheduling. Background Art
[0002] As global environmental problems become increasingly severe, the importance of environmental inspections has become increasingly prominent. Environmental inspections are not only the supervision and management of environmental pollution behaviors, but also an important means to promote the construction of ecological civilization and achieve sustainable development. Traditional environmental inspection methods often use random inspections or fixed-line inspections, which are not only inefficient, but also easy to miss some potential environmental pollution problems. In this process, path planning, as an effective technical means, can scientifically and rationally plan the best inspection route based on factors such as the distribution of pollution sources, pollution levels, and geographical characteristics. However, the current path planning problems in related fields are mainly concentrated on single-vehicle path planning, that is, designing an optimal driving path from the starting point to the end point, and rarely consider the mutual influence between multiple vehicles (inspectors), lacking information interaction and collaborative work between vehicles. How to optimize resource allocation, reduce the total cost of environmental inspections, and ensure comprehensive coverage of key areas and key links is extremely important. Summary of the invention
[0003] In view of the above-mentioned deficiencies in the prior art, the present invention provides a method for global path planning for point inspection based on multi-vehicle collaborative scheduling, which solves the problem of low efficiency caused by the prior art inspectors manually planning inspection routes mechanically and fixedly based on experience and working alone.
[0004] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:
[0005] A method for global path planning for point inspection based on multi-vehicle collaborative scheduling is provided, which includes the following steps:
[0006] S1. Obtain the data of the points to be checked and the basic data of the inspectors and merge them to obtain the merged data of the points to be checked;
[0007] S2. Based on the data of the points to be checked and the basic data of the inspectors, the travel time matrix is obtained;
[0008] S3. Based on the travel time matrix, the improved ant colony algorithm is used to plan the path of the merged data of the points to be checked to obtain a path planning solution.
[0009] Furthermore, the basic data of inspectors includes the number of inspectors and their location information; the location information of inspectors is the latitude and longitude of the inspectors' locations, that is, ;in, Indicates The location information of each inspector, , , Respectively represent the first, second, and The location information of each inspector.
[0010] Furthermore, the data of the point to be checked is the longitude and latitude of the location of the point, that is, ;in, Indicates The location information of the points to be checked. , , Respectively represent the first, second, and The location information of the points to be checked;
[0011] Furthermore, the merging in step S1 refers to splicing the data of the points to be checked and the location information of the inspectors.
[0012] Furthermore, the specific process of step S2 is:
[0013] S2-1. Determine the number of processes based on the basic data of the points to be checked and the location information of the inspectors. ;
[0014] S2-2. Use Python to create a process pool;
[0015] S2-3. According to the number of processes, tasks are divided into various processes and the travel time is calculated asynchronously until all processes are completed; the travel time includes the travel time of inspectors to different points and the travel time between points;
[0016] S2-4, merging all travel times into an initial travel time matrix;
[0017] S2-5. Replace the 0 values in the initial travel time matrix with 1 to obtain a travel time matrix.
[0018] Furthermore, step S3 further includes:
[0019] S3-1. Set the number of ants , Iterations , pheromone importance factor , Heuristic Factor , pheromone evaporation rate And the pheromone increment coefficient ;
[0020] S3-2. Set the initial pheromone matrix and the initial optimal solution for each inspector , the optimal solution travel cost of each inspector and the inspection time of the points to be inspected;
[0021] S3-3, take the location of each inspector as the starting point of the ants;
[0022] S3-4, randomize the starting order of the ants;
[0023] S3-5, calculating the probability of each ant selecting a point to be checked;
[0024] S3-6. Select the points to be checked according to probability;
[0025] S3-7. Determine the travel cost of each inspector based on the travel time matrix;
[0026] S3-8, sorting the total time of the travel cost and point inspection time of each inspector to obtain the selection order;
[0027] S3-9. Each inspector selects the next point to be inspected in the order of selection until the last inspector completes the selection;
[0028] S3-10, repeating steps S3-5 to S3-9 until all the points to be checked are checked, that is, the path construction is completed, and the path construction result is obtained;
[0029] S3-11, based on the quality of the path found by each ant and the pheromone evaporation rate And the pheromone increment coefficient Update the initial pheromone matrix; the path quality is the sum of the path duration and the point inspection duration;
[0030] S3-12, obtain the mean value of the optimal solution travel cost of each inspector and the mean value of the objective function corresponding to each ant;
[0031] S3-13, compare the average of the optimal solution pass cost of each inspector and the average of the objective function corresponding to each ant; if the average of the objective function corresponding to the optimal solution pass cost of each inspector is less than the average of the objective function corresponding to each ant, then the optimal solution pass cost of each inspector and the initial optimal solution of each inspector are used as the initial output data; otherwise, the objective function and path construction result of the current iteration number are used as the initial output data;
[0032] S3-14, determine the current number of iterations Is it not less than the number of iterations? ; If yes, the current initial output data is used as the final output data, that is, the path planning solution; otherwise, the current number of iterations is increased by 1 and returns to step S3-5; wherein the initial value of the number of iterations is 0.
[0033] Furthermore, the initial pheromone matrix The dimension of is consistent with the travel time matrix.
[0034] Furthermore, the calculation formula of the probability in step S3-5 is:
[0035]
[0036] in, Indicates Only ants are on the node Select Node The probability of Representation Node and nodes The pheromones between Indicates that the ant is at the node To Node The travel time, Indicates the remaining set of nodes to be checked. Representation Node and nodes The pheromones between Indicates that the ant is at the node To Node The travel time, Represents a sum function.
[0037] Furthermore, the formula of step S3-11 is:
[0038]
[0039] in, Indicates the number of iterations Node and nodes The pheromones between Indicates the current iteration number Node and nodes The pheromones between Indicates that the ant is at the node To Node The path quality, Represents ants The node order of the current node in the current path solution, Represents ants The total number of nodes in the current path solution.
[0040] Furthermore, the formula of the objective function of step S3-12 is:
[0041]
[0042] in, represents the objective function, represents the minimum function, Indicates the time taken to check the point. represents the summation function, Represents ants The total number of nodes in the current path solution, Indicates that the ant is at the node To Node The travel time.
[0043] The beneficial effects of the present invention are as follows: the present invention uses an improved ant colony algorithm to simulate the pheromone transmission and path selection mechanism of ants, adjusts the inspection route according to the pollution point situation, and outputs a planning scheme that takes into account the mutual influence and coordination between the paths of multiple inspectors in the entire region. The dispatcher uniformly allocates the inspection points in the jurisdiction to the inspectors based on the planning results, formulates a global path planning strategy with the highest overall inspection efficiency, the most inspection points, and a balanced task volume, solves the problem of inefficiency caused by the inspectors' mechanical and fixed planning of inspection paths based on experience and the implementation method of fighting alone, and assists the inspectors to more effectively discover and deal with environmental pollution problems. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] Figure 1 is a method flow chart;
[0045] Figure 2 Graph showing the path planning results in the embodiment. DETAILED DESCRIPTION
[0046] The specific implementation modes of the present invention are described below so that those skilled in the art can understand the present invention. However, it should be clear that the present invention is not limited to the scope of the specific implementation modes. For those of ordinary skill in the art, as long as various changes are within the spirit and scope of the present invention as defined and determined by the attached claims, these changes are obvious, and all inventions and creations utilizing the concept of the present invention are protected.
[0047] like Figure 1 As shown, a method for global path planning for point inspection based on multi-vehicle collaborative scheduling includes the following steps:
[0048] S1. Obtain the data of the points to be checked and the basic data of the inspectors and merge them to obtain the merged data of the points to be checked;
[0049] The basic data of inspectors include the number of inspectors and their location information; the location information of inspectors is the latitude and longitude of the inspectors’ locations, that is, ; The data of the point to be checked is the longitude and latitude of the location of the point, that is, ;in, Indicates The location information of each inspector, , , Respectively represent the first, second, and The location information of each inspector, Indicates The location information of the points to be checked. , , Respectively represent the first, second, and The location information of the points to be checked;
[0050] The merging in step S1 refers to splicing the data of the points to be checked and the location information of the inspectors.
[0051] S2. Based on the data of the points to be checked and the basic data of the inspectors, the travel time matrix is obtained;
[0052] S2-1. Determine the number of processes based on the basic data of the points to be checked and the location information of the inspectors. ;
[0053] S2-2. Use Python to create a process pool;
[0054] S2-3, according to the number of processes , divide the tasks into various processes and asynchronously calculate the travel time until all processes are completed; the travel time includes the travel time of inspectors to different points and the travel time between points;
[0055] S2-4, merging all travel times into an initial travel time matrix;
[0056] S2-5. To avoid subsequent calculation errors, replace the 0 values in the initial travel time matrix with 1 to obtain the travel time matrix.
[0057] S3. Based on the travel time matrix, the improved ant colony algorithm is used to plan the path of the merged data of the points to be checked to obtain a path planning solution.
[0058] The feasible solution to the path problem is represented by the walking path of the ants, and all the paths of the entire ant colony constitute the solution space of the problem to be optimized. Ants with shorter time release more pheromones. As the task progresses, the accumulated pheromone concentration on the short path gradually increases, and the number of ants choosing this path also increases. Eventually, the entire ant colony will converge on the best path under the action of positive feedback, which corresponds to the optimal solution to the problem to be optimized.
[0059] Step S3 further comprises:
[0060] S3-1. Set the number of ants , Iterations , pheromone importance factor , Heuristic Factor , pheromone evaporation rate And the pheromone increment coefficient ; Among them, the pheromone importance factor Controlling pheromones The degree of influence on path selection, The larger the value, the more dependent on pheromones, the lower the exploration, and the smaller the value, the smaller the search range of the ant colony; heuristic factor Controlling the Node Select Node The influence of visibility between the two sides reflects the strength of factors such as a priori and certainty in road search; the pheromone evaporation rate After each iteration, the pheromone on all paths is reduced according to the set evaporation rate to simulate the volatilization process of pheromone; the pheromone increment coefficient It means adjusting the amount of pheromone increase according to the quality of the path taken by the ants.
[0061] S3-2. Set the initial pheromone matrix and the initial optimal solution for each inspector , the optimal solution travel cost of each inspector and the point inspection time of the points to be inspected; the initial pheromone matrix is usually initialized to the same positive value, which is set to 100 here; the initial value of the optimal solution travel cost of each inspector is positive infinity, which is continuously updated with the increase of the number of iterations; among them, the optimal solution travel cost is the travel time; the point inspection time of the points to be inspected is set to a constant.
[0062] S3-3, take the location of each inspector as the starting point of the ants;
[0063] S3-4, randomize the starting order of the ants;
[0064] S3-5, calculating the probability of each ant selecting a point to be checked;
[0065] As the ants pass more nodes (the longer the path), the increment of pheromone will become less and less. This strategy can encourage ants to explore shorter paths. Eventually, the pheromone on the shorter path will be enhanced, while the pheromone on the longer path will be reduced due to evaporation.
[0066] The calculation formula of the probability of step S3-5 is:
[0067]
[0068] in, Indicates Only ants are on the node Select Node The probability of Representation Node and nodes The pheromones between Indicates that the ant is at the node To Node The travel time, Representation Node and nodes The pheromones between Indicates that the ant is at the node To Node The travel time, represents the summation function, Indicates the remaining node set to be checked. The node set at the beginning Include elements (except the starting point), as time goes by, each time the ant reaches the next location, the node set The element in is reduced by one until the set is empty, which means that all locations have been visited;
[0069] S3-6. Select the points to be checked according to probability;
[0070] S3-7. Determine the travel cost of each inspector based on the travel time matrix;
[0071] S3-8, sorting the total time of the travel cost and point inspection time of each inspector to obtain the selection order;
[0072] S3-9. Each inspector selects the next point to be checked in the order of selection until the last inspector completes the selection. When all inspectors have departed from their current locations to a new node, the inspector with the shortest time will start to select the next node to be checked based on the time taken, followed by the inspector with the second shortest time, and this process will continue until all inspectors in this round have new nodes, and then continue to select the next round of nodes.
[0073] S3-10, repeating steps S3-5 to S3-9 until all the points to be checked are checked, that is, the path construction is completed, and the path construction result is obtained;
[0074] S3-11, based on the quality of the path found by each ant and the pheromone evaporation rate And the pheromone increment coefficient Update the initial pheromone matrix; the path quality is the sum of the path duration and the point inspection duration. The path duration includes the travel time of the nodes passed by the ants, and the point inspection duration is the sum of the inspection time of the inspected points.
[0075] The formula for step S3-11 is:
[0076]
[0077] in, Indicates the number of iterations Node and nodes The pheromones between Indicates the current iteration number Node and nodes The pheromones between Indicates that the ant is at the node To Node The path quality, Represents ants The node order of the current node in the current path solution, Represents ants The total number of nodes in the current path solution.
[0078] S3-12, obtain the mean value of the optimal solution travel cost of each inspector and the mean value of the objective function corresponding to each ant;
[0079] The formula of the objective function of step S3-12 is:
[0080]
[0081] in, represents the objective function, represents the minimum function, Indicates the time taken to check the point. represents the summation function, Represents ants The total number of nodes in the current path solution, Indicates that the ant is at the node To Node The travel time.
[0082] S3-13, compare the average of the optimal solution pass cost of each inspector and the average of the objective function corresponding to each ant; if the average of the objective function corresponding to the optimal solution pass cost of each inspector is less than the average of the objective function corresponding to each ant, then the optimal solution pass cost of each inspector and the initial optimal solution of each inspector are used as the initial output data; otherwise, the objective function and path construction result of the current iteration number are used as the initial output data;
[0083] S3-14, determine the current number of iterations Is it not less than the number of iterations? ; If yes, the current initial output data is used as the final output data, that is, the path planning solution; otherwise, the current number of iterations is increased by 1 and returns to step S3-5; wherein the initial value of the number of iterations is 0.
[0084] Initial pheromone matrix The dimension of is consistent with the travel time matrix.
[0085] In one embodiment of the present invention, Figure 2 As shown in the figure, the improved ant colony algorithm is used for path planning. The starting points of different inspectors are used as input. According to the requirements of shortest travel time and total inspection time, the inspection order of points along the way is planned to obtain the path planning with the lowest cost.
[0086] In summary, the present invention uses an improved ant colony algorithm to simulate the pheromone transmission and path selection mechanism of ants, adjust the inspection route according to the pollution point situation, and output a planning scheme that takes into account the mutual influence and coordination between the paths of multiple inspectors in the entire region. The dispatcher will uniformly allocate the inspection points in the jurisdiction to the inspectors based on the planning results, and formulate a global path planning strategy with the highest overall inspection efficiency, the most inspection points, and the balanced task volume, so as to solve the problem of inefficiency caused by the inspectors' mechanical and fixed planning of inspection paths based on experience and the implementation method of fighting alone, and assist the inspectors to more effectively discover and deal with environmental pollution problems.
[0087] The present invention is described with reference to flowcharts and / or block diagrams of methods, devices (systems), and computer program products according to embodiments of the present invention. It should be understood that each process and / or block in the flowchart and / or block diagram, as well as the combination of processes and / or blocks in the flowchart and / or block diagram, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, a special-purpose computer, an embedded processor, or other programmable data processing device to produce a machine, so that the instructions executed by the processor of the computer or other programmable data processing device generate instructions for implementing the processes in the flowchart and / or block diagram. Figure 1 A process or multiple processes and / or boxes Figure 1 A device that provides the functions specified in a block or multiple blocks.
[0088] These computer program instructions may also be stored in a computer-readable memory capable of directing a computer or other programmable data processing device to operate in a specific manner, so that the instructions stored in the computer-readable memory produce an article of manufacture comprising an instruction device, which implements the process Figure 1 A process or multiple processes and / or boxes Figure 1 A function specified in one or more boxes.
[0089] These computer program instructions can also be loaded onto a computer or other programmable data processing device so that a series of operating steps are executed on the computer or other programmable device to produce a computer-implemented process, thereby providing instructions for implementing the process. Figure 1 A process or multiple processes and / or boxes Figure 1 The steps for the functions specified in one or more boxes.
[0090] The present invention uses specific embodiments to illustrate the principles and implementation methods of the present invention. The description of the above embodiments is only used to help understand the method of the present invention and its core idea. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as a limitation on the present invention.
[0091] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.
Claims
1. A global path planning method for point inspection based on multi-vehicle collaborative scheduling, characterized by: The following steps are involved: S1. Obtain the data of the points to be checked and the basic data of the inspectors and merge them to obtain the merged data of the points to be checked; S2. Based on the data of the points to be checked and the basic data of the inspectors, the travel time matrix is obtained; S3. Based on the travel time matrix, the improved ant colony algorithm is used to perform path planning on the merged data of the points to be checked to obtain a path planning solution; The basic data of inspectors include the number of inspectors and their location information; the location information of inspectors is the longitude and latitude of the inspectors’ location, i.e. ;in, Indicates The location information of each inspector, , , Respectively represent the first, second, and The location information of each inspector; The data of the point to be checked is the longitude and latitude of the location of the point, that is, ;in, Indicates The location information of the points to be checked. , , Respectively represent the first, second, and The location information of the points to be checked; The step S2 comprises the following steps: S2-1. Determine the number of processes based on the basic data of the points to be checked and the location information of the inspectors. ; S2-2. Use Python to create a process pool; S2-3, according to the number of processes , divide the tasks into various processes and asynchronously calculate the travel time until all processes are completed; the travel time includes the travel time of inspectors to different points and the travel time between points; S2-4, merging all travel times into an initial travel time matrix; S2-5, replacing the 0 values in the initial travel time matrix with 1 to obtain a travel time matrix; The step S3 comprises the following steps: S3-1. Set the number of ants , Iterations , pheromone importance factor , Heuristic Factor , pheromone evaporation rate And the pheromone increment coefficient ; S3-2. Set the initial pheromone matrix and the initial optimal solution for each inspector , the optimal solution travel cost of each inspector and the inspection time of the points to be inspected; S3-3, taking the location information of each inspector as the starting point of the ants; S3-4, randomize the starting order of the ants; S3-5, calculating the probability of each ant selecting a point to be checked; S3-6. Select the points to be checked according to probability; S3-7. Determine the travel cost of each inspector based on the travel time matrix; S3-8, sorting the total time of the travel cost and point inspection time of each inspector to obtain the selection order; S3-9. Each inspector selects the next point to be inspected in the order of selection until the last inspector completes the selection; S3-10, repeating steps S3-5 to S3-9 until all the points to be checked are checked, that is, the path construction is completed, and the path construction result is obtained; S3-11, based on the quality of the path found by each ant and the pheromone evaporation rate And the pheromone increment coefficient Update the initial pheromone matrix; the path quality is the sum of the path duration and the point inspection duration; S3-12, obtain the mean value of the optimal solution travel cost of each inspector and the mean value of the objective function corresponding to each ant; S3-13, compare the average of the optimal solution transit costs of each inspector and the average of the objective function corresponding to each ant; if the average of the objective function corresponding to the optimal solution transit cost of each inspector is less than the average of the objective function corresponding to each ant, then the optimal solution transit cost of each inspector and the initial optimal solution of each inspector are used as the initial output data; otherwise, the objective function and path construction result of the current number of iterations are used as the initial output data; S3-14, determine the current number of iterations Is it not less than the number of iterations? ; If yes, the current initial output data is used as the final output data, i.e., the path planning scheme; otherwise, the current number of iterations is increased by 1 and the process returns to step S3-5; wherein the initial value of the number of iterations is 0; The formula of step S3-11 is: in, Indicates the number of iterations Node and nodes The pheromones between Indicates the current iteration number Node and nodes The pheromones between Indicates that the ant is at the node To Node The path quality, Represents ants The node order of the current node in the current path solution, Represents ants The total number of nodes in the current path solution.
2. The method for global path planning for point inspection based on multi-vehicle collaborative scheduling according to claim 1 is characterized in that: The merging in step S1 refers to splicing the data of the points to be checked and the location information of the inspectors.
3. The method for global path planning for point inspection based on multi-vehicle collaborative scheduling according to claim 1 is characterized in that: The initial pheromone matrix The dimension of is consistent with the travel time matrix.
4. The method for global path planning for point inspection based on multi-vehicle collaborative scheduling according to claim 1 is characterized in that: The calculation formula of the probability of step S3-5 is: in, Indicates Only ants on the node Select Node The probability of Representation Node and nodes The pheromones between Indicates that the ant is at the node To Node The travel time, Indicates the remaining set of nodes to be checked. Representation Node and nodes The pheromones between Indicates that the ant is at the node To Node The travel time, Represents a sum function.
5. The method for global path planning for point inspection based on multi-vehicle collaborative scheduling according to claim 1 is characterized in that: The formula of the objective function of step S3-12 is: in, represents the objective function, represents the minimum function, Indicates the time taken to check the point. represents the summation function, Represents ants The total number of nodes in the current path solution; Indicates that the ant is at the node To Node The travel time.
