Vehicle path planning method, path planning device, electronic device and storage medium
By generating and optimizing the initial delivery route and calculating the delivery cost data of the candidate delivery route set, the problem of low accuracy of route planning in the existing technology is solved and more efficient vehicle route planning is achieved.
Patent Information
- Application Number
- CN202310300429.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-03-20
- Publication Date
- 2024-09-03
- Estimated Expiration
- 2043-03-20
AI Technical Summary
Existing shortest path planning algorithms fail to fully consider other influencing factors in vehicle path planning, resulting in reduced accuracy of path planning.
A vehicle route planning method is proposed. By generating multiple initial delivery routes, classifying and optimizing, extracting intermediate demand nodes, adding preset routes, calculating the delivery cost data of the candidate delivery route set, and then constructing the target delivery route to improve the route Planning accuracy.
Through this method, the vehicle path can be planned more accurately, the accuracy and efficiency of path planning can be improved, and it is more optimized than the method based on the shortest path.
Smart Images

Figure CN116384869B
Abstract
Description
Technical Field
[0001] The present application relates to the technical field of transportation optimization, and in particular to a vehicle path planning method, a path planning device, an electronic device and a storage medium. Background Art
[0002] In the related art, the shortest path planning algorithm is used to plan the vehicle driving path. The shortest path planning algorithm uses distance as a measurement indicator and takes the path with the shortest distance from the supply node to the demand node as the vehicle driving path. However, the shortest path is not the optimal path and does not take into account other factors that affect the path planning, resulting in reduced accuracy of vehicle path planning. Summary of the invention
[0003] The main purpose of the embodiments of the present application is to propose a vehicle path planning method, a path planning device, an electronic device and a storage medium, aiming to improve the accuracy of vehicle path planning.
[0004] To achieve the above object, a first aspect of an embodiment of the present application proposes a vehicle path planning method, the method comprising:
[0005] Generate multiple initial delivery paths; the initial delivery paths include multiple initial demand nodes, and the initial demand nodes of each initial delivery path are different;
[0006] Classifying the initial delivery path to obtain a first intermediate delivery path and a second intermediate delivery path;
[0007] Extracting an initial demand node from the first intermediate delivery path as an intermediate demand node;
[0008] using the first intermediate delivery path excluding the intermediate demand node as a first candidate delivery path;
[0009] Adding the intermediate demand node to a preset delivery path to obtain a third intermediate delivery path; the preset delivery path is the first intermediate delivery path, the second intermediate delivery path or the first candidate delivery path;
[0010] If the first distribution cost data is less than the second distribution cost data, the third intermediate distribution path is used as the second candidate distribution path; the first distribution cost data is the distribution cost data of the third intermediate distribution path, and the second distribution cost data is the sum of the distribution cost data of the preset distribution path and the distribution cost data from the supply node to the intermediate demand node;
[0011] constructing a candidate delivery path set according to the second candidate delivery path, and calculating third delivery cost data of the candidate delivery path set;
[0012] Path planning is performed on the candidate delivery path set according to the third delivery cost data to obtain a target delivery path.
[0013] In some embodiments, classifying the initial delivery path to obtain a first intermediate delivery path and a second intermediate delivery path includes:
[0014] Obtaining a first path length and a second path length; the first path length is the total path length of the initial delivery path, the second path length is the path length from the supply node to a preset demand node, and the preset demand node is an initial demand node farthest from the supply node among multiple initial demand nodes of the initial delivery path;
[0015] Performing a path evaluation on the initial delivery path according to the first path length and the second path length to obtain a path score;
[0016] The initial delivery paths are classified according to the path scores to obtain the first intermediate delivery paths and the second intermediate delivery paths.
[0017] In some embodiments, classifying the initial delivery paths according to the path scores to obtain the first intermediate delivery paths and the second intermediate delivery paths includes:
[0018] Compare path scores and preset score thresholds;
[0019] If the path score is greater than the preset score threshold, the initial delivery path is used as the first intermediate delivery path;
[0020] If the path score is less than or equal to the preset score threshold, the initial delivery path is used as the second intermediate delivery path.
[0021] In some embodiments, the step of calculating the third delivery cost data of the candidate delivery path set includes:
[0022] Determine the number of vehicles according to the number of routes in the candidate delivery route set;
[0023] Performing a startup cost assessment based on the unit vehicle startup cost and the number of vehicles to obtain vehicle startup cost data;
[0024] Performing a transportation cost assessment based on the unit volume transportation cost and the number of vehicles to obtain vehicle unit volume transportation cost data;
[0025] Evaluate the time cost based on the penalty cost per unit time and the deviation time to obtain the time cost data;
[0026] The vehicle startup cost data, the vehicle unit volume transportation cost data and the time cost data are summed to obtain the third delivery cost data.
[0027] In some embodiments, the unit volume transportation cost is calculated according to the following method:
[0028] Obtaining vehicle volume, vehicle loading rate, area coefficient, transportation volume coefficient, product demand of the initial demand nodes, and distances between the initial demand nodes;
[0029] Obtaining transportation cost data according to the vehicle loading rate, the area coefficient, the transportation volume coefficient, the product demand and the distance;
[0030] The unit volume transportation cost is obtained according to the transportation cost data and the vehicle volume.
[0031] In some embodiments, performing path planning on the candidate delivery path set according to the third delivery cost data to obtain a target delivery path includes:
[0032] updating the candidate delivery path set according to the third delivery cost data to obtain a first delivery path set, and calculating fourth delivery cost data of the first delivery path set;
[0033] performing data subtraction on the fourth distribution cost data and the third distribution cost data to obtain cost difference data;
[0034] Path planning is performed on the first delivery path set according to the ratio of the cost difference data to the fourth delivery cost data to obtain the target delivery path.
[0035] In some embodiments, performing path planning on the candidate delivery path set according to the third delivery cost data to obtain a target delivery path includes:
[0036] updating the candidate delivery path set according to the third delivery cost data to obtain a second delivery path set;
[0037] Obtaining the number of times the routes of the second delivery route set have not been updated;
[0038] If the number of times that the route has not been updated is greater than or equal to a preset number threshold, the path in the second delivery path set is used as the target delivery path.
[0039] To achieve the above-mentioned purpose, a second aspect of an embodiment of the present application provides a path planning device, the device comprising:
[0040] A path generation module, used to generate a plurality of initial delivery paths; the initial delivery paths include a plurality of initial demand nodes, and the initial demand nodes of each of the initial delivery paths are different;
[0041] A path classification module, used for classifying the initial delivery path to obtain a first intermediate delivery path and a second intermediate delivery path;
[0042] A node extraction module, used to extract an initial demand node from the first intermediate delivery path as an intermediate demand node;
[0043] A first path determination module, configured to use the first intermediate delivery path excluding the intermediate demand node as a first candidate delivery path;
[0044] A node adding module, used for adding the intermediate demand node to a preset delivery path to obtain a third intermediate delivery path; the preset delivery path is the first intermediate delivery path, the second intermediate delivery path or the first candidate delivery path;
[0045] a second path determination module, configured to use the third intermediate delivery path as a second candidate delivery path if the first delivery cost data is less than the second delivery cost data; the first delivery cost data is the delivery cost data of the third intermediate delivery path, and the second delivery cost data is the sum of the delivery cost data of the preset delivery path and the delivery cost data from the supply node to the intermediate demand node;
[0046] a calculation module, configured to construct a candidate delivery path set according to the second candidate delivery path, and calculate third delivery cost data of the candidate delivery path set;
[0047] The path planning module is used to perform path planning on the candidate delivery path set according to the third delivery cost data to obtain a target delivery path.
[0048] To achieve the above-mentioned purpose, the third aspect of an embodiment of the present application proposes an electronic device, which includes a memory and a processor, the memory stores a computer program, and the processor implements the vehicle path planning method described in the first aspect when executing the computer program.
[0049] To achieve the above objectives, the fourth aspect of an embodiment of the present application proposes a computer-readable storage medium, which stores a computer program. When the computer program is executed by a processor, it implements the vehicle path planning method described in the first aspect.
[0050] The vehicle path planning method, path planning device, electronic device and computer-readable storage medium proposed in the present application can obtain the initial delivery path of each vehicle by generating multiple initial delivery paths. In order to distinguish the excellent individuals from the poor individuals in the multiple initial delivery paths, the initial delivery paths are classified to obtain the first intermediate delivery path and the second intermediate delivery path. An initial demand node is extracted from the first intermediate delivery path as the intermediate demand node, and the first intermediate delivery path without the intermediate demand node is used as the first candidate delivery path to optimize the poor individuals. In order to increase the diversity of individuals, the intermediate demand node is added to the preset delivery path to obtain the third intermediate delivery path to generate new individuals. If the first delivery cost data is less than the second delivery cost data, the third intermediate delivery path is used as the second candidate delivery path, indicating that the third intermediate delivery path can participate in the vehicle path planning as a new individual. The third delivery cost data of the candidate delivery path set is calculated, and the candidate delivery path set is path planned according to the third delivery cost data to obtain the target delivery path. The vehicle path is planned by the delivery cost, which can improve the accuracy of vehicle planning compared with the method of vehicle path planning based on the shortest path. BRIEF DESCRIPTION OF THE DRAWINGS
[0051] Figure 1 is a flow chart of a vehicle path planning method provided by an embodiment of the present application;
[0052] Figure 2 yes Figure 1 Flow chart of step S120 in FIG.
[0053] Figure 3 yes Figure 2 Flow chart of step S230 in FIG.
[0054] Figure 4 yes Figure 1 Flowchart of step S170 in FIG.
[0055] Figure 5 is a flow chart of a vehicle path planning method provided by another embodiment of the present application;
[0056] Figure 6 yes Figure 1 Flow chart of step S180 in FIG.
[0057] Figure 7 yes Figure 1 Another flowchart of step S180 in FIG.
[0058] Figure 8 is a schematic diagram of the structure of a path planning device provided in an embodiment of the present application;
[0059] Fig. 9It is a schematic diagram of the hardware structure of the electronic device provided in the embodiment of the present application. DETAILED DESCRIPTION
[0060] In order to make the purpose, technical solution and advantages of the present application more clearly understood, the present application is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present application and are not used to limit the present application.
[0061] It should be noted that, although the functional modules are divided in the device schematic diagram and the logical order is shown in the flowchart, in some cases, the steps shown or described may be performed in a different order than the module division in the device or the order in the flowchart. The terms "first", "second", etc. in the specification, claims and the above drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence.
[0062] Unless otherwise defined, all technical and scientific terms used herein have the same meaning as those commonly understood by those skilled in the art to which this application belongs. The terms used herein are only for the purpose of describing the embodiments of this application and are not intended to limit this application.
[0063] Regional distribution is an important part of the modern logistics service system. The rationalization of distribution routes can enable supply nodes to quickly respond to the needs of demand nodes and improve the service quality of supply nodes.
[0064] In the related art, the shortest path planning algorithm or manual experience is used to plan the vehicle driving path. The shortest path planning algorithm uses distance as a measurement indicator and takes the path with the shortest distance from the supply node to the demand node as the vehicle driving path. However, the shortest path is not the optimal path and does not take into account other factors that affect the path planning, resulting in reduced accuracy of vehicle path planning. Manual experience is used to plan the vehicle driving path, and the vehicle path planning relies entirely on human subjective experience, which makes the accuracy and efficiency of vehicle path planning relatively low.
[0065] Based on this, the embodiments of the present application provide a vehicle path planning method, a path planning device, an electronic device and a computer-readable storage medium, aiming to improve the accuracy and efficiency of vehicle path planning.
[0066] The vehicle path planning method, path planning device, electronic device and computer-readable storage medium provided in the embodiments of the present application are specifically illustrated through the following embodiments. First, the vehicle path planning method in the embodiments of the present application is described.
[0067] The vehicle path planning method provided in the embodiment of the present application relates to the field of transportation optimization technology. The vehicle path planning method provided in the embodiment of the present application can be applied to a terminal, can be applied to a server side, or can be software running in a terminal or a server side. In some embodiments, the terminal can be a smart phone, a tablet computer, a laptop computer, a desktop computer, etc.; the server side can be configured as an independent physical server, or a server cluster or a distributed system composed of multiple physical servers, or a cloud server that provides basic cloud computing services such as cloud services, cloud databases, cloud computing, cloud functions, cloud storage, network services, cloud communications, middleware services, domain name services, security services, CDN, and big data and artificial intelligence platforms; the software can be an application that implements the vehicle path planning method, etc., but is not limited to the above forms.
[0068] The present application can be used in many general or special computer system environments or configurations. For example: personal computers, server computers, handheld or portable devices, tablet devices, multiprocessor systems, microprocessor-based systems, set-top boxes, programmable consumer electronics, network PCs, minicomputers, mainframe computers, distributed computing environments including any of the above systems or devices, etc. The present application can be described in the general context of computer-executable instructions executed by a computer, such as program modules. Generally, program modules include routines, programs, objects, components, data structures, etc. that perform specific tasks or implement specific abstract data types. The present application can also be practiced in distributed computing environments, in which tasks are performed by remote processing devices connected through a communication network. In a distributed computing environment, program modules can be located in local and remote computer storage media including storage devices.
[0069] Figure 1 is an optional flow chart of the vehicle path planning method provided in the embodiment of the present application. Figure 1 The method may include but is not limited to steps S110 to S180.
[0070] Step S110, generating a plurality of initial delivery paths; the initial delivery paths include a plurality of initial demand nodes, and the initial demand nodes of each initial delivery path are different;
[0071] Step S120, classifying the initial delivery path to obtain a first intermediate delivery path and a second intermediate delivery path;
[0072] Step S130, extracting an initial demand node from the first intermediate delivery path as an intermediate demand node;
[0073] Step S140, taking the first intermediate delivery path from which the intermediate demand node is removed as the first candidate delivery path;
[0074] Step S150, adding the intermediate demand node to the preset delivery path to obtain a third intermediate delivery path; the preset delivery path is the first intermediate delivery path, the second intermediate delivery path or the first candidate delivery path;
[0075] Step S160: if the first delivery cost data is less than the second delivery cost data, the third intermediate delivery path is used as the second candidate delivery path; the first delivery cost data is the delivery cost data of the third intermediate delivery path, and the second delivery cost data is the sum of the delivery cost data of the preset delivery path and the delivery cost data from the supply node to the intermediate demand node;
[0076] Step S170, constructing a candidate delivery path set according to the second candidate delivery path, and calculating third delivery cost data of the candidate delivery path set;
[0077] Step S180, performing path planning on the candidate delivery path set according to the third delivery cost data to obtain a target delivery path.
[0078] In step S110 of some embodiments, multiple initial distribution paths are randomly generated to obtain an initial distribution path set, wherein the initial distribution path includes a supply node and multiple initial demand nodes, and the supply node is the starting node of the initial distribution path. The initial distribution path has the following characteristics: multiple initial distribution paths have the same supply node, the initial demand node of each initial distribution path is different, and all initial demand nodes of all initial distribution paths constitute a demand node set. The starting node and the ending node of the initial distribution path mostly do not belong to the same area, and the initial demand nodes mostly do not belong to the same area, resulting in a longer path length of the initial distribution path.
[0079] When there are multiple supply nodes and the supply nodes belong to the same region, these multiple supply nodes can be regarded as one supply node. For example, Company A has 5 supply nodes. From a global perspective, these 5 supply nodes belong to the same region. These 5 supply nodes can be regarded as 1 supply node, thus converting the multi-supply node distribution problem into a single supply node distribution problem.
[0080] The initial distribution path is a string of multiple nodes connected in series according to the distribution order. Tobacco products are transported through the node distribution order of the initial distribution path. The products are distributed to multiple initial demand nodes on the initial distribution path starting from the supply node. Each initial demand node is only responsible for distribution by one vehicle. Product transportation is one-way transportation, that is, products can only be distributed from the supply node to the demand node, and there is no reverse logistics.
[0081] See also Figure 2 In some embodiments, step S120 may include but is not limited to steps S210 to S230:
[0082] Step S210, obtaining a first path length and a second path length; the first path length is the total path length of the initial distribution path, and the second path length is the path length from the supply node to the preset demand node, and the preset demand node is the initial demand node farthest from the supply node among multiple initial demand nodes of the initial distribution path;
[0083] Step S220, performing a path evaluation on the initial delivery path according to the first path length and the second path length to obtain a path score;
[0084] Step S230: classify the initial delivery paths according to the path scores to obtain a first intermediate delivery path and a second intermediate delivery path.
[0085] In step S210 of some embodiments, there are excellent path individuals and poor path individuals in the randomly generated multiple initial distribution paths. In order to make the path planning reasonable and avoid reducing the service quality by transporting products through poor paths, for all initial distribution paths, it is judged whether each initial distribution path is excellent. Specifically, the initial distribution paths are classified to obtain a first intermediate distribution path and a second intermediate distribution path, the first intermediate distribution path is a poor path individual, and the second intermediate distribution path is an excellent path individual. The embodiment of the present application uses path length to evaluate whether the path is excellent. The total path length of the initial distribution path is obtained through the map API interface as the first path length, and the path length from the supply node to each initial demand node on the initial distribution path is obtained through the map API interface, and the path with the largest length is taken as the second path length.
[0086] In step S220 of some embodiments, the ratio of the first path length to the second path length is used as the path score of the initial delivery path, and the path score is used to indicate whether the initial delivery path is an excellent path individual.
[0087] In step S230 of some embodiments, the path score is compared with a preset score threshold. If the path score is greater than the preset score threshold, the initial delivery path is used as the first intermediate delivery path. If the path score is less than or equal to the preset score threshold, the initial delivery path is used as the second intermediate delivery path.
[0088] Through the above steps S210 to S230, it is possible to identify whether the initial delivery path is an excellent path individual or a poor path individual, so as to optimize the poor path individual.
[0089] See also Figure 3 In some embodiments, step S230 may include but is not limited to steps S310 to S330:
[0090] Step S310, comparing the path score with a preset score threshold;
[0091] Step S320, if the path score is greater than a preset score threshold, the initial delivery path is used as the first intermediate delivery path;
[0092] Step S330: If the path score is less than or equal to the preset score threshold, the initial delivery path is used as the second intermediate delivery path.
[0093] In step S310 of some embodiments, the path score of the initial delivery path is compared with a preset score threshold, where the preset score threshold is a given constant k.
[0094] In step S320 of some embodiments, if the path score is greater than a preset score threshold, it means that the initial delivery path is a long detour and will incur a large delivery cost. The initial delivery path is not excellent and is a poor path individual. The initial delivery path is used as the first intermediate delivery path.
[0095] In step S330 of some embodiments, if the path score is less than or equal to the preset score threshold, it means that the delivery order of each initial demand node in the initial delivery path is reasonable, the initial delivery path is an excellent path individual, and the initial delivery path is used as the second intermediate delivery path.
[0096] Through the above steps S310 to S330, it is possible to determine whether the initial delivery path is excellent based on the path score, so as to optimize the path for the poor path.
[0097] In step S130 of some embodiments, if there are n initial delivery paths, after classifying the n initial delivery paths, n1 first intermediate delivery paths and n2 second intermediate delivery paths are obtained, where n1 and n2 are both non-negative integers, and the sum of n1 and n2 is n. M first intermediate delivery paths are randomly selected from the n1 first intermediate delivery paths, and for the m first intermediate delivery paths, an initial demand node is randomly selected from each first intermediate delivery path to obtain m intermediate demand nodes, where m is less than or equal to n1.
[0098] In step S140 of some embodiments, the first intermediate delivery path with the intermediate demand node removed is used as the first candidate delivery path, thereby obtaining m first candidate delivery paths to optimize the poorer paths.
[0099] In step S150 of some embodiments, the intermediate demand nodes are added to the preset delivery paths to increase the diversity of individual paths. When m is equal to n1, that is, after node extraction is performed on all first intermediate delivery paths, m paths are randomly selected from the path set consisting of n1 first candidate delivery paths and n2 second intermediate delivery paths to obtain m preset paths. The preset path can be the first candidate delivery path or the second intermediate delivery path, and the intermediate demand nodes are randomly inserted into the preset path. When m is less than n1, that is, after node extraction is performed on m first intermediate delivery paths, m paths are randomly selected from the path set consisting of m first candidate delivery paths, n1-m first intermediate delivery paths without node extraction, and n2 second intermediate delivery paths to obtain m preset paths. The preset path can be the first candidate delivery path, the first intermediate delivery path, or the second intermediate delivery path.
[0100] Specifically, for an intermediate demand node, the m preset paths are traversed, and the insertion point of the preset path is traversed to add the intermediate demand node to the insertion point. The insertion point can be a position between the supply node and the initial demand node, or a position between adjacent initial demand nodes. It should be noted that in one iteration, if an intermediate demand node has been added to the preset path, the preset path will no longer be traversed for other intermediate demand nodes.
[0101] In step S160 of some embodiments, if the first distribution cost data is less than the second distribution cost data, it means that the insertion point is the best insertion point, the preset path is removed from the initial distribution path set, and the third intermediate distribution path is used as the second candidate distribution path. If the preset path is the first candidate distribution path, the first intermediate distribution path corresponding to the first candidate distribution path is removed from the initial distribution path set. It should be noted that the second candidate distribution path is a path composed of the initial demand node arrangement that minimizes the first distribution cost data. By determining whether the insertion point is the best insertion point, the cost of calculating the initial demand node arrangement after inserting the suboptimal path can be reduced.
[0102] If the first distribution cost data is greater than or equal to the second distribution cost data, then continue to add the intermediate demand node to another insertion point of the preset path, and calculate the first distribution cost data and the second distribution cost data obtained by adding the insertion point, so as to determine whether the insertion point is the best insertion point based on the first distribution cost data and the second distribution cost data. Repeat this process until the intermediate demand node is added to any preset path. If the best insertion point of the intermediate demand node cannot be found in these m preset paths, a new path is regenerated, and the intermediate demand node is used as the first demand node on the new path, and the new path is added to the initial distribution path set. Due to the fact that there are not too many initial demand nodes on a path in a real distribution, the efficiency of finding the best insertion point can be improved by traversal.
[0103] The distribution cost data f(St*) of the third intermediate distribution path St* is the first distribution cost data, the distribution cost data of the preset distribution path St is f(St), the distribution cost data from the supply node to the intermediate demand node Pnew is f(Pnew), and the sum of the distribution cost data of f(St) and f(Pnew) f(St)+f(Pnew) is taken as the second distribution cost data.
[0104] See also Figure 4 In some embodiments, step S170 may include but is not limited to steps S410 to S450:
[0105] Step S410, determining the number of vehicles according to the number of routes in the candidate delivery route set;
[0106] Step S420, performing a startup cost assessment based on the unit vehicle startup cost and the number of vehicles to obtain vehicle startup cost data;
[0107] Step S430, evaluating the transportation cost according to the unit volume transportation cost and the number of vehicles to obtain the vehicle unit volume transportation cost data;
[0108] Step S440, performing time cost evaluation according to the unit time penalty cost and the deviation time to obtain time cost data;
[0109] Step S450, summing up the vehicle startup cost data, the vehicle unit volume transportation cost data and the time cost data to obtain third delivery cost data.
[0110] In step S410 of some embodiments, the second candidate delivery path is added to the new set to obtain a candidate delivery path set, all initial demand nodes of all second candidate delivery paths in the candidate delivery path set constitute a demand node set, and the third delivery cost data of the candidate delivery path set is calculated to perform vehicle path planning according to the third delivery cost data. The delivery task on a path is only handled by one vehicle, the number of paths in the candidate delivery path set is obtained, the number of vehicles K is obtained, and the demand node set is delivered by these K vehicles.
[0111] In step S420 of some embodiments, the unit vehicle startup cost is a fixed startup cost of a vehicle, and the unit vehicle startup cost is multiplied by the number of vehicles to perform startup cost evaluation and obtain vehicle startup cost data. 0 , the number of vehicles is K, then the vehicle startup cost data is C 0 K.
[0112] In step S430 of some embodiments, the vehicles responsible for the delivery task are all normal temperature ordinary vehicles without special functions, but the vehicle types are not unique. The unit volume transportation cost of different vehicle types is different, and the unit volume transportation cost of each vehicle is summed to obtain the vehicle unit volume transportation cost data.
[0113] In step S440 of some embodiments, the deviation time is the time when the vehicle delivery is overtime, that is, the time difference between the actual time when the vehicle arrives at the demand node and the expected time. In terms of tobacco product delivery, tobacco products have the characteristics of being storable, light in weight, and high in value. Demand nodes generally reserve a certain level of safety inventory for advance ordering, and exceeding the expected time generally does not have much impact on demand nodes; in terms of cargo damage and cargo loss, tobacco products are types of products that are resistant to extrusion and falling, and with the protection of the packaging box and tight stacking, cargo damage and cargo loss generally do not occur. Demand nodes generally do not require the level of logistics service, but from the perspective of supply nodes, a large time cost will be incurred. If the product does not arrive at the expected time, for the supply node, a time cost for coordination with the demand node will be incurred. Therefore, in the process of tobacco product delivery, the time when the vehicle arrives at the demand node is a soft time constraint. The delivery time should try to meet the expected time, or it can exceed the expected time. If it exceeds the expected time, a penalty cost will be borne. By adding time cost data to punish the delivery timeout, the path can be optimized to improve the delivery efficiency. The calculation method of time cost data is shown in formula (1).
[0114]
[0115] Where r represents the rth initial demand node; N is the number of initial demand nodes; K is the number of vehicles; β is the penalty cost per unit time, which is the penalty cost caused by the vehicle not arriving at the initial demand node at the expected time, and β is an infinite constant; T kr is the deviation time of the kth vehicle arriving at the rth initial demand node, which represents the time interval between the actual time when vehicle k arrives at the initial demand node r and the expected time when vehicle k arrives at the initial demand node r.
[0116] In step S450 of some embodiments, the vehicle startup cost data, the vehicle unit volume transportation cost data and the time cost data are summed to obtain the third delivery cost data of the candidate delivery path set.
[0117] Through the above steps S410 to S450, the third delivery cost data of the candidate delivery path set can be obtained, so as to perform vehicle path planning according to the third delivery cost data, thereby improving delivery efficiency and reducing transportation costs.
[0118] See also Figure 5 In some embodiments, the calculation process of the unit volume transportation cost in step S430 may include but is not limited to steps S510 to S530:
[0119] Step S510, obtaining vehicle volume, vehicle loading rate, area coefficient, transportation coefficient, product demand of initial demand nodes, and distance between initial demand nodes;
[0120] Step S520, obtaining transportation cost data according to the vehicle loading rate, area coefficient, transportation volume coefficient, product demand and distance;
[0121] Step S530, obtaining the unit volume transportation cost according to the transportation cost data and the vehicle volume.
[0122] In step S510 of some embodiments, the vehicle volume of the kth vehicle is V k The vehicle loading rate is used to reflect the degree of filling of the vehicle with tobacco products. It is the ratio of the vehicle loading to the maximum loading limit of the vehicle, which can be expressed as γ. The area coefficient is used to reflect the development of different regions, which is expressed as μ. The transportation volume coefficient is a coefficient that has a mapping relationship with the vehicle loading capacity, which is expressed as The product demand at the jth initial demand node is represented by q j The area coefficient and the volume coefficient are constants related to transportation costs. The distance between the initial demand node i and the initial demand node j is represented by d ij. Query the zone coefficients of different locations from the preset zone coefficient table. Call the map API interface to obtain the distance between the initial demand nodes. It is understandable that before the delivery starts, the location information of each demand node and the product demand of each demand node are known information. The vehicle volume of different types of vehicles will be different, and the vehicle loading rate of different vehicles will also be different.
[0123] In step S520 of some embodiments, the vehicle load is obtained according to the product demand of the demand node and the preset path decision information, and the preset path decision information is used to reflect whether the vehicle passes through the path. The preset path decision information is represented by x ijk , when x ijk When x is 1, it means that the kth vehicle travels from the initial demand node i to the initial demand node j, passing through the path formed by the initial demand node i and the initial demand node j. ijk When it is 0, it means that the k-th vehicle has not passed through the path formed by the initial demand node i and the initial demand node j. The sum of the product demand of each initial demand node on the path passed by the vehicle is taken as the vehicle load. The vehicle load of the k-th vehicle τ k The calculation method of is shown in formula (2), the vehicle loading rate γ of the kth vehicle k The calculation method of is shown in formula (3).
[0124]
[0125]
[0126] Among them, Q k is the maximum vehicle loading limit of the kth vehicle, and N is the number of initial demand nodes.
[0127] The product demand of a single initial demand node is relatively large. In order to ensure the transportation efficiency to a certain extent, a limited number of deliveries is allowed for a single second candidate delivery path, that is, the product demand served by a single path is subject to certain restrictions. The vehicle load is certain, and the sum of the product demand of each initial demand node on the same path shall not exceed the maximum loading limit of the vehicle, satisfying the weight constraint condition, which is shown in formula (4).
[0128]
[0129] Each initial demand node is served once, that is, there is only one vehicle in the vehicle set that passes through the path formed by any initial demand node i to the initial demand node j, which meets the demand node service constraint.
[0130] The demand node service constraints are shown in formula (5).
[0131]
[0132] The location information of the initial demand node i is (x i ,y i ), the location information of the initial demand node j is (x j ,y j ), x is the horizontal coordinate of the location information, y is the vertical coordinate of the location information, and the distance between the initial demand node i and the initial demand node j When carrying out a delivery task, the delivery distance of each vehicle must not exceed the maximum delivery distance and meet the vehicle driving distance constraint. The vehicle driving distance constraint is shown in formula (6).
[0133]
[0134] Among them, D k is the maximum driving distance of the kth vehicle.
[0135] The vehicle transportation forms a closed loop, that is, all vehicles start from the supply node, complete the delivery tasks of all initial demand nodes on the second candidate delivery path, and then return to the supply node to meet the supply node constraint. The number of times a vehicle enters a path is equal to the number of times it returns from the path to achieve flow balance and meet the demand node constraint. The supply node constraint is shown in formula (7), and the demand node constraint is shown in formula (8).
[0136]
[0137]
[0138] It should be noted that the embodiment of the present application does not limit the number of vehicles. It is assumed that the number of vehicles is sufficient, and the number of vehicles K is the number of vehicles that need to be used.
[0139] The number of tobacco products loaded on the vehicle is in boxes or 10,000. The transport coefficient of the kth vehicle The traffic coefficient constraint condition is satisfied. The traffic coefficient constraint condition is shown in formula (9).
[0140]
[0141] The unit distance travel cost C1, the vehicle loading rate γ of the kth vehicle k , area coefficient μ, and the traffic coefficient of the kth vehicle Vehicle carrying capacityτ k and the distance d between the initial demand nodes ij Multiply them to get the transportation cost data of the kth vehicle. The calculation method of transportation cost data is shown in formula (10).
[0142]
[0143] The number of vehicles K satisfies the required vehicle number constraint condition, and the required vehicle number constraint condition is shown in formula (11).
[0144]
[0145] Among them, Q is the average maximum load limit of the vehicle.
[0146] The delivery time satisfies the time constraint condition, and the time constraint condition is shown in formula (12) and formula (13).
[0147]
[0148] T kr = a kr - t r , a kr > t r Formula (13)
[0149] Set the departure time of the vehicle to 0, a kr is the actual time for vehicle k to reach the initial demand node r; [0, t r is the expected optimal service time for the initial demand node r; v is the average speed of the vehicle.
[0150] It can be understood that when the actual delivery time a kr exceeds the latest service time t r , time cost data will be generated.
[0151] The volume of each vehicle is certain, and the total bottom area of the items loaded on each vehicle does not exceed the bottom area of the vehicle, and it satisfies the loading constraint condition. The loading constraint condition is shown in formula (14).
[0152]
[0153] Among them, N k is the number of initial demand nodes served by the k-th vehicle, 1 ≤ k ≤ K. X kh is the h-th initial demand node served by the k-th vehicle, 1 ≤ h < g ≤ N, and g represents the g-th initial demand node after the initial demand node h. S is the bottom area of the carriage, S = W × L, W is the width of the carriage bottom surface, and L is the length of the carriage bottom surface. is the total bottom area of the products required for the initial demand node X kh .
[0154] If X kh is r, 1 ≤ r ≤ N, I(r, s) is the s-th product required for the initial demand node r, (w rs , l rs) is the width and length of product I (r, s) when placed in the carriage, w rs is the bottom width of product I(r,s), l rs is the bottom length of product I(r,s), 1≤s≤m r , m r is the number of products required by the initial demand node r, then the total base area of the products required by the initial demand node r By (x rs ,y rs )and represents the position of product I(r,s) in the carriage, (x rs ,y rs ) is the coordinate of the upper left corner of the bottom surface of the product, that is, the coordinate of the vertex closest to the origin among the vertices of the bottom surface of the product. is the coordinate of the lower right corner of the bottom surface of the product, that is, the coordinate of the vertex farthest from the origin among the vertices of the bottom surface of the product. It should be noted that the logistics distribution data includes the number of demand nodes, the types of tobacco required by each demand node and the demand for each type of tobacco, the expected delivery time of the demand node, the number of vehicles, the length, width and height of the vehicle, the length, width and height of the cigarette box, the area coefficient, the number of tobacco products in the cigarette box, and the distance between different demand nodes. Tobacco products are stored in cigarette boxes, and the sth cigarette box is regarded as the sth product. The types of tobacco are distinguished by the length, width and height of the cigarette box.
[0155] The product must be placed inside the vehicle and cannot exceed the floor area of the vehicle, subject to product placement constraints.
[0156] The product placement constraints are shown in formulas (15) to (18).
[0157]
[0158]
[0159]
[0160]
[0161] in, The horizontal coordinate of the lower right corner of the bottom surface of the product of the u-th product required for the h-th initial demand node serving the k-th vehicle, 1≤k≤K, is the horizontal coordinate of the upper left corner of the u-th product; is the bottom width of the u-th product; is the vertical coordinate of the lower right corner of the bottom surface of the u-th product; is the vertical coordinate of the upper left corner of the bottom surface of the u-th product; is the bottom length of the u-th product.
[0162] During the distribution process of the product, its position may change due to road conditions and other reasons, satisfying the product rotation constraint conditions; the product rotation constraint conditions are shown in formula (19).
[0163]
[0164] Among them, T rs is a set composed of several binary tuples, and each binary tuple corresponds to a placement position of the product I(r, s). is the set of placement positions of the u-th product required by the h-th initial demand node served by the k-th vehicle.
[0165] In the same carriage, the physical spaces of the products cannot overlap, and the product placement constraints satisfied between two products are shown in formula (20).
[0166]
[0167] The product unloaded later cannot block the product unloaded earlier. When h > g, When h < g, U is the set of products required by the g-th initial demand node served by the k-th vehicle, and when g = h, v ≠ u} represents the set of other items placed in the same vehicle as the product I(X kh , u).
[0168] In step S530 of some embodiments, the transportation cost data of the k-th vehicle is divided by the vehicle volume V k to obtain the transportation cost per unit volume of the k-th vehicle. The calculation method of the transportation cost per unit volume is shown in formula (21).
[0169]
[0170] Through the above steps S510 to S530, the transportation cost per unit volume of the vehicle can be obtained.
[0171] Please refer to Figure 6 , in some embodiments, step S180 may include but is not limited to steps S610 to S630:
[0172] Step S610, update the candidate distribution path set according to the third distribution cost data to obtain the first distribution path set, and calculate the fourth distribution cost data of the first distribution path set;
[0173] Step S620, subtract the fourth distribution cost data from the third distribution cost data to obtain the cost difference data;
[0174] Step S630, performing path planning on the first delivery path set according to the ratio of the cost difference data to the fourth delivery cost data to obtain a target delivery path.
[0175] In step S610 of some embodiments, the Large Neighborhood Search (LNS) algorithm is used to minimize the third distribution cost data as the objective function, and steps S120 to S170 are repeated to update the candidate distribution path set, and the candidate distribution path set with the smallest third distribution cost data is selected, and all second candidate distribution paths in the candidate distribution path set are used as target distribution paths. Specifically, if the third distribution cost data is not the minimum value, and the current path iteration number does not reach the preset iteration number, the candidate distribution path set is updated according to the third distribution cost data to obtain the first distribution path set, and the new path cost of the first distribution path set is calculated to obtain the fourth distribution cost data. The calculation method of the fourth distribution cost data is the same as that of the third distribution cost data, which will not be repeated here.
[0176] In step S620 of some embodiments, the absolute value of the difference obtained by subtracting the fourth delivery cost data from the third delivery cost data is used as the cost difference data.
[0177] In step S630 of some embodiments, during the path iteration process, in order to prevent falling into a local optimal solution, the embodiments of the present application perform path planning based on the ratio of the cost difference data to the fourth distribution cost data. Specifically, the cost difference data is divided by the fourth distribution cost data to obtain a ratio. If the ratio is less than a preset ratio threshold, the first distribution path set has a preset probability of being the target distribution path. For example, if the ratio is less than 0.03, there is a 0.1 probability of using the first distribution path set as the target distribution path. If the ratio is greater than or equal to the preset ratio threshold, the first distribution path set is not the target distribution path, and the first distribution path set continues to be updated.
[0178] The above steps S610 to S630 can prevent the target delivery path from being a local optimal solution, thereby improving the accuracy of path planning.
[0179] See also Figure 7 In some embodiments, step S180 may also include but is not limited to steps S710 to S730:
[0180] Step S710, updating the candidate delivery path set according to the third delivery cost data to obtain a second delivery path set;
[0181] Step S720, obtaining the number of times the routes of the second delivery route set have not been updated;
[0182] Step S730: If the number of times the route has not been updated is greater than or equal to a preset number threshold, the route in the second delivery route set is used as the target delivery route.
[0183] In step S710 of some embodiments, the candidate delivery path set is updated by LNS with minimization of the third delivery cost data as the objective function to obtain a second delivery path set.
[0184] In steps S720 to S730 of some embodiments, if the current path iteration number reaches an iteration number threshold or the optimal solution is no longer updated for more than a certain number of times, the path iteration is stopped and the currently obtained path set is used as the target delivery path.
[0185] Through the above steps S710 to S730, when the current path iteration number does not reach the iteration number threshold, the target delivery path can be obtained without further path iteration, thereby improving the efficiency of path planning.
[0186] See also Figure 8 The embodiment of the present application also provides a path planning device, which can implement the above-mentioned vehicle path planning method, and the device includes:
[0187] The path generation module 810 is used to generate multiple initial delivery paths; the initial delivery paths include multiple initial demand nodes, and the initial demand nodes of each initial delivery path are different;
[0188] A path classification module 820, for classifying the initial delivery path to obtain a first intermediate delivery path and a second intermediate delivery path;
[0189] The node extraction module 830 is used to extract an initial demand node from the first intermediate delivery path as an intermediate demand node;
[0190] A first path determination module 840 is used to use a first intermediate delivery path from which an intermediate demand node is removed as a first candidate delivery path;
[0191] A node adding module 850 is used to add the intermediate demand node to the preset delivery path to obtain a third intermediate delivery path; the preset delivery path is the first intermediate delivery path, the second intermediate delivery path or the first candidate delivery path;
[0192] A second path determination module 860 is configured to use the third intermediate delivery path as the second candidate delivery path if the first delivery cost data is less than the second delivery cost data; the first delivery cost data is the delivery cost data of the third intermediate delivery path, and the second delivery cost data is the sum of the delivery cost data of the second intermediate delivery path and the delivery cost data from the supply node to the intermediate demand node;
[0193] A calculation module 870 is used to calculate third delivery cost data of a candidate delivery path set; the candidate delivery path set includes a first candidate delivery path and a second candidate delivery path;
[0194] The path planning module 880 is used to perform path planning on the candidate delivery path set according to the third delivery cost data to obtain a target delivery path.
[0195] The specific implementation of the path planning device is basically the same as the specific implementation of the above-mentioned vehicle path planning method, and will not be repeated here.
[0196] The embodiment of the present application also provides an electronic device, the electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the above vehicle path planning method when executing the computer program. The electronic device can be any intelligent terminal including a tablet computer, a vehicle-mounted computer, etc.
[0197] See also Fig. 9 , Fig. 9 The hardware structure of an electronic device of another embodiment is illustrated, and the electronic device includes:
[0198] The processor 910 may be implemented by a general-purpose CPU (Central Processing Unit), a microprocessor, an application-specific integrated circuit (Application Specific Integrated Circuit, ASIC), or one or more integrated circuits, and is used to execute relevant programs to implement the technical solutions provided in the embodiments of the present application;
[0199] The memory 920 can be implemented in the form of a read-only memory (ROM), a static storage device, a dynamic storage device, or a random access memory (RAM). The memory 920 can store an operating system and other application programs. When the technical solution provided in the embodiment of this specification is implemented by software or firmware, the relevant program code is stored in the memory 920, and the processor 910 calls and executes the vehicle path planning method of the embodiment of this application;
[0200] Input / output interface 930, used to implement information input and output;
[0201] Communication interface 940, used to realize communication interaction between the device and other devices, which can be realized through wired mode (such as USB, network cable, etc.) or wireless mode (such as mobile network, WIFI, Bluetooth, etc.);
[0202] bus 950 , which transmits information between the various components of the device (e.g., processor 910 , memory 920 , input / output interface 930 , and communication interface 940 );
[0203] The processor 910 , the memory 920 , the input / output interface 930 , and the communication interface 940 are connected to each other in communication within the device via a bus 950 .
[0204] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and when the computer program is executed by a processor, the above-mentioned vehicle path planning method is implemented.
[0205] The memory, as a non-transient computer-readable storage medium, can be used to store non-transient software programs and non-transient computer executable programs. In addition, the memory may include a high-speed random access memory, and may also include a non-transient memory, such as at least one disk storage device, a flash memory device, or other non-transient solid-state storage device. In some embodiments, the memory may optionally include a memory remotely disposed relative to the processor, and these remote memories may be connected to the processor via a network. Examples of the above-mentioned network include, but are not limited to, the Internet, an intranet, a local area network, a mobile communication network, and combinations thereof.
[0206] The vehicle path planning method, path planning device, electronic device and computer-readable storage medium provided in the embodiment of the present application can obtain the initial delivery path of each vehicle by generating multiple initial delivery paths. In order to distinguish the excellent individuals from the poor individuals in the multiple initial delivery paths, the initial delivery paths are classified to obtain the first intermediate delivery path and the second intermediate delivery path. An initial demand node is extracted from the first intermediate delivery path as the intermediate demand node, and the first intermediate delivery path without the intermediate demand node is used as the first candidate delivery path to optimize the poor individuals. In order to increase the diversity of individuals, the intermediate demand node is added to the preset delivery path to obtain the third intermediate delivery path to generate new individuals. If the first delivery cost data is less than the second delivery cost data, the third intermediate delivery path is used as the second candidate delivery path, indicating that the third intermediate delivery path can participate in the vehicle path planning as a new individual. The third delivery cost data of the candidate delivery path set is calculated, and the candidate delivery path set is path planned according to the third delivery cost data to obtain the target delivery path. The vehicle path is planned by the delivery cost, which can improve the accuracy of vehicle planning compared with the method of vehicle path planning based on the shortest path.
[0207] The embodiments described in the embodiments of the present application are intended to more clearly illustrate the technical solutions of the embodiments of the present application and do not constitute a limitation on the technical solutions provided in the embodiments of the present application. Those skilled in the art will appreciate that with the evolution of technology and the emergence of new application scenarios, the technical solutions provided in the embodiments of the present application are also applicable to similar technical problems.
[0208] Those skilled in the art will appreciate that the technical solutions shown in the figures do not constitute a limitation on the embodiments of the present application, and may include more or fewer steps than shown in the figures, or a combination of certain steps, or different steps.
[0209] The device embodiments described above are merely illustrative, and the units described as separate components may or may not be physically separated, that is, they may be located in one place or distributed on multiple network units. Some or all of the modules may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0210] Those skilled in the art will appreciate that all or some of the steps in the methods disclosed above, and the functional modules / units in the systems and devices may be implemented as software, firmware, hardware, or a suitable combination thereof.
[0211] The terms "first", "second", "third", "fourth", etc. (if any) in the specification of the present application and the above-mentioned drawings are used to distinguish similar objects, and are not necessarily used to describe a specific order or sequence. It should be understood that the data used in this way can be interchangeable where appropriate, so that the embodiments of the present application described herein can be implemented in an order other than those illustrated or described herein. In addition, the terms "including" and "having" and any of their variations are intended to cover non-exclusive inclusions, for example, a process, method, system, product or device comprising a series of steps or units is not necessarily limited to those steps or units clearly listed, but may include other steps or units that are not clearly listed or inherent to these processes, methods, products or devices.
[0212] It should be understood that in the present application, "at least one (item)" means one or more, and "plurality" means two or more. "And / or" is used to describe the association relationship of associated objects, indicating that three relationships may exist. For example, "A and / or B" can mean: only A exists, only B exists, and A and B exist at the same time, where A and B can be singular or plural. The character " / " generally indicates that the objects associated before and after are in an "or" relationship. "At least one of the following" or similar expressions refers to any combination of these items, including any combination of single or plural items. For example, at least one of a, b or c can mean: a, b, c, "a and b", "a and c", "b and c", or "a and b and c", where a, b, c can be single or multiple.
[0213] In the several embodiments provided in the present application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are only schematic. For example, the division of the above units is only a logical function division. There may be other division methods in actual implementation, such as multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. Another point is that the mutual coupling or direct coupling or communication connection shown or discussed can be through some interfaces, indirect coupling or communication connection of devices or units, which can be electrical, mechanical or other forms.
[0214] The units described above as separate components may or may not be physically separated, and the components shown as units may or may not be physical units, that is, they may be located in one place or distributed on multiple network units. Some or all of the units may be selected according to actual needs to achieve the purpose of the solution of this embodiment.
[0215] In addition, each functional unit in each embodiment of the present application may be integrated into one processing unit, or each unit may exist physically separately, or two or more units may be integrated into one unit. The above-mentioned integrated unit may be implemented in the form of hardware or in the form of software functional units.
[0216] If the integrated unit is implemented in the form of a software functional unit and sold or used as an independent product, it can be stored in a computer-readable storage medium. Based on this understanding, the technical solution of the present application, or the part that contributes to the prior art, or all or part of the technical solution can be embodied in the form of a software product, and the computer software product is stored in a storage medium, including multiple instructions to enable a computer device (which can be a personal computer, server, or network device, etc.) to execute all or part of the steps of the methods of various embodiments of the present application. The aforementioned storage medium includes: U disk, mobile hard disk, read-only memory (Read-Only Memory, referred to as ROM), random access memory (Random Access Memory, referred to as RAM), disk or optical disk and other media that can store programs.
[0217] The preferred embodiments of the present invention are described above with reference to the accompanying drawings, but the scope of the rights of the present invention is not limited thereto. Any modification, equivalent substitution and improvement made by a person skilled in the art without departing from the scope and essence of the present invention should be within the scope of the rights of the present invention.
Claims
1. A vehicle path planning method, characterized in that: The method comprises: Generate multiple initial delivery paths; the initial delivery paths include multiple initial demand nodes, and the initial demand nodes of each initial delivery path are different; Classifying the initial delivery path to obtain a first intermediate delivery path and a second intermediate delivery path; Extracting an initial demand node from the first intermediate delivery path as an intermediate demand node; using the first intermediate delivery path from which the intermediate demand node is removed as a first candidate delivery path; The number of first intermediate distribution paths is n1, the number of second intermediate distribution paths is n2, the number of first candidate distribution paths is m, and the number of intermediate demand nodes is m. If m is equal to n1, m paths are randomly selected from the path set consisting of n1 first candidate distribution paths and n2 second intermediate distribution paths to obtain m preset distribution paths, and the preset distribution paths are the first candidate distribution paths or the second intermediate distribution paths; if m is less than n1, m paths are randomly selected from the path set consisting of m first candidate distribution paths, n1-m first intermediate distribution paths without node extraction, and n2 second intermediate distribution paths to obtain m preset distribution paths, and the preset distribution paths are the first candidate distribution paths, the first intermediate distribution paths, or the second intermediate distribution paths; Adding the intermediate demand node to the preset delivery path to obtain a third intermediate delivery path; If the first distribution cost data is less than the second distribution cost data, the third intermediate distribution path is used as the second candidate distribution path; the first distribution cost data is the distribution cost data of the third intermediate distribution path, and the second distribution cost data is the sum of the distribution cost data of the preset distribution path and the distribution cost data from the supply node to the intermediate demand node; constructing a candidate delivery path set according to the second candidate delivery path, and calculating third delivery cost data of the candidate delivery path set; Performing path planning on the candidate delivery path set according to the third delivery cost data to obtain a target delivery path; The classifying the initial delivery path to obtain the first intermediate delivery path and the second intermediate delivery path includes: Obtaining a first path length and a second path length; the first path length is the total path length of the initial delivery path, the second path length is the path length from the supply node to the preset demand node, the preset demand node being the initial demand node farthest from the supply node among the multiple initial demand nodes of the initial delivery path; performing a path evaluation on the initial delivery path according to the first path length and the second path length to obtain a path score; classifying the initial delivery path according to the path score to obtain the first intermediate delivery path and the second intermediate delivery path; The classifying the initial delivery paths according to the path scores to obtain the first intermediate delivery paths and the second intermediate delivery paths includes: Comparing the path score with a preset score threshold; if the path score is greater than the preset score threshold, using the initial delivery path as the first intermediate delivery path; if the path score is less than or equal to the preset score threshold, using the initial delivery path as the second intermediate delivery path; The performing path planning on the candidate delivery path set according to the third delivery cost data to obtain a target delivery path includes: The candidate delivery path set is updated according to the third delivery cost data to obtain a first delivery path set, and the fourth delivery cost data of the first delivery path set is calculated; the fourth delivery cost data and the third delivery cost data are subtracted to obtain cost difference data; the first delivery path set is planned according to the ratio of the cost difference data to the fourth delivery cost data to obtain the target delivery path; The performing path planning on the candidate delivery path set according to the third delivery cost data to obtain a target delivery path also includes: The candidate delivery path set is updated according to the third delivery cost data to obtain a second delivery path set; the number of times the paths in the second delivery path set have not been updated is obtained; if the number of times the paths have not been updated is greater than or equal to a preset number threshold, the paths in the second delivery path set are used as the target delivery paths.
2. The vehicle path planning method according to claim 1, characterized in that: The calculating of the third delivery cost data of the candidate delivery path set includes: Determine the number of vehicles according to the number of routes in the candidate delivery route set; Performing a startup cost assessment based on the unit vehicle startup cost and the number of vehicles to obtain vehicle startup cost data; Performing a transportation cost assessment based on the unit volume transportation cost and the number of vehicles to obtain vehicle unit volume transportation cost data; Evaluate the time cost based on the penalty cost per unit time and the deviation time to obtain the time cost data; The vehicle startup cost data, the vehicle unit volume transportation cost data and the time cost data are summed to obtain the third delivery cost data.
3. The vehicle path planning method according to claim 2, characterized in that: The unit volume transportation cost is calculated according to the following method: Obtaining vehicle volume, vehicle loading rate, area coefficient, transportation volume coefficient, product demand of the initial demand nodes, and distances between the initial demand nodes; Obtaining transportation cost data according to the vehicle loading rate, the area coefficient, the transportation volume coefficient, the product demand and the distance; The unit volume transportation cost is obtained according to the transportation cost data and the vehicle volume.
4. A path planning device, characterized in that: The device comprises: A path generation module, used to generate a plurality of initial delivery paths; the initial delivery paths include a plurality of initial demand nodes, and the initial demand nodes of each of the initial delivery paths are different; A path classification module, used for classifying the initial delivery path to obtain a first intermediate delivery path and a second intermediate delivery path; A node extraction module, used to extract an initial demand node from the first intermediate delivery path as an intermediate demand node; A first path determination module, configured to use the first intermediate delivery path excluding the intermediate demand node as a first candidate delivery path; A node adding module is used for the number of first intermediate distribution paths being n1, the number of second intermediate distribution paths being n2, the number of first candidate distribution paths being m, and the number of intermediate demand nodes being m. If m is equal to n1, m paths are randomly selected from a path set consisting of n1 first candidate distribution paths and n2 second intermediate distribution paths to obtain m preset distribution paths, and the preset distribution paths are the first candidate distribution paths or the second intermediate distribution paths; if m is less than n1, m paths are randomly selected from a path set consisting of m first candidate distribution paths, n1-m first intermediate distribution paths without node extraction, and n2 second intermediate distribution paths to obtain m preset distribution paths, and the preset distribution paths are the first candidate distribution paths, the first intermediate distribution paths, or the second intermediate distribution paths; the intermediate demand nodes are added to the preset distribution paths to obtain a third intermediate distribution path; a second path determination module, configured to use the third intermediate delivery path as a second candidate delivery path if the first delivery cost data is less than the second delivery cost data; the first delivery cost data is the delivery cost data of the third intermediate delivery path, and the second delivery cost data is the sum of the delivery cost data of the preset delivery path and the delivery cost data from the supply node to the intermediate demand node; a calculation module, configured to construct a candidate delivery path set according to the second candidate delivery path, and calculate third delivery cost data of the candidate delivery path set; A path planning module, used for performing path planning on the candidate delivery path set according to the third delivery cost data to obtain a target delivery path; The classifying the initial delivery path to obtain the first intermediate delivery path and the second intermediate delivery path includes: Obtaining a first path length and a second path length; the first path length is the total path length of the initial delivery path, the second path length is the path length from the supply node to the preset demand node, the preset demand node being the initial demand node farthest from the supply node among the multiple initial demand nodes of the initial delivery path; performing a path evaluation on the initial delivery path according to the first path length and the second path length to obtain a path score; classifying the initial delivery path according to the path score to obtain the first intermediate delivery path and the second intermediate delivery path; The classifying the initial delivery paths according to the path scores to obtain the first intermediate delivery paths and the second intermediate delivery paths includes: Comparing the path score with a preset score threshold; if the path score is greater than the preset score threshold, using the initial delivery path as the first intermediate delivery path; if the path score is less than or equal to the preset score threshold, using the initial delivery path as the second intermediate delivery path; The performing path planning on the candidate delivery path set according to the third delivery cost data to obtain a target delivery path includes: The candidate delivery path set is updated according to the third delivery cost data to obtain a first delivery path set, and the fourth delivery cost data of the first delivery path set is calculated; the fourth delivery cost data and the third delivery cost data are subtracted to obtain cost difference data; the first delivery path set is planned according to the ratio of the cost difference data to the fourth delivery cost data to obtain the target delivery path; The performing path planning on the candidate delivery path set according to the third delivery cost data to obtain a target delivery path also includes: The candidate delivery path set is updated according to the third delivery cost data to obtain a second delivery path set; the number of times the paths in the second delivery path set have not been updated is obtained; if the number of times the paths have not been updated is greater than or equal to a preset number threshold, the paths in the second delivery path set are used as the target delivery paths.
5. An electronic device, characterized in that The electronic device includes a memory and a processor, the memory stores a computer program, and the processor implements the vehicle path planning method according to any one of claims 1 to 3 when executing the computer program.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the vehicle path planning method according to any one of claims 1 to 3 is implemented.
