A path planning method for achieving full coverage of regional road network
By building the adjacency matrix of traffic intersections and optimizing path planning, the problem of incomplete coverage of the middle road network in the regional comprehensive search is solved, and the effect of full coverage of the road network and shortest route is achieved, ensuring the fast and efficient completion of regional search.
Patent Information
- Application Number
- CN202410551640.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-05-07
- Publication Date
- 2025-04-11
- Estimated Expiration
- 2044-05-07
AI Technical Summary
The existing technology has the problem that some road sections are missing in the regional comprehensive search task, and the road network is not covered, resulting in missing searches and failing to quickly and efficiently complete the regional search task.
By constructing an adjacency matrix of traffic intersections in the area, using "section traversal" as the optimization goal, path planning is carried out to achieve complete coverage of the road network in the designated area, and the total length of the route is close to the global optimal solution.
The regional road network is fully covered, avoiding missed searches and searches, and completing regional search tasks quickly and efficiently, with the total length of the route close to the global optimal solution.
Smart Images

Figure CN118504799B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of regional comprehensive search, and in particular relates to a path planning method for achieving full coverage of a regional road network. Background Art
[0002] Comprehensive regional search missions often occur in disaster relief, military operations and other scenarios, and require traversing all road sections in a specified area to complete the regional search mission. In this process, completing the comprehensive regional search mission with the shortest total route length and the shortest search time is conducive to ensuring the safety of rescue operations and the success of military operations.
[0003] The core of the regional comprehensive search task is the path planning problem under the constraint of full coverage of the road network. That is, based on the regional road network information, all road sections within the specified area are connected in series in sequence, while ensuring that the total length of the search route is the shortest, and planning the optimal search path. This path planning problem is usually abstracted as the minimum traveling salesman problem, taking the traffic intersections in the regional road network as necessary points or key points, and solving the planning results through relevant optimization algorithms. However, since the minimum traveling salesman problem completes path planning with the traversal of key points as constraints, there is a problem that all traffic intersections in the specified area are searched, while some sections are not searched, resulting in omissions in the search and failure to achieve full coverage of the road network. Summary of the invention
[0004] 1. Technical issues to be resolved
[0005] The technical problem to be solved by the present invention is: how to realize regional road section traversal through a path planning method with full coverage of the regional road network, avoid missed searches and achieve the effect of quickly and efficiently completing the regional search task.
[0006] (II) Technical solution
[0007] In order to solve the above technical problems, the present invention provides a path planning method for achieving full coverage of a regional road network. The path planning method constructs an adjacency matrix of traffic intersections in the region according to the regional road network information, takes "road section traversal" as the optimization goal, and performs path planning to achieve full coverage of the road network in the specified area by the planned path, and the total length of the route is close to the global optimal solution;
[0008] The path planning method comprises:
[0009] Step 1: Construct the adjacency matrix;
[0010] Step 2: Plan the path sequence.
[0011] Among them, in the link of constructing the adjacency matrix in step 1, the adjacency matrix is a two-dimensional matrix that can reflect the adjacency relationship and distance between traffic intersections; the specific construction steps are as follows:
[0012] Step 11: Initialization;
[0013] Assume that there are N traffic intersections in the specified area, and number these traffic intersections as 1, 2, 3, ..., i, ..., j, ..., N in sequence; then define an N × N zero matrix, denoted as the adjacency matrix M, with element M i,j Record the adjacency relationship and distance between the traffic intersection numbered i and the traffic intersection numbered j; initialize i=1, j=i+1;
[0014] Step 12: Quantify the adjacency relationship between two traffic intersections and fill the adjacency matrix;
[0015] Check the adjacency relationship between the traffic intersection numbered i and the traffic intersection numbered j, where 1≤i≤N-1, i+1≤j≤N: If the traffic intersection numbered i is not adjacent to the traffic intersection numbered j, then replace the element M of the adjacency matrix M i,j = -1; if the traffic intersection numbered i is adjacent to the traffic intersection numbered j, the path length between the two traffic intersections is calculated using the path search algorithm, and the element M of the adjacency matrix M is i,j Set to the calculated path length;
[0016] Step 13: Update the traffic intersection numbers and fill in the upper triangle of the adjacency matrix;
[0017] Update the traffic intersection numbers i and j: when j < N, set j = j + 1, and then loop through step 12; when j = N, and i < N-1, set i = i + 1, j = i + 1, and then loop through step 12; when j = N, and i = N-1, exit the loop and continue to step 14. At this point, the adjacency matrix M will become an upper triangular matrix with all diagonal elements being 0, indicating that the distance between the traffic intersection numbered i and itself is 0;
[0018] Step 14: Get the complete adjacency matrix;
[0019] Let M = M + M T , and a complete adjacency matrix M is obtained. The adjacency matrix M is a symmetric matrix. The physical meaning of the 1st to Nth columns of the i-th row is the adjacency relationship and distance between the traffic intersection numbered i and the traffic intersections numbered 1 to N in sequence. The physical meaning of the 1st to Nth rows of the i-th column is also the adjacency relationship and distance between the traffic intersection numbered i and the traffic intersections numbered 1 to N in sequence.
[0020] Among them, the adjacency matrix M represents the adjacency relationship and distance between traffic intersections through the values of matrix elements, specifically: the positive and negative signs of the matrix elements represent whether two different traffic intersections are adjacent; the positive value of the matrix elements represents the distance between two different traffic intersections; the matrix element of 0 represents the distance from the traffic intersection to itself.
[0021] The complete adjacency matrix M is a symmetric matrix, and the physical meaning of the 1st to Nth columns of the i-th row of the adjacency matrix M is the adjacency relationship and distance size between the traffic intersection numbered i and the traffic intersections numbered 1 to N in sequence, and the physical meaning of the 1st to Nth rows of the i-th column is also the adjacency relationship and distance size between the traffic intersection numbered i and the traffic intersections numbered 1 to N in sequence;
[0022] The distance is expressed in the form of path length, as follows:
[0023] The element set of the first row is: the set of path lengths between the traffic intersection numbered 1 and all N traffic intersections including itself in the specified area; among them, the first column is the path length between the traffic intersection numbered 1 and itself, that is, 0; the second column to the Nth column are the path lengths between the traffic intersection numbered 1 and the remaining N-1 traffic intersections in sequence;
[0024] The element set of the second row is: the set of path lengths between the traffic intersection numbered 2 and all N traffic intersections including itself in the specified area; among them, the second column is the path length between the traffic intersection numbered 2 and itself, that is, 0; the first column is the path length between the traffic intersection numbered 2 and the traffic intersection numbered 1, and the third to Nth columns are the path lengths between the traffic intersection numbered 2 and the remaining N-2 traffic intersections in sequence;
[0025] And so on.
[0026] The element set of the N-1th row is: the set of path lengths between the traffic intersection numbered N-1 and all the N traffic intersections in the specified area including itself; the N-1th column is the path length between the traffic intersection numbered N-1 and itself, that is, 0; the Nth column is the path length between the traffic intersection numbered N-1 and the traffic intersection numbered N; the 1st to N-2nd columns are the path lengths between the traffic intersection numbered N and the remaining N-2 traffic intersections in sequence;
[0027] The element set of the Nth row is: the set of path lengths between the traffic intersection numbered N and all N traffic intersections including itself in the specified area; among them, the Nth column is the path length between the traffic intersection numbered N and itself, that is, 0; the 1st column to the N-1th column are the path lengths between the traffic intersection numbered N and the remaining N-1 traffic intersections in sequence.
[0028] The path search algorithm involved in step 14 includes an A* algorithm and a breadth-first search algorithm.
[0029] Among them, in the link of path sequence planning in step 2, all road sections in the specified area are traversed by traversing the elements with positive values in the adjacency matrix; the specific details of step 2 are as follows:
[0030] Initialization: Assume that the starting point of the path planning is the traffic intersection numbered a in the aforementioned specified area, 1≤a≤N, then the a-th row M in the adjacency matrix M a,: Indicates the adjacency relationship and distance between the traffic intersection numbered a and the traffic intersections numbered 1 to N in sequence;
[0031] Step 21: Determine whether the road network is fully covered;
[0032] When there is a positive number in the element of the adjacency matrix M, it indicates that there is a road section in the specified area that has not been passed, and then continue with the subsequent steps; otherwise, it indicates that all road sections in the specified area are completely covered, then exit the planning, and output the traffic intersection number sequence according to the traffic intersection numbers that the planned route passes through in sequence;
[0033] Step 22: Determine whether there is an adjacent traffic intersection at the current traffic intersection;
[0034] For the a-th row M in the adjacency matrix M a,: , that is, the row corresponding to the traffic intersection numbered a: if the M a,: There are multiple positive numbers in the row element, indicating that the traffic intersection numbered a has multiple adjacent traffic intersections, and the adjacent traffic intersections are referred to as adjacent intersections. Then one of the multiple adjacent intersections is selected as the destination point, and specifically, the following steps 23 to 24 are executed;
[0035] If the M a,: If there is a unique positive number in the row element, it means that the traffic intersection numbered a has only one adjacent intersection, then the unique adjacent intersection is used as the destination point, and then step 26 is executed;
[0036] If the M a,: If there is no positive number in the row element, it means that the traffic intersection numbered a has no adjacent traffic intersections, then one of the other traffic intersections with adjacent traffic intersections is selected as the destination point, and the specific steps are as follows:
[0037] Step 23: extracting the number of adjacent intersections of each of the multiple adjacent intersections of the current traffic intersection;
[0038] Extract the adjacency matrix M a,: The column numbers b, c, d, ... corresponding to the positive numbers of the row elements are the numbers of the adjacent intersections of the traffic intersection numbered a. The numbers of adjacent intersections of the traffic intersection numbered b, the traffic intersection numbered c, the traffic intersection numbered d, ... are counted in turn and recorded as a two-row multi-column matrix A. In the matrix A, the first row elements are the numbers b, c, d, ..., and the second row elements are the numbers of adjacent intersections of the traffic intersections numbered b, c, d, ...;
[0039] Step 24: Determine a destination point from a plurality of adjacent intersections;
[0040] Determine how many 1s there are in the second row of the matrix A, that is, determine how many traffic intersections with numbers b, c, d, ... have only one adjacent intersection:
[0041] If one or more values in the second row of the matrix A are equal to 1, indicating that one or more traffic intersections with only one adjacent intersection exist among the traffic intersections numbered b, c, d, ..., then the traffic intersection with only one adjacent intersection among the traffic intersections numbered b, c, d, ... is taken as a potential destination point; further judgment: if the number of potential destination points is 1, then the one potential destination point is taken as the destination point; if there are multiple potential destination points, then according to the distance between the potential destination point and the traffic intersection numbered a, that is, according to the element value of the column where the potential destination point is located in the a-th row of the adjacency matrix M, the potential destination point with the closest distance is taken as the destination point, and then step 26 is executed;
[0042] If the elements of the second row of the matrix A are all greater than 1, indicating that the traffic intersections numbered b, c, d, ... have multiple adjacent intersections, then according to the distance between the traffic intersections numbered b, c, d, ... and the traffic intersection numbered a, that is, according to the element value of the column where the traffic intersections numbered b, c, d, ... are located in the a-th row of the adjacency matrix M, the traffic intersection with the closest distance is taken as the destination point, and then step 26 is executed;
[0043] Step 25: Determine the destination point from other traffic intersections with adjacent intersections;
[0044] According to the adjacency matrix M, rows s, p, q, ... with positive numbers are selected, indicating that the traffic intersections numbered s, p, q, ... have adjacent intersections; from the traffic intersections numbered s, p, q, ..., the traffic intersection closest to the traffic intersection numbered a is selected as the destination point, and then step 26 is executed;
[0045] Step 26: Record the destination point and update the adjacency matrix;
[0046] After determining the destination point, assuming that the destination point number is t, record the destination point number t in sequence after the traffic intersection number a; replace the element M in the adjacency matrix M with a,t and M t,a Set to -1, indicating that the road section between the traffic intersection numbered a and the traffic intersection numbered t has been planned; then update the current traffic intersection number a to the destination point number t, and then return to step 21.
[0047] Wherein, in step 25, the distance between the traffic intersections numbered s, p, q, ... and the traffic intersection numbered a is calculated using Manhattan distance.
[0048] Wherein, in step 23, the construction process of matrix A is as follows: the first row of the matrix is filled with the numbers b, c, d, ... of the adjacent intersections of traffic intersection a; the second row of the matrix is counted and recorded the number of adjacent intersections of adjacent intersections b, c, d, ...; for the first column of the second row of matrix A, the number of adjacent intersections of traffic intersection numbered b is counted, that is, the bth row M is found in the adjacency matrix M. b,: , statistics of the M b,: The number of positive numbers in the row is filled into the column numbered b in the second row of matrix A; the other columns of the second row of matrix A are obtained by sequentially counting the number of adjacent intersections of traffic intersections numbered c, d, ...
[0049] Wherein, in the step 24, if the traffic intersection numbered b and the traffic intersection numbered c each have only one adjacent intersection, but the distance between the traffic intersection numbered b and the traffic intersection numbered a is smaller than the distance between the traffic intersection numbered c and the traffic intersection numbered a, then the traffic intersection numbered b is used as the destination point;
[0050] In step 24, if the traffic intersections numbered b, c, d, ... all have more than one adjacent intersection, but the distance between the traffic intersection numbered b and the traffic intersection numbered a is the smallest, the traffic intersection numbered b is used as the destination point.
[0051] Among them, the path sequence planning method selects the point closest to the current starting point a as the destination point in each decision-making step, so the total length of the planned route is close to the global optimal result of the shortest path; at the same time, the calculation of the path planning method only involves numerical addition and numerical size comparison, and its running time is only used to traverse the matrix and find element values; since the number of traffic intersections N is limited, the calculation speed of the path planning method is quite fast and has strong stability.
[0052] (III) Beneficial effects
[0053] Compared with the prior art, the present invention aims at the problem that some road sections are missed in the regional comprehensive search task, and proposes a path planning method that can achieve full coverage of the road network. While traversing all road sections in the specified area, the route length is optimized to be the shortest, ensuring that the regional comprehensive search task is completed quickly and efficiently.
[0054] Specifically, the path planning method for achieving full coverage of a regional road network provided by the present invention reflects the adjacency relationship and distance of traffic intersections in a specified area by constructing an adjacency matrix, and achieves full coverage of the road network in the specified area by traversing the elements in the adjacency matrix.
[0055] This method screens out alternative destination points through the element values of the adjacency matrix, and then counts the number of adjacent intersections of each alternative destination point according to the adjacency matrix. Then, the destination point is determined according to the number of adjacent intersections of the alternative destination point and the distance from the current traffic intersection, and finally the planned path sequence is output in the form of a traffic intersection number sequence.
[0056] In each decision, the nearest point is selected as the destination point, so that the total length of the planned route is close to the global optimal result of the shortest path. At the same time, after the adjacency matrix is calculated, the path planning speed is fast and stable, which is suitable for real-time decision-making. BRIEF DESCRIPTION OF THE DRAWINGS
[0057] Figure 1-Figure 4 It is a schematic diagram of the process of the technical solution of the present invention.
[0058] Figure 5 Schematic diagram of an intersection according to an embodiment of the present invention. DETAILED DESCRIPTION
[0059] In order to make the purpose, content, and advantages of the present invention more clear, the specific implementation methods of the present invention are further described in detail below in conjunction with the accompanying drawings and examples.
[0060] In order to solve the above technical problems, the present invention provides a path planning method for achieving full coverage of a regional road network. The path planning method constructs an adjacency matrix of traffic intersections in the region according to the regional road network information, takes "road section traversal" as the optimization goal, and performs path planning to achieve full coverage of the road network in the specified area by the planned path, and the total length of the route is close to the global optimal solution;
[0061] like Figure 1 and Figure 2 As shown, the path planning method includes:
[0062] Step 1: Construct the adjacency matrix;
[0063] Step 2: Plan the path sequence.
[0064] Among them, Figure 3 As shown, in the step 1 of constructing the adjacency matrix, the adjacency matrix is a two-dimensional matrix that can reflect the adjacency relationship and distance between traffic intersections; the specific construction steps are as follows:
[0065] Step 11: Initialization;
[0066] Assume that there are N traffic intersections in the specified area, and number these traffic intersections as 1, 2, 3, ..., i, ..., j, ..., N in sequence; then define an N × N zero matrix, denoted as the adjacency matrix M, with element M i,j Record the adjacency relationship and distance between the traffic intersection numbered i and the traffic intersection numbered j; initialize i=1, j=i+1;
[0067] Step 12: Quantify the adjacency relationship between two traffic intersections and fill the adjacency matrix;
[0068] Check the adjacency relationship between the traffic intersection numbered i and the traffic intersection numbered j, where 1≤i≤N-1, i+1≤j≤N: If the traffic intersection numbered i is not adjacent to the traffic intersection numbered j, then replace the element M of the adjacency matrix M i,j = -1; if the traffic intersection numbered i is adjacent to the traffic intersection numbered j, the path length between the two traffic intersections is calculated using the path search algorithm, and the element M of the adjacency matrix M is i,j Set to the calculated path length;
[0069] Step 13: Update the traffic intersection numbers and fill in the upper triangle of the adjacency matrix;
[0070] Update the traffic intersection numbers i and j: when j < N, set j = j + 1, and then loop through step 12; when j = N, and i < N-1, set i = i + 1, j = i + 1, and then loop through step 12; when j = N, and i = N-1, exit the loop and continue to step 14. At this point, the adjacency matrix M will become an upper triangular matrix with all diagonal elements being 0, indicating that the distance between the traffic intersection numbered i and itself is 0;
[0071] Step 14: Get the complete adjacency matrix;
[0072] Let M = M + M T , and a complete adjacency matrix M is obtained. The adjacency matrix M is a symmetric matrix. The physical meaning of the 1st to Nth columns of the i-th row is the adjacency relationship and distance between the traffic intersection numbered i and the traffic intersections numbered 1 to N in sequence. The physical meaning of the 1st to Nth rows of the i-th column is also the adjacency relationship and distance between the traffic intersection numbered i and the traffic intersections numbered 1 to N in sequence.
[0073] Among them, the adjacency matrix M represents the adjacency relationship and distance between traffic intersections through the values of matrix elements, specifically: the positive and negative signs of the matrix elements represent whether two different traffic intersections are adjacent; the positive value of the matrix elements represents the distance between two different traffic intersections; the matrix element of 0 represents the distance from the traffic intersection to itself.
[0074] The complete adjacency matrix M is a symmetric matrix, and the physical meaning of the 1st to Nth columns of the i-th row of the adjacency matrix M is the adjacency relationship and distance size between the traffic intersection numbered i and the traffic intersections numbered 1 to N in sequence, and the physical meaning of the 1st to Nth rows of the i-th column is also the adjacency relationship and distance size between the traffic intersection numbered i and the traffic intersections numbered 1 to N in sequence;
[0075] The distance is expressed in the form of path length, as follows:
[0076] The element set of the first row is: the set of path lengths between the traffic intersection numbered 1 and all N traffic intersections including itself in the specified area; among them, the first column is the path length between the traffic intersection numbered 1 and itself, that is, 0; the second column to the Nth column are the path lengths between the traffic intersection numbered 1 and the remaining N-1 traffic intersections in sequence;
[0077] The element set of the second row is: the set of path lengths between the traffic intersection numbered 2 and all N traffic intersections including itself in the specified area; among them, the second column is the path length between the traffic intersection numbered 2 and itself, that is, 0; the first column is the path length between the traffic intersection numbered 2 and the traffic intersection numbered 1, and the third to Nth columns are the path lengths between the traffic intersection numbered 2 and the remaining N-2 traffic intersections in sequence;
[0078] And so on.
[0079] The element set of the N-1th row is: the set of path lengths between the traffic intersection numbered N-1 and all the N traffic intersections in the specified area including itself; the N-1th column is the path length between the traffic intersection numbered N-1 and itself, that is, 0; the Nth column is the path length between the traffic intersection numbered N-1 and the traffic intersection numbered N; the 1st to N-2nd columns are the path lengths between the traffic intersection numbered N and the remaining N-2 traffic intersections in sequence;
[0080] The element set of the Nth row is: the set of path lengths between the traffic intersection numbered N and all N traffic intersections including itself in the specified area; among them, the Nth column is the path length between the traffic intersection numbered N and itself, that is, 0; the 1st column to the N-1th column are the path lengths between the traffic intersection numbered N and the remaining N-1 traffic intersections in sequence.
[0081] The path search algorithm involved in step 14 includes an A* algorithm and a breadth-first search algorithm.
[0082] Among them, Figure 4 As shown, in the link of path sequence planning in step 2, all road sections in the specified area are traversed by traversing the elements with positive values in the adjacency matrix; the specific details of step 2 are as follows:
[0083] Initialization: Assume that the starting point of the path planning is the traffic intersection numbered a in the aforementioned specified area, 1≤a≤N, then the a-th row M in the adjacency matrix M a,: Indicates the adjacency relationship and distance between the traffic intersection numbered a and the traffic intersections numbered 1 to N in sequence;
[0084] Step 21: Determine whether the road network is fully covered;
[0085] When there is a positive number in the element of the adjacency matrix M, it indicates that there is a road section in the specified area that has not been passed, and then continue with the subsequent steps; otherwise, it indicates that all road sections in the specified area are completely covered, then exit the planning, and output the traffic intersection number sequence according to the traffic intersection numbers that the planned route passes through in sequence;
[0086] Step 22: Determine whether there is an adjacent traffic intersection at the current traffic intersection;
[0087] For the a-th row M in the adjacency matrix M a,: , that is, the row corresponding to the traffic intersection numbered a: if the M a,: There are multiple positive numbers in the row element, indicating that the traffic intersection numbered a has multiple adjacent traffic intersections, and the adjacent traffic intersections are referred to as adjacent intersections. Then one of the multiple adjacent intersections is selected as the destination point, and specifically, the following steps 23 to 24 are executed;
[0088] If the M a,: If there is a unique positive number in the row element, it means that the traffic intersection numbered a has only one adjacent intersection, then the unique adjacent intersection is used as the destination point, and then step 26 is executed;
[0089] If the M a,:If there is no positive number in the row element, it means that the traffic intersection numbered a has no adjacent traffic intersections, then one of the other traffic intersections with adjacent traffic intersections is selected as the destination point, and the specific steps are as follows:
[0090] Step 23: extracting the number of adjacent intersections of each of the multiple adjacent intersections of the current traffic intersection;
[0091] Extract the adjacency matrix M a,: The column numbers b, c, d, ... corresponding to the positive numbers of the row elements are the numbers of the adjacent intersections of the traffic intersection numbered a. The numbers of adjacent intersections of the traffic intersection numbered b, the traffic intersection numbered c, the traffic intersection numbered d, ... are counted in turn and recorded as a two-row multi-column matrix A. In the matrix A, the first row elements are the numbers b, c, d, ..., and the second row elements are the numbers of adjacent intersections of the traffic intersections numbered b, c, d, ...;
[0092] Step 24: Determine a destination point from a plurality of adjacent intersections;
[0093] Determine how many 1s there are in the second row of the matrix A, that is, determine how many traffic intersections with numbers b, c, d, ... have only one adjacent intersection:
[0094] If one or more values in the second row of the matrix A are equal to 1, indicating that one or more traffic intersections with only one adjacent intersection exist among the traffic intersections numbered b, c, d, ..., then the traffic intersection with only one adjacent intersection among the traffic intersections numbered b, c, d, ... is taken as a potential destination point; further judgment: if the number of potential destination points is 1, then the one potential destination point is taken as the destination point; if there are multiple potential destination points, then according to the distance between the potential destination point and the traffic intersection numbered a, that is, according to the element value of the column where the potential destination point is located in the a-th row of the adjacency matrix M, the potential destination point with the closest distance is taken as the destination point, and then step 26 is executed;
[0095] If the elements of the second row of the matrix A are all greater than 1, indicating that the traffic intersections numbered b, c, d, ... have multiple adjacent intersections, then according to the distance between the traffic intersections numbered b, c, d, ... and the traffic intersection numbered a, that is, according to the element value of the column where the traffic intersections numbered b, c, d, ... are located in the a-th row of the adjacency matrix M, the traffic intersection with the closest distance is taken as the destination point, and then step 26 is executed;
[0096] Step 25: Determine the destination point from other traffic intersections with adjacent intersections;
[0097] According to the adjacency matrix M, rows s, p, q, ... with positive numbers are selected, indicating that the traffic intersections numbered s, p, q, ... have adjacent intersections; from the traffic intersections numbered s, p, q, ..., the traffic intersection closest to the traffic intersection numbered a is selected as the destination point, and then step 26 is executed;
[0098] Step 26: Record the destination point and update the adjacency matrix;
[0099] After determining the destination point, assuming that the destination point number is t, record the destination point number t in sequence after the traffic intersection number a; replace the element M in the adjacency matrix M with a,t and M t,a Set to -1, indicating that the road section between the traffic intersection numbered a and the traffic intersection numbered t has been planned; then update the current traffic intersection number a to the destination point number t, and then return to step 21.
[0100] Wherein, in step 25, the distance between the traffic intersections numbered s, p, q, ... and the traffic intersection numbered a is calculated using Manhattan distance.
[0101] Wherein, in step 23, the construction process of matrix A is as follows: the first row of the matrix is filled with the numbers b, c, d, ... of the adjacent intersections of traffic intersection a; the second row of the matrix is counted and recorded the number of adjacent intersections of adjacent intersections b, c, d, ...; for the first column of the second row of matrix A, the number of adjacent intersections of traffic intersection numbered b is counted, that is, the bth row M is found in the adjacency matrix M. b,: , statistics of the M b,: The number of positive numbers in the row is filled into the column numbered b in the second row of matrix A; the other columns of the second row of matrix A are obtained by sequentially counting the number of adjacent intersections of traffic intersections numbered c, d, ...
[0102] Wherein, in the step 24, if the traffic intersection numbered b and the traffic intersection numbered c each have only one adjacent intersection, but the distance between the traffic intersection numbered b and the traffic intersection numbered a is smaller than the distance between the traffic intersection numbered c and the traffic intersection numbered a, then the traffic intersection numbered b is used as the destination point;
[0103] In step 24, if the traffic intersections numbered b, c, d, ... all have more than one adjacent intersection, but the distance between the traffic intersection numbered b and the traffic intersection numbered a is the smallest, the traffic intersection numbered b is used as the destination point.
[0104] Among them, the path sequence planning method selects the point closest to the current starting point a as the destination point in each decision-making step, so the total length of the planned route is close to the global optimal result of the shortest path; at the same time, the calculation of the path planning method only involves numerical addition and numerical size comparison, and its running time is only used to traverse the matrix and find element values; since the number of traffic intersections N (no more than one hundred) is limited, the calculation speed of the path planning method is quite fast and has strong stability.
[0105] Example 1
[0106] This embodiment assumes that the road network in a certain specified area is as follows Figure 5 As shown, there are 8 traffic intersections in the area, and the coordinates of each traffic intersection are as follows Figure 5 shown.
[0107] First, construct the adjacency matrix of these eight traffic intersections. The specific steps are:
[0108] (1-1) Number these 8 traffic intersections 1, 2, 3, ..., 7, 8 in sequence and define the adjacency matrix Let i=1, j=2, where 1≤i≤7, 2≤j≤8;
[0109] (1-2) After judgment, traffic intersection #1 and traffic intersection #2 are adjacent, so the path length between them is calculated, and the result is 5. Therefore, let the element M in the adjacency matrix 1,2 =5;
[0110] (1-3) Update j = 3. After judgment, traffic intersection #1 and traffic intersection #3 are not adjacent, so let the element M in the adjacency matrix 1,3 = -1; ... until i = 7, j = 8, after judgment, traffic intersection #7 and traffic intersection #8 are adjacent, and the path length between the two is calculated to be 5, so let the element M in the adjacency matrix 7,8 =5; the upper triangular part of the adjacency matrix is obtained as follows:
[0111]
[0112] (1-4) Let M = M + M T , and get the complete adjacency matrix
[0113]
[0114] Then, assuming that traffic intersection #1 is the starting point of path planning, the path sequence is planned according to the adjacency matrix. The specific steps are:
[0115] (2-1) If there is a positive number in the current adjacency matrix M, then plan the next destination point;
[0116] (2-2) For the first row in the adjacency matrix M, there are two positive numbers in the elements of this row, indicating that there are two adjacent intersections at traffic intersection #1, and it is necessary to select one of these two adjacent intersections as the destination point;
[0117] (2-3) The first row of the adjacency matrix M has positive elements in the second and eighth columns, indicating that intersection #1 is adjacent to intersection #2 and intersection #8 at the same time. The number of adjacent intersections between intersection #2 and intersection #8 is counted, and the statistical results are recorded as
[0118] (2-4) After judgment, there is no 1 in the second row of matrix A, indicating that both #2 and #8 have multiple adjacent intersections. Then, according to the distance between #2 and #1 being 5, #2 is the closest, so #2 is determined as the destination point.
[0119] (2-5) Sequentially record the path point numbers [1,2], and let M 1,2 =M 2,1 =-1, that is, update the adjacency matrix to Update the current traffic intersection to traffic intersection #2;
[0120] (2-6) After judgment, if there is a positive number in the adjacency matrix M, continue planning; according to the above steps, the destination point is planned to be traffic intersection #3, and the path point numbers [1,2,3] are recorded in sequence, and M is set to 2,3 =M 3,2 =-1, update the adjacency matrix to Update the current traffic intersection to traffic intersection #3;
[0121] (2-7) After judgment, if there is a positive number in the adjacency matrix M, then continue planning; for the third row in the adjacency matrix M, there is only one positive number in the elements of this row, indicating that the #3 traffic intersection has only one adjacent intersection, which is the #4 traffic intersection. Then the #4 traffic intersection is taken as the destination point, and the path point numbers [1,2,3,4] are recorded in sequence, and M is set. 3,4 =M 4,3 =-1, update the adjacency matrix to Update the current traffic intersection to #4 traffic intersection;
[0122] (2-8) After judgment, if there is a positive number in the adjacency matrix M, continue planning and get the destination point as traffic intersection #5. Record the path point numbers [1, 2, 3, 4, 5] in sequence and let M 4,5 =M 5,4 =-1, update the adjacency matrix to Update the current traffic intersection to #5 traffic intersection;
[0123] (2-9) After judgment, if there is a positive number in the adjacency matrix M, the planning continues; for the 5th row in the adjacency matrix M, there are 2 positive numbers in the elements of this row, namely the 2nd column and the 7th column, indicating that the #5 traffic intersection is adjacent to the #2 traffic intersection and the #7 traffic intersection at the same time; count the number of adjacent traffic intersections of the #2 traffic intersection and the #7 traffic intersection, and record the statistical results as There is only one 1 in the second row of matrix A, corresponding to traffic intersection #2, so traffic intersection #2 is taken as the destination point; record the path point numbers [1,2,3,4,5,2] in sequence, and let M 5,2 =M 2,5 =-1, update the adjacency matrix to Update the current traffic intersection to traffic intersection #2;
[0124] (2-10) After judgment, if there are positive numbers in the adjacency matrix M, then continue planning; for the second row in the adjacency matrix M, there are no positive numbers in the elements of this row, indicating that the #2 traffic intersection has no adjacent intersections, then filter out the rows 1, 4, 5, 6, 7, and 8 with positive numbers in the adjacency matrix; recalculate the distances between the #2 traffic intersection and the #1, #4, #5, #6, #7, and #8 traffic intersections, and find that the #5 traffic intersection is the closest to the #2 traffic intersection, then determine that the #5 traffic intersection is the destination point; sequentially record the path point numbers [1, 2, 3, 4, 5, 2, 5]; update the current traffic intersection to the #5 traffic intersection;
[0125] (2-11) After judgment, if there is a positive number in the adjacency matrix M, then continue planning... until there is no positive number in the adjacency matrix; finally, the traffic intersection number sequence of the planned path is [1,2,3,4,5,2,5,7,6,4,7,8,1].
[0126] In summary, the present invention belongs to the technical field of regional comprehensive search, and specifically relates to a path planning method for achieving full coverage of a regional road network. The path planning method plans the search path based on the regional road network information, with the optimization goal of achieving full coverage of the road network and the shortest total route length; the path planning method includes: step 1: the link of adjacency matrix construction; step 2: the link of path sequence planning. The path planning method takes "road section traversal" as the optimization goal, and can make the planned path completely cover all road sections in the specified area; at the same time, the path planning method selects the one closest to the current traffic intersection from the potential destination points as the destination point in each decision-making step, so the total length of the planned route is close to the global optimal result of the shortest path. In actual application, the adjacency relationship between each traffic intersection in a specified area is usually fixed, but the starting point of path planning is usually temporarily specified. Since the calculation of the path sequence planning link in step 2 of the method only involves numerical addition and numerical comparison, its running time is only used to traverse the matrix and find element values. Therefore, the path planning method has high computational efficiency and stability, and can be more flexibly applied to scenarios where the road network remains unchanged but the starting point of path planning changes randomly.
[0127] The above is only a preferred embodiment of the present invention. It should be pointed out that for ordinary technicians in this technical field, several improvements and modifications can be made without departing from the technical principles of the present invention. These improvements and modifications should also be regarded as the scope of protection of the present invention.
Claims
1. A path planning method for achieving full coverage of a regional road network, characterized in that: The path planning method constructs an adjacency matrix of traffic intersections in the region according to the regional road network information, takes "road section traversal" as the optimization goal, and performs path planning to achieve complete coverage of the road network in the specified area by the planned path and a total route length close to the global optimal solution; The path planning method comprises: Step 1: Construct the adjacency matrix; Step 2: Planning the path sequence; In the step 1 of constructing the adjacency matrix, the adjacency matrix is a two-dimensional matrix that can reflect the adjacency relationship and distance between traffic intersections; the specific construction steps are as follows: Step 11: Initialization; Define an N×N zero matrix, denoted as adjacency matrix M, element M i,j Record the adjacency relationship and distance between the traffic intersection numbered i and the traffic intersection numbered j; initialize i=1, j=i+1; Step 12: Quantify the adjacency relationship between two traffic intersections and fill the adjacency matrix; If the traffic intersection numbered i is not adjacent to the traffic intersection numbered j, then the element M of the adjacency matrix M is i,j = -1; if the traffic intersection numbered i is adjacent to the traffic intersection numbered j, the path length between the two traffic intersections is calculated using the path search algorithm, and the element M of the adjacency matrix M is i,j Set to the calculated path length; Step 13: Update the traffic intersection numbers and fill in the upper triangle of the adjacency matrix; Update the traffic intersection numbers i and j: when j < N, set j = j + 1, and then loop through step 12; when j = N, and i < N-1, set i = i + 1, j = i + 1, and then loop through step 12; when j = N, and i = N-1, exit the loop and continue to step 14. At this point, the adjacency matrix M will become an upper triangular matrix with all diagonal elements being 0, indicating that the distance between the traffic intersection numbered i and itself is 0; Step 14: Get the complete adjacency matrix; Let M = M + M T , get the complete adjacency matrix M, which is a symmetric matrix; In the link of path sequence planning in step 2, all road sections in the specified area are traversed by traversing the elements with positive values in the adjacency matrix; the specific details of step 2 are as follows: Initialization: Assume that the starting point of the path planning is the traffic intersection numbered a in the aforementioned specified area, 1≤a≤N, then the a-th row M in the adjacency matrix M a,: Indicates the adjacency relationship and distance between the traffic intersection numbered a and the traffic intersections numbered 1 to N in sequence; Step 21: Determine whether the road network is fully covered; When there is a positive number in the element of the adjacency matrix M, it indicates that there is a road section in the specified area that has not been passed, and then continue with the subsequent steps; otherwise, it indicates that all road sections in the specified area are completely covered, then exit the planning, and output the traffic intersection number sequence according to the traffic intersection numbers that the planned route passes through in sequence; Step 22: Determine whether there is an adjacent traffic intersection at the current traffic intersection; For the a-th row M in the adjacency matrix M a,: , that is, the row corresponding to the traffic intersection numbered a: if the M a,: There are multiple positive numbers in the row element, indicating that the traffic intersection numbered a has multiple adjacent traffic intersections, and the adjacent traffic intersections are referred to as adjacent intersections. Then one of the multiple adjacent intersections is selected as the destination point, and specifically, the following steps 23 to 24 are executed; If the M a,: If there is a unique positive number in the row element, it means that the traffic intersection numbered a has only one adjacent intersection, then the unique adjacent intersection is used as the destination point, and then step 26 is executed; If the M a,: If there is no positive number in the row element, it means that the traffic intersection numbered a has no adjacent traffic intersections, then one of the other traffic intersections with adjacent traffic intersections is selected as the destination point, and the specific steps are as follows: Step 23: extracting the number of adjacent intersections of each of the multiple adjacent intersections of the current traffic intersection; Extract the adjacency matrix M a,: The column numbers b, c, d, ... corresponding to the positive numbers of the row elements are the numbers of the adjacent intersections of the traffic intersection numbered a. The number of adjacent intersections of the traffic intersection numbered b, the traffic intersection numbered c, the traffic intersection numbered d, ... are counted in turn and recorded as a two-row and multi-column matrix A; Step 24: Determine a destination point from a plurality of adjacent intersections; Determine how many 1s there are in the second row of the matrix A: If one or more values in the second row of the matrix A are equal to 1, indicating that one or more of the traffic intersections numbered b, c, d, ... have only one adjacent intersection, then the traffic intersections numbered b, c, d, ... that have only one adjacent intersection are taken as potential destination points; further judgment: if the number of potential destination points is 1, then the one potential destination point is taken as the destination point; if there are multiple potential destination points, then according to the distance between the potential destination point and the traffic intersection numbered a, the potential destination point with the closest distance is taken as the destination point, and then step 26 is executed; If the elements of the second row of matrix A are all greater than 1, indicating that the traffic intersections numbered b, c, d, ... have multiple adjacent intersections, then according to the distance between the traffic intersections numbered b, c, d, ... and the traffic intersection numbered a, the traffic intersection with the closest distance is taken as the destination point, and then step 26 is executed; Step 25: Determine the destination point from other traffic intersections with adjacent intersections; According to the adjacency matrix M, select rows s, p, q, ... containing positive numbers; select the traffic intersection closest to the traffic intersection numbered a from the traffic intersections numbered s, p, q, ... as the destination point, and then execute step 26; Step 26: Record the destination point and update the adjacency matrix; After determining the destination point, assuming that the destination point number is t, record the destination point number t in sequence after the traffic intersection number a; replace the element M in the adjacency matrix M with a,t and M t,a Set to -1, indicating that the road section between the traffic intersection numbered a and the traffic intersection numbered t has been planned; then update the current traffic intersection number a to the destination point number t, and then return to step 21.
2. The path planning method for achieving full coverage of a regional road network as claimed in claim 1, characterized in that: The adjacency matrix M represents the adjacency relationship and distance between traffic intersections through the values of the matrix elements. Specifically, the positive and negative signs of the matrix elements represent whether two different traffic intersections are adjacent; the positive value of the matrix elements represents the distance between two different traffic intersections; and the matrix element of 0 represents the distance from the traffic intersection to itself.
3. The path planning method for achieving full coverage of a regional road network as claimed in claim 2, characterized in that: The complete adjacency matrix M is a symmetric matrix, and the physical meaning of the 1st to Nth columns of the i-th row of the adjacency matrix M is the adjacency relationship and distance size between the traffic intersection numbered i and the traffic intersections numbered 1 to N in sequence, and the physical meaning of the 1st to Nth rows of the i-th column is also the adjacency relationship and distance size between the traffic intersection numbered i and the traffic intersections numbered 1 to N in sequence; The distance is expressed in the form of path length, as follows: The element set of the first row is: the set of path lengths between the traffic intersection numbered 1 and all N traffic intersections including itself in the specified area; among them, the first column is the path length between the traffic intersection numbered 1 and itself, that is, 0; the second column to the Nth column are the path lengths between the traffic intersection numbered 1 and the remaining N-1 traffic intersections in sequence; The element set of the second row is: the set of path lengths between the traffic intersection numbered 2 and all N traffic intersections including itself in the specified area; among them, the second column is the path length between the traffic intersection numbered 2 and itself, that is, 0; the first column is the path length between the traffic intersection numbered 2 and the traffic intersection numbered 1, and the third to Nth columns are the path lengths between the traffic intersection numbered 2 and the remaining N-2 traffic intersections in sequence; And so on. The element set of the N-1th row is: the set of path lengths between the traffic intersection numbered N-1 and all the N traffic intersections in the specified area including itself; the N-1th column is the path length between the traffic intersection numbered N-1 and itself, that is, 0; the Nth column is the path length between the traffic intersection numbered N-1 and the traffic intersection numbered N; the 1st to N-2nd columns are the path lengths between the traffic intersection numbered N and the remaining N-2 traffic intersections in sequence; The element set of the Nth row is: the set of path lengths between the traffic intersection numbered N and all N traffic intersections including itself in the specified area; among them, the Nth column is the path length between the traffic intersection numbered N and itself, that is, 0; the 1st column to the N-1th column are the path lengths between the traffic intersection numbered N and the remaining N-1 traffic intersections in sequence.
4. The path planning method for achieving full coverage of a regional road network as claimed in claim 1, characterized in that: The path search algorithms involved in step 14 include A* algorithm and breadth-first search algorithm.
5. The path planning method for achieving full coverage of a regional road network as claimed in claim 3, characterized in that: In step 25, the distance between the traffic intersections numbered s, p, q, ... and the traffic intersection numbered a is calculated using the Manhattan distance.
6. The path planning method for achieving full coverage of a regional road network as claimed in claim 3, characterized in that: In step 23, the construction process of matrix A is as follows: the first row of the matrix is filled with the numbers b, c, d, ... of the adjacent intersections of traffic intersection a; the second row of the matrix is counted and recorded the number of adjacent intersections of adjacent intersections b, c, d, ...; for the first column of the second row of matrix A, the number of adjacent intersections of traffic intersection numbered b is counted, that is, the bth row M is found in the adjacency matrix M. b,: , statistics of the M b,: The number of positive numbers in the row is filled into the column numbered b in the second row of matrix A; the other columns of the second row of matrix A are obtained by sequentially counting the number of adjacent intersections of traffic intersections numbered c, d, ...
7. The path planning method for achieving full coverage of a regional road network as claimed in claim 3, characterized in that: In step 24, if the traffic intersection numbered b and the traffic intersection numbered c each have only one adjacent intersection, but the distance between the traffic intersection numbered b and the traffic intersection numbered a is smaller than the distance between the traffic intersection numbered c and the traffic intersection numbered a, the traffic intersection numbered b is used as the destination point; In step 24, if the traffic intersections numbered b, c, d, ... all have more than one adjacent intersection, but the distance between the traffic intersection numbered b and the traffic intersection numbered a is the smallest, the traffic intersection numbered b is used as the destination point.
8. The path planning method for achieving full coverage of a regional road network as claimed in claim 3, characterized in that: The path sequence planning method selects the point closest to the current starting point a as the destination point in each decision-making step, so the total length of the planned route is close to the global optimal result of the shortest path; at the same time, the calculation of the path planning method only involves numerical addition and numerical size comparison, and its running time is only used to traverse the matrix and find element values; since the number of traffic intersections N is limited, the calculation speed of the path planning method is quite fast and has strong stability.
Citation Information
Patent Citations
AGV shortest path planning method, device and computer readable storage medium
CN111832844A
Full-coverage path planning method and device and storage medium
CN113359699A