Express delivery path planning method based on shortest loop
By constructing the outermost convex polygon path planning loop and inserting and deleting path segments, the shortest loop problem in express delivery path planning in the prior art is solved, efficiency and accuracy are improved, and path planning for multiple delivery locations is suitable.
Patent Information
- Application Number
- CN202411584020.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Priority Date
- 2023-11-07
- Filing Date
- 2024-11-07
- Publication Date
- 2025-03-04
- Estimated Expiration
- Not applicable · inactive patent
Smart Images

Figure CN119558757A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to an express delivery path planning method based on the shortest loop, and belongs to the field of path planning. Background Art
[0002] Normally, it is impossible for a courier to deliver all the parcels in one trip, so the courier will deliver the parcels separately for multiple times. Each delivery starts from the courier station, passes through multiple delivery locations, and then returns to the courier station (to prepare for the next delivery). This delivery process can be called loop delivery, and the shortest path planning for this delivery is called shortest loop path planning. The technical method of this path planning belongs to the fields of artificial intelligence, new generation information technology, etc., and this path planning method can solve the last-mile delivery problem in the express delivery field. Of course, it can also be applied to real situations such as tourism planning, bus planning, school bus route planning, and even various scheduling methods can be applied.
[0003] The express delivery route planning of the shortest loop is a kind of multi-express delivery route planning. It can be explained by taking the example of high school students delivering homework books: when the study committee member delivers homework books, he knows the position of each student and how to get to each student's position. But the problem is that if the order of the homework books in the class is messy, then the study committee member will have to run around to deliver the homework books, which is very inefficient. However, if the order of the homework books is arranged one by one according to the seats, the delivery of the homework books will be much smoother. We have done experiments in a class of 50 people. If the homework books are messy, 10 minutes after class, one student delivers the homework books, and the students are not allowed to pass the homework books. The delivery is barely completed in 10 minutes, but if the homework books are arranged in the order of seats, the delivery is completed within 2 minutes. The efficiency is more than 5 times worse. This problem is that the study committee member needs to know which student goes first and which student goes later, which is the root of the shortest loop problem.
[0004] Back to the field of express delivery, it is actually the same thing as homework book delivery. The express parcels in the hands of the couriers are not arranged in order. Their daily delivery depends on their own experience and judgment. As long as the parcels are scattered and the number exceeds 10, there will be problems in their delivery.
[0005] Looking at the world, in the United States, express delivery giants such as Amazon, DHL, TNT, etc., all have their own express delivery platforms, which have multiple express delivery route planning (but there is no express delivery route planning with the shortest loop), so we studied the express delivery route planning with the shortest loop.
[0006] Comparing with the existing navigation software, Amap has multi-point route planning for no more than 17 locations, and Baidu claims to have route planning for no more than 17 locations (but in actual use, after entering 17 locations, Baidu route planning will freeze during calculation and no results can be calculated). The reason why it can only be limited to 17 locations is that there is no multi-point route planning method with high calculation efficiency and correct results every time. Now the only method that can get correct results every time route planning no matter how many locations there are is the full arrangement route planning method, because the problem of multi-express route planning is attributed to the order of delivery of express delivery (you can recall the delivery of homework books), and the so-called order is the full arrangement problem, which is the problem of which delivery location should go first and which should go later. And we can easily know that there are 18! schemes for the full arrangement of 18 delivery locations, plus each scheme needs to calculate the total distance value (add 17 times), and after obtaining each distance value, the minimum distance value must be selected, and the amount of calculation is far more than 18! *17+18! =108840352997376000+6402373705728000=115,242,726,703,104,000≈115242.7 trillion times. It is understandable why navigation software can only provide multi-point route planning of 17 points at most and is not used in the express delivery industry.
[0007] In reality, it is difficult to compare the before and after use of our route planning, because the same courier does not deliver the same group of couriers each time. It is even more difficult to compare couriers, because they deliver different groups of couriers, different destinations, different traffic conditions, different vehicle performance, etc., and a large number of couriers need to cooperate in comparative testing, which we cannot do. But we compare the number of calculations of the full permutation method for a group of courier locations at the same time, and compare the number of calculations of our method, so as to know how much our method has improved.
[0008] Now let’s do a more in-depth comparison of the methods:
[0009] To determine whether a method is an ideal shortest-loop express delivery route planning method, three criteria must be met simultaneously: the first is whether the shortest path can be found; the second is whether the result is stable; and the third is whether the method is efficient.
[0010] 1. Theoretical methods.
[0011] There are many solutions to the existing shortest loop express delivery route planning problem, which can be roughly divided into five categories:
[0012] (1) Various regular methods, such as the mileage saving method and the nearest point method, although they are efficient, they cannot stably find the shortest path.
[0013] (2) Methods related to full permutation, such as full permutation method, branch and bound method, and javascript's Rebuild method. The full permutation method is a stable method for finding the shortest path, but its computational efficiency is very low. The other methods are its derivative methods. They are all stable methods for finding the shortest path, but their computational efficiency is low and they cannot meet actual needs.
[0014] (III) Various simulation methods, such as ant colony method, fish swarm method, particle swarm method, annealing method, etc., are all methods for simulating real phenomena. Their characteristics are that if they want to be efficient, then the probability of finding the shortest path is very low. If they want to increase the probability of finding the shortest path, then the computational efficiency of the method is very low, so it is not the best method. In addition, all swarm methods have a large amount of simulation calculations in the computer, so they are not considered efficient methods.
[0015] (IV) Genetic method: Genetic method is the most widely used method now. It aims to obtain the closest value of the shortest loop problem in a limited time, but it cannot guarantee that the shortest path can be obtained. Because each mutation and iteration cannot be guaranteed to be correct, there is a certain degree of randomness, and under the premise of not knowing the final result, the iteration has no goal and does not know when it will end. It can only find a better solution in the iteration within the specified time.
[0016] (V) Artificial intelligence method: The effect is similar to the above method, but it has a fatal flaw, because artificial intelligence method requires human training of the machine so that the machine has intelligence. However, it is difficult for humans to find the answer to the shortest loop problem, let alone training the machine.
[0017] (VI) Various random methods. This method is to use the result of one of the above methods and randomly change the path multiple times in the result to find the shortest path. This method is random, so it cannot meet the standard of stability and uniqueness, so it is not the best method.
[0018] (VII) Use server integration and full permutation methods and other methods to achieve the optimal solution to the shortest loop problem. However, this method does not belong to the solution of the method, and in reality, the cost of using server integration to calculate the shortest loop problem is too high. Many navigation companies are also using this solution, but if advanced methods are used in the same server integration environment, the results will be obtained more efficiently.
[0019] 2. Logistics-related enterprise software
[0020] The most famous is the Cainiao Express Service Platform, which has always claimed to have better multi-point route planning (this route planning is similar to solving the shortest loop express delivery problem), but in fact it has never made its products and services public. A survey of Cainiao Express Station employees also found that none of them had used these software functions.
[0021] Other logistics companies only have logistics cargo dispatching systems, but do not have the express delivery route planning function with the shortest loop as we mentioned. Summary of the invention
[0022] In order to overcome the defects of the prior art, the present invention provides a method for express delivery path planning based on the shortest loop. The technical solution of the present invention is:
[0023] A method for express delivery route planning based on the shortest loop includes the following steps:
[0024] a. Determine the location of the express station as the starting and ending point, and determine the longitude and latitude of all delivery locations;
[0025] b. Use the distribution location dispersion judgment formula to determine whether the distribution locations are dispersed;
[0026] c. When the delivery locations are scattered, path planning is performed to find the outermost convex polygon path planning loop, and then find the outermost convex polygon path planning loop in the remaining locations until the number of remaining locations is less than or equal to 3;
[0027] d. Let CvPg1 represent the outermost convex polygon path planning loop, the second convex polygon path planning loop is CvPg2, and so on, CvPg3, CvPg4, ..., CvPgi, where i represents the number of convex path planning loops in the route, and all path planning loops form a planning loop; let the set of locations of the outermost convex path planning loop be CPP1, the set of locations of the second convex path planning loop be CPP2, and so on, CPP3, CPP4, ..., CPPi, where i represents the number of convex path planning loops;
[0028] e. Determine the first migration location FMP of the second layer convex polygon path planning loop CvPg2;
[0029] f. In the outermost convex polygon path planning loop CvPg1, determine the first judgment location DP[1], and determine the insertion position of FMP in CvPg1 in a clockwise direction;
[0030] g. Insert the FMP point at the determined insertion position to form a new set of CvPg1, CvPg2 and their corresponding locations, and record the new insertion location FMP in the set NIP; determine the next location of FMP as the new FMP location in the original CvPg2 in a clockwise direction; determine the last dp location in the new CvPg1 in a clockwise direction As the first judgment location;
[0031] h. Repeat steps e to g. The insertion position cannot be the dp location. until the set of locations corresponding to CvPg2 is empty; at the same time, all locations and paths in CvPg2 are deleted, and all its original locations are inserted into the path planning of CvPg1;
[0032] i. After all the locations in CvPg2 are inserted into CvPg1, if there are any convex path planning loops left besides CvPg1, then the remaining CvPg3, CvPg4, ... CvPgi are similar to CvPg2. First, clear the NIP set and repeat steps e to h. Insert all the locations of the convex path planning loops into CvPg1 until only CvPg1 is left in the planning loop.
[0033] j. When there is only CvPg1 in the planning loop, but there are one or two locations left that have not been inserted into CvPg1, these points are treated as a convex path planning loop. After the process of inserting CvPg2 into CvPg1 is executed, the path planning of all locations is completed;
[0034] j. When there is only CvPg1 in the planning loop and all points are on CvPg1, the planning loop is the final path planning result.
[0035] In step a, the locations of the known express delivery stations, i.e., the starting point and the end point, are represented by P[0], and all the delivery locations, including the longitude and latitude of these locations, the number of which is greater than or equal to 10, are represented by P[1], P[2], P[3] to P[m], where m is the number of delivery locations, m>=10, and all the locations form a set of points KP; each location has its longitude and latitude, represented as:
[0036] KP={P[0].x,P[0].y,P[1].x,P[1].y,P[2].x,P[2].y......,P[m].x,P[m].y}(10≤m), where x is longitude and y is latitude;
[0037] The paths between all locations are connected; the shortest distances between all locations are known, and a shortest distance matrix PTP is formed, where PTP[P[1], P[2]] represents the distance value from P[1] to P[2], that is, PTP[P[i], P[j]] represents the distance value from the i-th location to the j-th location.
[0038] The step b is specifically:
[0039] Determine whether the delivery locations in GA are dispersed, that is, whether they are on the same path. If they are dispersed, continue with path planning. If they are not dispersed, use the Dijkstra path planning method on the outbound journey and use the Dijkstra path planning method again on the return journey.
[0040] The distribution location dispersion determination method is as follows:
[0041]
[0042] [(P[k].yP[0].y) / (P[k].xP[0].x)]-[(P[m].yP[0].y) / (P[m].xP[0].x)]≠0,
[0043] k>0,k<m,m>0,m=Count(KP)-1,
[0044] P[m].xP[0].x≠0 and P[k].xP[0].x≠0;
[0045] Wherein, P[k]: represents the kth delivery location in the delivery location set KP;
[0046] P[k]∈KP: indicates that P[k] is an element of the distribution location set KP;
[0047] P[0]: usually represents the location of the starting point or delivery station; P[k].y and P[k].x: represent the latitude and longitude of the delivery location P[k] respectively;
[0048] P[0].y and P[0].xP[0].x: represent the latitude and longitude of the starting point P[0] respectively;
[0049] P[m]: represents the mth delivery location in the delivery location set KP, where mm is the index of the last element in the set, i.e., m = Count(KP) - 1;
[0050] Count(KP): represents the number of elements in the set KP, that is, the total number of delivery locations;
[0051] k > 0 and k < m: It means that k is a positive integer, and the value of k is between the indices of the first delivery location and the last delivery location;
[0052] m > 0: It means that m is a positive integer and is the index of the last element in the set;
[0053] P[m].x - P[0].x ≠ 0 and P[k].x - P[0].x ≠ 0: It means that the longitudes of the last delivery location and the starting point are not equal; and the longitudes of the k-th delivery location and the starting point are also not equal; This is to avoid the situation of division by zero.
[0054] The specific steps of step c are as follows:
[0055] 1.1 Determine the path planning loop formed by four vertices to form a four-vertex path planning loop; The four locations of this four-vertex path planning loop are TP[1], TP[2], TP[3], TP[4], where TP[1] represents the leftmost location in the four-vertex path planning loop, that is, the point with the largest y value when the value of coordinate x is the smallest. In the clockwise direction, the order of the locations is TP[1], TP[2], TP[3], TP[4]. The following are their definitions:
[0056]
[0057] Finally, this four-vertex path planning loop is GAF = {TP[1], TP[2], TP[3], TP[4]} and its distance matrix FPTP:
[0058]
[0059] In the distance matrix FPTP, V1, V2, V3, V4 are distance values greater than 0, with the unit of kilometers. Their specific values are obtained from PTP. Null represents that there is no direct path between two locations. For example, FPTP[TP[1], TP[2]] = V1 means that there is a path between TP[1] and TP[2], and the distance value is V1, while FPTP[TP[1], TP[3]] = Null represents that there is no direct path between TP[1] and TP[3];
[0060] The distance values of the distance matrix FPTP are obtained from the shortest distance matrix PTP;
[0061] 1.2 Find the center point CP of the four-vertex path planning loop. The method for obtaining the center point CP is as follows:
[0062]
[0063]
[0064] n is the number of points of the convex path rule;
[0065] 1.3 Find the location outside the four-vertex path planning loop:
[0066] They all establish straight line paths with the CP point to form their own straight line paths; the straight line paths established by the p point and the CP point will have intersections with the four-vertex path planning loop; when the p point is in the straight line path and has the following relationship with its two intersection points IP: the p point is not between the two intersection points, then the p point is an external point within the four-vertex path planning loop; the points connected by the solid path straight line are external points, while the points connected by the virtual path straight line are internal points within the four-vertex path planning loop;
[0067] 1.4 Set an external point set GAF_EP for the external points;
[0068] 1.5 Establish a set PL that records locations and paths. It records the section of the road where the nearest intersection between location p and the straight path to location p is located. It can be expressed as:
[0069]
[0070] 1.6 Set an interior point set GAF_IP for the interior points;
[0071] 1.7 Select the outer point and combine it with the four-vertex path planning loop to form the outermost convex path planning loop;
[0072] The triangular path loop formed by each location in PL and the road segment corresponding to the location is used to calculate the set of distance saving values. The specific method is as follows:
[0073]
[0074] DST is a triangular path loop composed of all locations in PL and their corresponding road segments. With the locations in PL as vertices, the set of distance-saving values of its triangular path loop is calculated;
[0075] v(p,AB) is the distance saved in the triangular path loop consisting of location p and the corresponding road segment AB, with location p as the vertex;
[0076] 1.8 Among all the distance-saving values, select the maximum distance-saving value, and according to its v(p,AB), establish the path from point p to points A and B in GAF, and delete the corresponding section AB of p; the specific corresponding set operations are as follows:
[0077] GAF=GAF∪p, GAF_EP=GAF_EP-p;
[0078] The corresponding matrix operation is to operate on the FPTP matrix. First, add a row and a column at location p, and then set it as follows:
[0079] FPTP[A,B]=NullFPTP[p,A]=PTP[p,A], FPTP[p,B]=PTP[p,B]
[0080] FPTP[A,p]=PTP[p,A], FPTP[B,p]=PTP[p,B]
[0081] FPTP[p,p]=0
[0082] Except for the elements FPTP[p,A], FPTP[A,p], FPTP[B,p], FPTP[p,B], and FPTP[p,p], all other values in the p column and p row of FPTP are set to Null;
[0083] Delete all distance-saving values for location p and its corresponding road segment AB until the DST set is empty.
[0084] Described step e is specifically:
[0085]
[0086] Let Plc be a proper subset of CPP2, Plo represents the elements in Plc, and P is an arbitrary location in CPP2.
[0087] Described step f is specifically:
[0088]
[0089] Let Plc be a proper subset of CPP1, Plo represents an element in Plc, and P is any location in CPP1;
[0090] In the clockwise direction, in the outermost convex path planning loop, the point adjacent to DP[1] is DP[2], i.e., the second judgment point, and the point adjacent to DP[2] is DP[3], i.e., the third judgment point. Similarly, there are DP[4], DP[5], ... DP[i], i = Count(CPP1);
[0091] In the relationship between each pair of adjacent points in CvPg1 and the triangular loop path formed by FMP, their distance saving values are calculated to obtain the distance saving value set of CvPg1. The calculation method of the set is as follows:
[0092] C_DST=
[0093] {D(DP[i],DP[i+1])|
[0094] D(DP[i],DP[i+1])=PTP[FMP,DP[i]]+PTP[FMP,DP[i+1]]-PTP[DP[i],DP[i+1]]}∪
[0095] {D(DP[n],DP[1])|
[0096] D(DP[n],DP[1])=PTP[FMP,DP[n]]+PTP[FMP,DP[1]]-PTP[DP[n],DP[1]]}
[0097] i=1,2,3...n,n=Count(CPP1)-1
[0098] ; Where C_DST is the set of saved distance values, D(DP[i], DP[i+1]) represents the saved path value calculated by two adjacent locations DP[i] and DP[i+1] and the location FMP. For example, D(DP[1], DP[2]) represents the saved path value calculated in the triangular loop path formed by FMP, DP[1] and DP[2].
[0099] Find the minimum distance saving value in C_DST, and determine the insertion position of FMP based on this value; find the minimum distance saving value D(DP[n], DP[m]) in C_DST, DP[n] and DP[m] are adjacent judgment locations, n and m refer to the nth and mth judgment locations, and FMP is inserted between locations DP[n] and DP[m].
[0100] The step g is specifically as follows:
[0101] In CvPg1, a triangular loop path is established with FMP as the vertex and two adjacent judgment points as the base points, and the section between the adjacent judgment points is deleted; in CvPg2, the FMP location and the path connected to it are deleted;
[0102] Update the set of locations corresponding to CvPg1 and CvPg2; add FMP to the set NIP;
[0103] The sets of locations corresponding to CvPg1 and CvPg2 are CPP1 and CPP2, which are respectively where FMP is added and deleted, and where FMP is added in NIP.
[0104] The advantages of the present invention are:
[0105] Efficiency improvement: By constructing a convex polygon path planning loop, the complex calculation of the full arrangement is avoided, greatly improving the efficiency of path planning. Especially when there are a large number of delivery locations, compared with the traditional full arrangement method, the number of calculations is significantly reduced, which improves the calculation speed.
[0106] Stability: This method plans the path through a series of deterministic steps, ensuring the stability and consistency of each planning result.
[0107] Accuracy: Through decentralized judgment and convex polygon path planning, the shortest loop path can be found, ensuring the accuracy of path planning.
[0108] Scalability: This method is not only suitable for express delivery, but can also be extended to various scenarios such as tourism planning, bus planning, school bus route planning, etc.
[0109] Practicality: This method can solve the problem of "last mile" delivery in the express delivery field and has high practical value.
[0110] Automation: Automating path planning through algorithms reduces the time and effort of manual planning while reducing the possibility of human error.
[0111] Optimize resource allocation: This method can optimize the delivery routes of couriers and reduce unnecessary trips, thereby saving time and costs and improving resource utilization efficiency. BRIEF DESCRIPTION OF THE DRAWINGS
[0112] Figure 1 It is the GA diagram of the present invention.
[0113] Figure 2 It is the GAF diagram of the present invention.
[0114] Figure 3 It is the CP position diagram of the present invention.
[0115] Figure 4 It is a straight line path diagram connected to CP of the present invention.
[0116] Figure 5 It is a schematic diagram of external point judgment of the present invention.
[0117] Figure 6 It is a schematic diagram of the combination of the external point and GAF of the present invention.
[0118] Figure 7 It is a schematic diagram of the combination of the interior point and GAF of the present invention.
[0119] Figure 8 It is the outermost convex path planning loop CvPg1 of the present invention.
[0120] Fig. 9It is the convex path planning loop graph CGA of each layer.
[0121] Fig.10 It is the new CGA graph of the convex path planning loop graph of each layer.
[0122] Fig.11 This is the CGA graph after CvPg2 is merged into CvPg1.
[0123] Fig.12 It is the final path planning result diagram of the present invention. DETAILED DESCRIPTION
[0124] The present invention will be further described below in conjunction with specific embodiments, and the advantages and features of the present invention will become clearer as the description proceeds. However, these embodiments are exemplary only and do not constitute any limitation to the scope of the present invention. It should be understood by those skilled in the art that the details and forms of the technical solution of the present invention may be modified or replaced without departing from the spirit and scope of the present invention, but these modifications and replacements all fall within the scope of protection of the present invention.
[0125] See also Figures 1 to 12 The present invention relates to a method for express delivery path planning based on the shortest loop, specifically:
[0126] 1. Prophet conditions:
[0127] (i) There is already a planar graph that requires the shortest path for express delivery. We use GA to represent it, such as Figure 1 As shown;
[0128] (ii) In GA, we already know the locations of the delivery stations in the graph (i.e., the starting point and the end point, represented by P[0]), as well as all the delivery locations, including their longitudes and latitudes. The number of locations is greater than or equal to 10. We use P[1], P[2], P[3] to P[m] to represent the delivery locations in GA, where m is the number of delivery locations, m>=10, and all the locations form a point set KP. Each location has its longitude and latitude, or coordinates, which can be expressed as: KP = {P[i](x,y)|P[0](x,y),P[1](x,y),P[2](x,y),......,P[m](x,y)}(10≤m), where x is longitude and y is latitude. There is also another way of expression: KP = {P[0].x,P[0].y,P[1].x,P[1].y,P[2].x,P[2].y......,P[m].x,P[m].y}(10≤m), which is also a set of KP locations, and each location also has longitude and latitude.
[0129] The relevant information for each location in this example is as follows:
[0130] KP={P[0](78,59),P[1](62,96),P[2](76,113),P[3](91,7),P[4](111,116),P[5](129,96) ,P[6](144,71),P[7](125,55),P[8](128,35),P[9](81,31),P
[10] (54,45),P
[11] (150,89)}
[0131] The number of locations m is 11.
[0132] (three) Figure 1 All locations in the map are connected to other locations by paths.
[0133] (iv) The shortest distances between all locations are known, and a shortest distance matrix PTP is formed (such as Matrix 1), where PTP[P[1], P[2]] represents the distance from P[1] to P[2] (i.e., 22 kilometers), and PTP[P[i], P[j]] represents the distance from the i-th location to the j-th location (in kilometers).
[0134]
[0135] 2. Use the distribution location dispersion judgment method to determine whether the distribution locations in GA are dispersed (that is, whether they are on the same path). If they are dispersed, this method can be used for path planning. If they are not dispersed, this method cannot be used, but only the Dijkstra path planning method needs to be used on the outbound journey, and the Dijkstra path planning method needs to be used again on the return journey.
[0136] If the locations in GA are dispersed, then our distribution location dispersion determination method will be satisfied. Our distribution location dispersion determination method is as follows:
[0137]
[0138] [(P[k].yP[0].y) / (P[k].xP[0].x)]-[(P[m].yP[0].y) / (P[m].xP[0].x)]≠0,
[0139] k>0,k<m,m>0,m=Count(KP)-1,
[0140] P[m].xP[0].x≠0 and P[k].xP[0].x≠0
[0141] 3. Find the outermost convex path planning loop (I) Determine the path planning loop consisting of four vertices in GA (referred to as: four-vertex path planning loop).
[0142] The four locations of the four-vertex path planning loop are TP[1], TP[2], TP[3], and TP[4]. TP[1] represents the leftmost location in the four-vertex path planning loop (i.e., the point with the smallest x value and the largest y value). In clockwise direction, the order of the locations is TP[1], TP[2], TP[3], and TP[4]. The following are their definitions:
[0143]
[0144] Finally, the four-vertex path planning loop is GAF = {TP[1], TP[2], TP[3], TP[4]} and its path matrix FPTP, as shown in Matrix 2:
[0145]
[0146] In the distance matrix FPTP, V1, V2, V3, and V4 are distance values greater than 0, in kilometers. Their specific values are obtained from PTP. Null means that there is no directly accessible path between two locations. For example, FPTP[TP[1], TP[2]] = V1, which means that there is a path between TP[1] and TP[2], and the distance value is V1, while FPTP[TP[1], TP[3]] = Null means that there is no direct path between TP[1] and TP[3].
[0147] In this example, for GA, the TP[1], TP[2], TP[3], and TP[4] of the four-vertex path planning loop are P
[10] , P[4], P
[11] , and P[9], respectively, that is, its GAF = {P
[10] (54,45), P[4](111,116), P
[11] (150,89), P[9](81,31)}, and its path matrix FPTP is as follows (Matrix 3):
[0148]
[0149] The distance value of the distance matrix FPTP is obtained from the shortest distance matrix PTP. Figure 2 As shown:
[0150] (ii) Find the center point CP of the four-vertex path planning loop (or convex path planning loop) GAF. The method for finding the center point CP is as follows:
[0151]
[0152]
[0153] n is the number of points of the convex path rule;
[0154] In this example, the center point CP is obtained as:
[0155] CP.x=(54+150+111+81) / 4=99, CP.y=(45+89+116+31) / 4=70.25
[0156] That is, the center point is CP(99,70.25), and the CP position is Figure 3 shown.
[0157] (III) Find the location outside the GAF of the four-vertex path planning loop range (or convex path planning loop range)
[0158] They all establish straight line paths (not line segments) with the CP point to form their own straight line paths.
[0159] In this example, the straight line path is established as follows Figure 4 .
[0160] 2. The straight line paths established by these p points and CP will intersect with the four-vertex path planning loop (or convex path planning loop) GAF.
[0161] 3. When point p is in the straight path and has the following relationship with its two intersection points (IP): point p is not between the two intersection points, then point p is an external point of the four-vertex path planning loop range (or convex path planning loop range) GAF.
[0162] In this example, taking P[1] as an example, Figure 5 (External point judgment example diagram):
[0163] According to this rule, we know that P[1], P[3], P[6], P[7], and P[8] are the outer points of the four-vertex path planning loop (or convex path planning loop) GAF, as shown in Figure 4 In the figure, the locations connected by the solid path straight lines are external points, while the locations connected by the virtual path straight lines are internal points of the four-vertex path planning loop range (or convex path planning loop range) GAF.
[0164] 4. We set an external point set GAF_EP for external points.
[0165] In this example, the four-vertex path planning loop GAF has an external point set GAF_EP = {P[1], P[3], P[6], P[7], P[8]}
[0166] 5. We establish a set PL that records locations and paths. It records the road segment where the nearest intersection between location p and the straight path to location p is located, expressed as Definition 1:
[0167]
[0168] FPTP[A,B]≠Null,A≠B
[0169] Section pCP intersects section AB}
[0170] In this example, according to Definition 1, PL = {(P[1], P[4]P
[10] ), (P[3], P[4]P
[10] ), (P[6], P[9]P
[11] ), (P[7], P[9]P
[11] ), (P[8], P[9]P
[11] )}
[0171] 6. We set an interior point set GAF_IP for the interior points.
[0172] In this example, the four-vertex path planning loop GAF has its interior point set GAF_IP = {P[2], P[5], P
[10] };
[0173] (iv) Select an external point and combine it with the four-vertex path planning loop (or convex path planning loop) GAF to form an outermost convex path planning loop.
[0174] 1. Find the set of distance-saving values for the triangular path loop formed by each location in PL and the road segment corresponding to the location. The specific method is as follows:
[0175]
[0176] DST is a triangular path loop composed of all locations in PL and their corresponding road segments. Taking the locations in PL as vertices, the set of distance-saving values of its triangular path loop is calculated.
[0177] v(p,AB) represents the distance saved in the triangular path loop consisting of location p and the corresponding road segment AB, with location p as the vertex.
[0178] In this example, the distance saving value set of the example is:
[0179] DST={v(p,AB)|
[0180] v(P[1],P
[10] P[4])=PTP[P[1],P
[10] ]+PTP[P[1],P[4]]-FPTP[P
[10] ,P[4]],
[0181] v(P[3],P
[10] P[4])=PTP[P[3],P
[10] ]+PTP[P[3],P[4]]-FPTP[P
[10] ,P[4]],
[0182] v(P[6],P[9]P
[11] )=PTP[P[6],P[9]]+PTP[P[6],P
[11] ]-FPTP[P[9],P
[11] ],
[0183] v(P[7],P[9]P
[11] )=PTP[P[7],P[9]]+PTP[P[7],P
[11] ]-FPTP[P[9],P
[11] ],
[0184] v(P[8],P[9]P
[11] )=PTP[P[8],P[9]]+PTP[P[8],P
[11] ]-FPTP[P[9],P
[11] ],
[0185] }
[0186] DST={v(p,AB)|
[0187] v(P[1],P
[10] P[4])=45+47-86=6,
[0188] v(P[3],P
[10] P[4])=60+27-86=1,
[0189] v(P[6],P[9]P
[11] )=76+13-83=6,
[0190] v(P[7],P[9]P
[11] )=51+35-83=3,
[0191] v(P[8],P[9]P
[11] )=41+52-83=10
[0192] }
[0193] 2. Among all the distance-saving values, select the maximum distance-saving value, and according to its v(p,AB), establish the path from point p to points A and B in GAF, and delete the corresponding section AB of p. The specific corresponding set operations are as follows:
[0194] GAF=GAF∪p, GAF_EP=GAF_EP-p
[0195] The corresponding matrix operation is to operate on the FPTP matrix. First, add a row and a column at location p, and then set it as follows:
[0196] FPTP[A,B]=NullFPTP[p,A]=PTP[p,A], FPTP[p,B]=PTP[p,B]
[0197] FPTP[A,p]=PTP[p,A], FPTP[B,p]=PTP[p,B]
[0198] FPTP[p,p]=0
[0199] Except for the elements FPTP[p,A], FPTP[A,p], FPTP[B,p], FPTP[p,B], and FPTP[p,p], all other values in the p column and p row of FPTP are set to Null.
[0200] Finally, delete all the distance-saving values for location p and its corresponding road segment AB. In this example, the maximum distance-saving value in DST is v(P[8], P[9]P
[11] ) = 10. Then, in GAF, create the paths from P[8] to P[9] and P[8] to P
[11] , and delete the corresponding road segment of P[8] (i.e., road segment P[9]P
[11] ). Figure 6 .
[0201] At the same time, GAF = {P
[10] , P[4], P
[11] , P[8], P[9]}, FAG_EP = {P[1], P[3], P[6], P[7]}, and the FPTP matrix corresponding to GAF is changed to the following (Matrix 4 - FPTP matrix after adding one location):
[0202]
[0203] Finally, in the set of all distance-saving values, delete all distance-saving values that contain the location P[8] or its corresponding road segments P[9]P
[11] , as follows:
[0204] DST={v(p,AB)|
[0205] v(P[1],P
[10] P[4])=6,
[0206] v(P[3],P
[10] P[4])=1,
[0207] }
[0208] 3. Repeat steps 1 and 2 until the DST set is empty.
[0209] In this example, repeating steps 1 and 2 until the DST set is empty results in Figure 7 .
[0210] At the same time, GAF = {P
[10] , P[1], P[4], P
[11] , P[8], P[9]}, FAG_EP = {P[3], P[6], P[7]}, and the FPTP matrix corresponding to GAF is changed to the following (Matrix 5):
[0211]
[0212] 4. Using the current GAF and various matrices and graphs, clear FAG_EP and FAG_IP until there are no external points.
[0213] In this example, after repeated execution of the above, the operation results of the example are as follows:
[0214] The outermost convex path planning loop is as follows Figure 8 .
[0215] 4. Exclude the convex path planning loops that have been formed, and find their outermost convex path planning loops in the remaining locations until the number of remaining locations is less than or equal to 3. If there are exactly 3 remaining locations, then these 3 locations form a triangular loop path. 5. Let the outermost convex path planning loop be represented by CvPg1. In addition to the outermost layer, the second layer of convex path planning loop is CvPg2. By this logic, there are CvPg3, CvPg4, ..., CvPgi, where i represents the number of convex path planning loops in the graph. We name this graph CGA. Let the set of locations of the outermost convex path planning loop be CPP1, and the set of locations of the second layer of convex path planning loop be CPP2. By this logic, there are CPP3, CPP4, ..., CPPi, where i represents the number of convex path planning loops in the graph.
[0216] In this example, according to the operation in Chapter 4, the convex path planning loop graph CGA of each layer is obtained as follows: Fig. 9 .
[0217] from Fig. 9 As can be seen, there are two convex path planning loops in CGA, namely CvPg1 and CvPg2, and their corresponding sets of locations are CPP1 and CPP2
[0218] CPP1={P[1],P[4],P
[11] ,P[6],P[8],P[9],P
[10] }
[0219] CPP2={P[0],P[2],P[3],P[5],P[7]}
[0220] 6. Determine the first migration point FMP of the second-layer convex path planning loop CvPg2.
[0221] According to the following definition, the first migration point of the second-layer convex path planning loop is determined, which is the FMP (Definition 2 Determination of the first migration point):
[0222]
[0223] In Definition 2, let Plc be a proper subset of CPP2, Plo represents the elements in Plc, and P is any location in CPP2.
[0224] In this example, according to Definition 2, by substituting the coordinate values in KP, P[2] is determined to be the FMP (i.e., the first migration point of the second-level convex path planning loop) among the five locations in CPP2.
[0225] 7. In the outermost convex path planning loop CvPg1, determine the first judgment point, which is named DP[1].
[0226] According to Definition 3, in the outermost convex path planning loop, determine the first judgment location.
[0227] Definition 3: Determination of the first judgment location
[0228]
[0229] In Definition 3, let Plc be a proper subset of CPP1, Plo represents the elements in Plc, and P is any location in CPP1.
[0230] In this example, according to Definition 3, by substituting the coordinate values in KP, P
[10] is determined to be the first judgment location among the 7 locations of CPP1, and it is represented by DP[1].
[0231] 8. In the outermost convex path planning loop CvPg1, in a clockwise direction, after the first judgment location DP[1], determine the insertion position of FMP, and the insertion position is between two adjacent locations in CvPg1.
[0232] In the clockwise direction, in the outermost convex path planning loop, the point adjacent to DP[1] is DP[2] (the second judgment point), the point adjacent to DP[2] is DP[3] (the third judgment point), and so on, there are DP[4], DP[5]...DP[i], i=Count(CPP1).
[0233] In this example, DP[1] represents P
[10] , DP[2] represents P[1], DP[3] represents P[4], DP[4] represents P
[11] , DP[5] represents P[6], DP[6] represents P[8], and DP[7] represents P[9].
[0234] In the relationship between each pair of adjacent points in CvPg1 and the triangular loop path formed by FMP, their distance saving values are calculated to obtain a distance saving value set of CvPg1. The calculation method of the set is as follows (Method 5):
[0235] C_DST=
[0236] {D(DP[i],DP[i+1])|
[0237] D(DP[i],DP[i+1])=PTP[FMP,DP[i]]+PTP[FMP,DP[i+1]]-PTP[DP[i],DP[i+1]]}∪
[0238] {D(DP[n],DP[1])|
[0239] D(DP[n],DP[1])=PTP[FMP,DP[n]]+PTP[FMP,DP[1]]-PTP[DP[n],DP[1]]}
[0240] i=1,2,3...n,n=Count(CPP1)-1
[0241] C_DST is a set of distance saving values. D(DP[i], DP[i+1]) represents the distance saving value calculated by two adjacent locations DP[i] and DP[i+1] and location FMP. For example, D(DP[1], DP[2]) represents the distance saving value calculated in the triangular loop path formed by FMP, DP[1] and DP[2].
[0242] In this example, we obtain the distance value from the PTP matrix according to the corresponding relationship in item (3) of this chapter, and substitute it into method 5 to obtain the calculation process and results as follows: C_DST={
[0243] D(DP[1],DP[2])=PTP[FMP,DP[1]]+PTP[FMP,DP[2]]-PTP[DP[1],DP[2]],
[0244] D(DP[2],DP[3])=PTP[FMP,DP[2]]+PTP[FMP,DP[3]]-PTP[DP[2],DP[3]],
[0245] D(DP[3],DP[4])=PTP[FMP,DP[3]]+PTP[FMP,DP[4]]-PTP[DP[3],DP[4]],
[0246] D(DP[4],DP[5])=PTP[FMP,DP[4]]+PTP[FMP,DP[5]]-PTP[DP[4],DP[5]],
[0247] D(DP[5],DP[6])=PTP[FMP,DP[5]]+PTP[FMP,DP[6]]-PTP[DP[5],DP[6]],
[0248] D(DP[6],DP[7])=PTP[FMP,DP[6]]+PTP[FMP,DP[7]]-PTP[DP[6],DP[7]],
[0249] D(DP[7],DP[1])=PTP[FMP,DP[7]]+PTP[FMP,DP[1]]-PTP[DP[7],DP[1]]
[0250] }
[0251] C_DST={
[0252] D(DP[1],DP[2])=27+22-45,
[0253] D(DP[2],DP[3])=22+51-47,
[0254] D(DP[3],DP[4])=51+69-43,
[0255] D(DP[4],DP[5])=69+63-13,
[0256] D(DP[5],DP[6])=63+56-32,
[0257] D(DP[6],DP[7])=56+85-41,
[0258] D(DP[7],DP[1])=85+27-24
[0259] }
[0260] C_DST={
[0261] D(DP[1],DP[2])=4,
[0262] D(DP[2],DP[3])=47,
[0263] D(DP[3],DP[4])=77,
[0264] D(DP[4],DP[5])=119,
[0265] D(DP[5],DP[6])=87,
[0266] D(DP[6],DP[7])=100,
[0267] D(DP[7],DP[1])=88
[0268] }
[0269] Find the minimum distance saving value in C_DST, and determine the insertion position of FMP based on this value. Find the minimum distance saving value D(DP[n], DP[m]) in C_DST, DP[n] and DP[m] are adjacent judgment locations, n and m refer to the nth and mth judgment locations, and FMP is inserted between locations DP[n] and DP[m].
[0270] In this example, the distance saved by D(DP[1], DP[2]) is 4, which is the minimum value in C_DST. Therefore, FMP determines to insert a position between the two adjacent locations DP[1] and DP[2], which are actually P
[10] and P[1].
[0271] 9. Insert the location FMP into the determined insertion position to form a new set of CvPg1, CvPg2 and their corresponding locations, and record the new insertion location FMP into the set NIP.
[0272] (i) In CvPg1, a triangular loop path is established with the FMP as the vertex and two adjacent judgment points as the base points, and the section between the adjacent judgment points is deleted. In CvPg2, the FMP location and the path connected to it are deleted.
[0273] In this example, FMP represents P[2], that is, the path between P
[10] , P[1] and P[2] is established, and the path between P
[10] and P[1] is deleted. At the same time, in CvPg2, the location P[2] and the two sections P[2]P[0] and P[2]P[3] are deleted, as shown in Fig.10 .
[0274] (ii) Update the set of locations corresponding to CvPg1 and CvPg2. Add FMP to the set NIP.
[0275] The sets of locations corresponding to CvPg1 and CvPg2 are CPP1 and CPP2, which are respectively where FMP is added and deleted, and where FMP is added in NIP.
[0276] In this example, the point corresponding to FMP is P[2]. Based on the above description, the results of CPP1, CPP2 and NIP are as follows:
[0277] CPP1={P[1],P[4],P
[11] ,P[6],P[8],P[9],P
[10] ,P[2]}
[0278] CPP2={P[3],P[5],P[7],P[0]}
[0279] NIP = NIP∪FMP, that is, NIP = {P[2]};
[0280] 10. In the original CvPg2, determine the next point of FMP as the new FMP point. In the new CvPg1, determine the last dp point in the clockwise direction. As the first judgment location, repeat the eighth and ninth chapters, and the insertion position cannot be the dp location. Until the set of locations corresponding to CvPg2 is empty, all locations and paths in CvPg2 are deleted, and all its original locations are inserted into CvPg1.
[0281] In this example, the new FMP point should be P[3], but after each repetition, the FMP point changes, and the changes are P[3], P[5], P[7], and P[0]. In CvPg1, the new judgment point is P[2], but after each repetition, the judgment point changes, and the changes are P[2], P[3], P[5], and P[7]. Based on these FMP locations and judgment points, repeat Chapter 8 and
[0282] Chapter 9, and the insertion position cannot be a dp point The following final result is obtained: Fig.11 .
[0283] 11. After all the locations in CvPg2 are inserted into CvPg1, if there is a convex path planning loop besides CvPg1, then the remaining CvPg3, CvPg4, CvPg5, etc. are similar to CvPg2. First, clear the NIP set and repeat similar operations from Chapter 6 to Chapter 10 to insert all the locations of the convex path planning loop into CvPg1 until only CvPg1 remains in the graph.
[0284] 12. When there is only CvPg1 in the graph, but there are still one or two locations that are not in CvPg1, these points are regarded as a convex path planning loop. After executing a similar process as inserting CvPg2 into CvPg1, all the locations in the original graph GA are path planned.
[0285] 13. When there is only CvPg1 in the graph and all locations are on CvPg1, the CGA graph containing CvPg1 is our final path planning result, such as Fig.12 .
[0286] The total distance of the final path planning result is:
[0287] Total distance=PTP[P[0],P[2]]+PTP[P[2],P[1]]+PTP[P[1],P[3]]+PTP[P[3],P[4]]+PTP[P[4],P[5]]+PTP[P[5],P
[11] ]+PTP[P
[11] ,P[6]]+PTP[P[6],P[7]]+PTP[P[7],P[8]]+PTP[P[8],P[9]]+PTP[P[9],P
[10] ]+PTP[P
[10] ,P[0]]
[0288] Total distance = 44 + 22 + 24 + 27 + 20 + 16 + 13 + 18 + 13 + 41 + 24 + 20 = 282 (km)
[0289] After path planning, the order of locations is:
[0290] P[0]→P[2]→P[1]→P[3]→P[4]→P[5]→P
[11] →P[6]→P[7]→P[8]→P[9]→P
[10] →P[0] 14. Compare with the traditional full permutation method.
[0291] (I) Computational complexity of the full permutation method:
[0292] 1: There are a total of 12 locations in this example, but since the position of the express station P[0] in the arrangement remains unchanged, in fact, only 11 locations are being arranged during the arrangement process.
[0293] 2: The sequence number of the full arrangement of 11 locations is 11! =11*10*9*8*7*6*5*4*3*2*1=39916800.
[0294] 3: Each sequence needs to calculate 11 additions to know the distance, so the amount of calculation is 11! *11 = 439,084,800 times, which is about 400 million times.
[0295] 4: After all the distances are calculated, the minimum value is selected. The path sequence corresponding to the minimum value is the shortest path. This step requires comparison 39916800-1 times, so the total number of calculations is 39916800+439084800+39916800-1=518,918,399≈520 million times.
[0296] The computational complexity of this method is:
[0297] The computational complexity of this method is based on this example as the calculation standard, as follows:
[0298] In Chapter 3:
[0299] 1. Find the outermost convex path planning loop. Using this example, first find the four-point four-vertex path planning loop. According to method 2, the total number of comparisons is 44.
[0300] 2. Form the FPTP matrix and read the data 16 times.
[0301] 3. Find the CP location and calculate 10 times.
[0302] 4. To find the external points, 12 operations and 2 comparisons are required to know whether a location is outside the polygon. There are 8 locations here, so add up the number of operations and comparisons and multiply by 8, for a total of 112 times.
[0303] 5. In the process of selecting an external point and combining it with the convex four-vertex path planning loop (or convex path planning loop) GAF, according to method 4, the process of combining an external point into the GAF requires 10 addition and subtraction operations, 4 comparisons, and 6 operations such as establishing edges and deleting road segments to complete a combination. Then, in order to facilitate calculation and improve the estimated value, the remaining 4 external points have the same number of times as the first one, so the number of times of this process is (10+4+6)*5=100 times.
[0304] The total number of times in Chapter 3 is: 282 times.
[0305] In Chapter 4:
[0306] Find out the other convex path planning loops except the outermost convex path planning loop, and their respective times are as follows:
[0307] 1. First find the four-point four-vertex path planning loop. According to method 2, the total number of comparisons is 16 times.
[0308] 2. Find the CP point and perform the calculation 10 times.
[0309] 3. In finding the external points, 12 operations and 2 comparisons are required to know whether a point is outside the polygon. There is 1 point here, so add up the number of operations and comparisons and multiply by 1, for a total of 14 times.
[0310] 4. In the process of selecting an external point and combining it with the convex four-vertex path planning loop (or convex path planning loop) GAF, according to method 4, the process of combining an external point into the GAF requires 10 addition and subtraction operations, 4 comparisons, and 6 operations such as edge creation and edge deletion to complete one combination. The number of times this process is 10+4+6=20 times.
[0311] The total number of times in Chapter 4 is: 60 times.
[0312] In Chapter 5:
[0313] Name various polygons, shapes, and collections. There is no calculation or comparison here, so the number of times is 0.
[0314] The total number of times in Chapter 5 is: 0 times.
[0315] In Chapter 6:
[0316] Determine the first migration point FMP of the second-layer convex path planning loop CvPg2, the specific number is as follows:
[0317] According to Definition 2, 4 comparisons are performed to obtain FMP, so the total number of comparisons is 4.
[0318] The total number of times in Chapter 6 is: 4 times.
[0319] In Chapter 7:
[0320] In the process of determining the first judgment location, the specific times are as follows:
[0321] According to Definition 3, 7 comparisons are performed to determine the first judgment location, so the total number of times is 7.
[0322] The total number of times in Chapter 7 is: 7 times.
[0323] In Chapter 8:
[0324] Determine the insertion position of FMP, the specific number of times is as follows:
[0325] After 14 addition and subtraction operations and 6 comparisons, the insertion position of FMP can be obtained, so the number of times is 20.
[0326] The total number of times in Chapter 8 is: 20 times.
[0327] In Chapter 9:
[0328] Insert FMP points and related operations, the specific times are as follows:
[0329] Two road segments were created, one was deleted, data was added and deleted once in the collection, and data was added once in the NIP, so a total of 6 times.
[0330] The total number of times in Chapter 9 is: 6 times.
[0331] In Chapter 10:
[0332] Insert the locations of CvPg2 into CvPg1 at the following times:
[0333] Repeat Chapter 8 and Chapter 9, and estimate the larger number of times. Each repetition should be performed 26 times, and repeated 4 times, for a total of 104 times.
[0334] The total number of times in Chapter 10 is: 104 times.
[0335] So far, we have obtained our final result. Adding up the times in the previous ten chapters, we need to perform various operations (calculations, comparisons, operations, etc.) 483 times.
[0336] Compared with the traditional full alignment method:
[0337] For this example, the number of calculations of the full permutation method is: 518,918,399≈520 million (times).
[0338] For this example, the number of calculations of this method is: 483 (times).
[0339] Therefore, the number of calculations of the full permutation method is 518,918,399 / 483=1,074,365.215320911 (times)≈1.07 million times that of our method. Therefore, the calculation efficiency of the present invention is relatively high, and the shortest path planning for this example can also be obtained.
[0340] The above description is only a preferred specific implementation manner of the present invention, but the protection scope of the present invention is not limited thereto. Any technician familiar with the technical field can make equivalent replacements or changes according to the technical scheme and inventive concept of the present invention within the technical scope disclosed by the present invention, which should be covered by the protection scope of the present invention.
Claims
1. A method for express delivery route planning based on the shortest loop, characterized in that: The following steps are involved: a. Determine the location of the express station as the starting and ending point, and determine the longitude and latitude of all delivery locations; b. Use the distribution location dispersion judgment formula to determine whether the distribution locations are dispersed; c. When the delivery locations are scattered, path planning is performed to find the outermost convex polygon path planning loop, and then find the outermost convex polygon path planning loop in the remaining locations until the number of remaining locations is less than or equal to 3; d. Let CvPg1 represent the outermost convex polygon path planning loop, the second convex polygon path planning loop is CvPg2, and so on, CvPg3, CvPg4, ..., CvPgi, where i represents the number of convex path planning loops in the route, let the set of locations of the outermost convex path planning loop be CPP1, the set of locations of the second convex path planning loop be CPP2, and so on, CPP3, CPP4, ..., CPPi, where i represents the number of convex path planning loops; e. Determine the first migration location FMP of the second layer convex polygon path planning loop CvPg2; f. In the outermost convex polygon path planning loop CvPg1, determine the first judgment location DP[1], and determine the insertion position of FMP in CvPg1 in a clockwise direction; g. Insert the FMP point in the determined insertion position to form a new set of CvPg1, CvPg2 and their corresponding locations, and record the new insertion location FMP to the set NIP; Go clockwise in the original CvPg2, determine the next location of FMP as the new FMP location; go clockwise in the new CvPg1, determine the last dp location As the first place of judgment; h. Repeat steps e to g. The insertion position cannot be the dp location. until the set of locations corresponding to CvPg2 is empty; at the same time, all locations and paths in CvPg2 are deleted, and all its original locations are inserted into the path planning of CvPg1; i. After all the locations in CvPg2 are inserted into CvPg1, if there are any convex path planning loops left besides CvPg1, then the remaining CvPg3, CvPg4, ... CvPgi are similar to CvPg2. First, clear the NIP set and repeat steps e to h. Insert all the locations of the convex path planning loops into CvPg1 until only CvPg1 is left in the planning loop. j. When there is only CvPg1 in the planning loop, but there are one or two locations left that have not been inserted into CvPg1, these points are treated as a convex path planning loop. After the process of inserting CvPg2 into CvPg1 is executed, the path planning of all locations is completed; k. When there is only CvPg1 in the planning loop and all points are on CvPg1, the planning loop is the final path planning result.
2. The express delivery route planning method based on the shortest loop according to claim 1 is characterized in that: In step a, the locations of the known express delivery stations, i.e., the starting point and the end point, are represented by P[0], and all the delivery locations, including the longitude and latitude of these locations, the number of which is greater than or equal to 10, are represented by P[1], P[2], P[3] to P[m], where m is the number of delivery locations, m>=10, and all the locations form a set of points KP; each location has its longitude and latitude, represented as: KP={P[0].x,P[0].y,P[1].x,P[1].y,P[2].x,P[2].y......,P[m].x,P[m].y}(10≤m), where x is longitude and y is latitude; The paths between all locations are interconnected; the shortest distances between all locations are known, and a shortest distance matrix PTP is formed, where PTP[P[1],P[2]] represents the distance value from P[1] to P[2], that is, PTP[P[i],P[j]] represents the distance value from the i-th location to the j-th location.
3. The express delivery path planning method based on the shortest loop according to claim 1 or 2, characterized in that: The specific content of step b is as follows: Determine whether the delivery locations in GA are scattered, that is, whether they are on the same path. If they are scattered, continue with path planning. If not, use the Dijkstra path planning method for the outbound journey and use the Dijkstra path planning method one more time for the return journey. The method for judging the dispersion of delivery locations is as follows: Where P[k]: represents the k-th delivery location in the delivery location set KP; P[k] ∈ KP: indicates that P[k] is an element of the delivery location set KP; P[0]: usually represents the location of the express station, which is the starting point and also the ending point; P[k].y and P[k].x: respectively represent the latitude and longitude of the delivery location P[k]; P[0].y and P[0].xP[0].x: respectively represent the latitude and longitude of the starting point P[0]; P[m]: represents a certain fixed delivery location in the delivery location set KP, where m is the index of the last element in the set, that is, m = Count(KP) - 1; Count(KP): represents the number of elements in the set KP, that is, the total number of delivery locations; k > 0 and k < m: indicates that k is a positive integer, and the value of k is between the indices of the first delivery location and the last delivery location; m > 0: indicates that m is a positive integer and is the index of the last element in the set; P[m].x - P[0].x ≠ 0 and P[k].x - P[0].x ≠ 0: indicates that the longitudes of the last delivery location and the starting point are not equal; and the longitudes of the k-th delivery location and the starting point are also not equal; this is to avoid division by zero.
4. The express delivery route planning method based on the shortest loop according to claim 3 is characterized in that: The specific content of step c is as follows: 1.1 Determine the path planning loop composed of four vertices to form a four-vertex path planning loop; the four locations of this four-vertex path planning loop are TP[1], TP[2], TP[3], TP[4], where TP[1] represents the leftmost location in the four-vertex path planning loop, that is, the point with the largest y value when the x value of the coordinates is the smallest. In the clockwise direction, the order of the locations is TP[1], TP[2], TP[3], TP[4]. The following are their definitions: Finally, this four-vertex path planning loop is GAF = {TP[1], TP[2], TP[3], TP[4]} and its distance matrix FPTP. In the distance matrix FPTP, V1, V2, V3, and V4 are distance values greater than 0, in kilometers. Their specific values are obtained from PTP. Null means that there is no directly accessible path between two locations. For example, FPTP[TP[1], TP[2]] = V1, which means that there is a path between TP[1] and TP[2], and the distance value is V1, while FPTP[TP[1], TP[3]] = Null means that there is no directly accessible path between TP[1] and TP[3]. The distance value of the distance matrix FPTP is obtained from the shortest distance matrix PTP; 1.2 Find the center point CP of the four-vertex path planning loop. The method for finding the center point CP is as follows: n is the number of points of the convex path rule; 1.3 Find the location outside the four-vertex path planning loop: They all establish straight line paths with the CP point to form their own straight line paths; The straight path established by point p and CP will have an intersection with the four-vertex path planning loop; when point p is in the straight path and its two intersection points IP have this relationship: point p is not between the two intersection points, then point p is an external point within the scope of the four-vertex path planning loop; the point connected by the solid path straight line is an external point, and the point connected by the virtual path straight line is an internal point within the scope of the four-vertex path planning loop; 1.4 Set an external point set GAF_EP for the external points; 1.5 Establish a set PL that records locations and paths. It records the section of the road where the nearest intersection between location p and the straight path to location p is located. It can be expressed as: FPTP[A,B]≠Null,A≠B Section pCP intersects section AB}; 1.6 Set an interior point set GAF_IP for the interior points; 1.7 Select the outer point and combine it with the four-vertex path planning loop to form the outermost convex path planning loop; The triangular path loop formed by each location in PL and the road segment corresponding to the location is used to calculate the set of distance saving values. The specific method is as follows: DST is a triangular path loop composed of all locations in PL and their corresponding road segments. With the locations in PL as vertices, the set of distance-saving values of its triangular path loop is calculated; v(p,AB) is the distance saved in the triangular path loop consisting of location p and the corresponding road segment AB, with location p as the vertex; 1.8 Among all the distance-saving values, select the maximum distance-saving value, and according to its v(p,AB), establish the path from point p to points A and B in GAF, and delete the corresponding section AB of p; the specific corresponding set operations are as follows: GAF=GAF∪p, GAF_EP=GAF_EP-p; The corresponding matrix operation is to operate on the FPTP matrix. First, add a row and a column at location p, and then set it as follows: FPTP[A,B]=Null FPTP[p,A]=PTP[p,A], FPTP[p,B]=PTP[p,B] FPTP[A,p]=PTP[p,A], FPTP[B,p]=PTP[p,B] FPTP[p,p]=0 Except for the elements FPTP[p,A], FPTP[A,p], FPTP[B,p], FPTP[p,B], and FPTP[p,p], all other values in the p column and p row of FPTP are set to Null; Delete all distance-saving values for location p and its corresponding road segment AB until the DST set is empty.
5. The express delivery route planning method based on the shortest loop according to claim 4 is characterized in that: Described step e is specifically: Let Plc be a proper subset of CPP2, Plo represents the elements in Plc, and P is an arbitrary location in CPP2.
6. The express delivery route planning method based on the shortest loop according to claim 4 is characterized in that: Described step f is specifically: Let Plc be a proper subset of CPP1, Plo represents an element in Plc, and P is any location in CPP1; In the clockwise direction, in the outermost convex path planning loop, the point adjacent to DP[1] is DP[2], i.e., the second judgment point, and the point adjacent to DP[2] is DP[3], i.e., the third judgment point. Similarly, there are DP[4], DP[5], ... DP[i], i = Count(CPP1); In the relationship between each pair of adjacent points in CvPg1 and the triangular loop path formed by FMP, their distance saving values are calculated to obtain the distance saving value set of CvPg1. The calculation method of the set is as follows: C_DST={D(DP[i],DP[i+1])| D(DP[i],DP[i+1])=PTP[FMP,DP[i]]+PTP[FMP,DP[i+1]]-PTP[DP[i],DP[i+1]]}∪{D(DP[n],DP[1])| D(DP[n],DP[1])=PTP[FMP,DP[n]]+PTP[FMP,DP[1]]-PTP[DP[n],DP[1]]} i=1,2,3...n,n=Count(CPP1)-1; Where C_DST is the set of saved distance values, D(DP[i], DP[i+1]) represents the saved path value calculated by two adjacent locations DP[i] and DP[i+1] and the location FMP. For example, D(DP[1], DP[2]) represents the saved path value calculated in the triangular loop path formed by FMP, DP[1] and DP[2]. Find the minimum distance saved in C_DST, and determine the insertion position of FMP based on this value; Find the minimum distance saving value D(DP[n], DP[m]) in C_DST, where DP[n] and DP[m] are adjacent judgment locations, n and m refer to the nth and mth judgment locations, and FMP is inserted between locations DP[n] and DP[m].
7. The express delivery route planning method based on the shortest loop according to claim 6 is characterized in that: The step g is specifically as follows: In CvPg1, a triangular loop path is established with FMP as the vertex and two adjacent judgment points as the base points, and the section between the adjacent judgment points is deleted; in CvPg2, the FMP location and the path connected to it are deleted; Update the set of locations corresponding to CvPg1 and CvPg2; add FMP to the set NIP; The sets of locations corresponding to CvPg1 and CvPg2 are CPP1 and CPP2, which are respectively where FMP is added and deleted, and where FMP is added in NIP.
Citation Information
Patent Citations
Express delivery method based on autonomous navigation
CN106871916A
Linear sequential logic-based mobile terminal express delivery path planning method
CN107169591A
Unmanned vehicle distribution path planning method
CN111860991A
Straight line field-based TSP shortest path planning method and device, and storage medium
CN117689091A