Vehicle driving path planning method and system
By constructing functions for battery loss, charging and transportation costs, and user satisfaction, and combining them with a genetic algorithm, the problem of inaccurate route planning for electric vehicles was solved, and efficient route planning for electric vehicle logistics and distribution was achieved.
Patent Information
- Application Number
- CN202511720066.2
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-11-21
- Publication Date
- 2026-02-17
AI Technical Summary
Most existing route planning algorithms are designed for gasoline-powered vehicles and are not applicable to electric vehicles, resulting in inaccurate route planning for electric vehicle logistics and delivery, which fails to meet actual needs.
We construct battery loss cost function, charging cost function, and total transportation cost function, and combine them with user satisfaction function for delivery time deviation to form total vehicle delivery cost function and user satisfaction function. We then use a genetic algorithm to solve for the optimal vehicle driving route to minimize total cost and maximize user satisfaction.
It provides a route planning model that comprehensively considers battery loss, charging costs, transportation costs, and delivery time requirements, improving the accuracy of route planning for electric vehicle logistics and meeting practical needs.
Smart Images

Figure CN121544157A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of vehicle driving path planning technology, specifically relating to a method and system for planning vehicle driving paths. Background Technology
[0002] In recent years, with the increasing global emphasis on environmental protection and sustainable development, as well as the continuous advancement of electric vehicle technology, the market penetration rate of electric vehicles is constantly rising. As a result, the application scenarios of electric vehicles are becoming more and more widespread. In the logistics and transportation sector, a large number of companies are electrifying their logistics and delivery fleets to save costs and improve the convenience of logistics and delivery.
[0003] However, compared to gasoline-powered vehicles, the limitations of electric vehicle range and charging infrastructure make route planning for electric vehicles in logistics transportation more complex. Therefore, when using electric vehicles for logistics transportation, a route planning model is needed to rationally plan the vehicle's travel path. However, most current route planning algorithms are designed for gasoline-powered freight vehicles, and their models are clearly unsuitable for electric vehicles. Directly applying them to electric vehicle route planning would lead to inaccurate route planning, failing to meet the actual needs of electric vehicle logistics delivery. Therefore, how to provide a method for planning vehicle travel paths for electric vehicle-based logistics delivery that comprehensively considers both delivery costs and user satisfaction has become an urgent problem to be solved. Summary of the Invention
[0004] The purpose of this invention is to provide a method and system for planning vehicle driving routes, in order to solve the problem that existing route planning models are not applicable to electric vehicles, resulting in inaccurate route planning and failure to meet the actual needs of electric vehicle logistics and distribution.
[0005] To achieve the above objectives, the present invention adopts the following technical solution: Firstly, a method for planning vehicle travel paths is provided, including: The system acquires vehicle battery information, charging station information in the delivery area, delivery station information, and vehicle information, wherein the delivery station information includes the expected delivery time window and the maximum allowed delivery time window for each delivery station. Based on vehicle battery information and charging station information, a battery loss cost function and a charging cost function are constructed. Based on delivery station information and vehicle information, a total transportation cost function for vehicles is constructed, wherein the total transportation cost function includes the transportation cost of vehicles and the cost of damage to goods; Based on the expected delivery time window and the maximum allowed delivery time window for each delivery station, a user satisfaction function based on delivery time deviation is constructed, where the smaller the delivery time deviation, the higher the user satisfaction. Using the battery loss cost function, the charging cost function, and the total transportation cost function, a total vehicle delivery cost function is constructed. Based on the total vehicle delivery cost function and the user satisfaction function, a vehicle driving route planning objective function is constructed with the optimization objectives of minimizing the total vehicle delivery cost and maximizing user satisfaction. Solve the objective function of the vehicle driving route planning to obtain the optimal vehicle driving route that minimizes the total vehicle delivery cost and maximizes user satisfaction.
[0006] Based on the aforementioned disclosures, this invention first constructs a battery loss cost function and a charging cost function for the vehicle based on vehicle battery information and charging station information in the delivery area, so as to consider the costs of electric vehicle battery loss and charging when planning the driving route. Then, based on delivery station information and vehicle information, a total transportation cost function including vehicle transportation costs and cargo damage costs is constructed, which, combined with the aforementioned battery-related cost functions, forms the total vehicle delivery cost function. Next, considering delivery timeliness, a user satisfaction function based on delivery time deviation is established to constrain the deviation between vehicle delivery time and user expected time, thereby minimizing the deviation and improving user satisfaction. Then, using the aforementioned total delivery cost function and user satisfaction function, a vehicle driving route planning objective function can be constructed with the optimization objectives of minimizing the total vehicle delivery cost and maximizing user satisfaction. Finally, by solving this objective function, the optimal vehicle driving route for the electric vehicle that minimizes the total delivery cost and maximizes user satisfaction can be obtained.
[0007] Through the above design, this invention proposes a logistics delivery route planning model for electric vehicles that comprehensively considers factors such as battery loss, charging costs, cargo damage costs, transportation costs, and delivery time requirements. This model guides the route planning of electric vehicles, thereby meeting the actual needs of electric vehicle logistics delivery, improving the accuracy of route planning, and providing decision support for the logistics route planning of electric vehicles.
[0008] In one possible design, vehicle battery information includes: original battery price, battery recycling price, and the vehicle's battery capacity and battery capacity retention rate during the current delivery cycle, and charging station information includes the number of charging stations; Specifically, based on vehicle battery information and charging station information, a battery depletion cost function is constructed, including: The battery loss cost function is constructed according to the following formula; ; In the formula, This represents the battery wear cost function. This indicates the battery recycling price. This indicates the original price of the battery. Indicates battery capacity retention rate. Indicates battery capacity, Indicates the first Vehicles in The difference in electricity usage when charging at different charging stations Indicates the first Vehicles in Average electricity usage per charging station Both represent battery loss coefficients. This indicates the battery degradation index. Indicates the total number of vehicles. Indicates the number of charging stations; in, For charging variables, It is 1 or 0, when When it is 1, it means the first... Vehicles in Charging at a charging station, when When it is 0, it means the first... The vehicles were not in the first The difference in electricity usage at each charging station is the first... Vehicles in The maximum allowable charging capacity when charging at a charging station is the same as the maximum allowable charging capacity when entering the first charging station. The difference between the remaining power at each charging station, and the average power usage is the average of the sum of the maximum allowed charging power and the remaining power.
[0009] In one possible design, a user satisfaction function based on delivery time deviation is constructed according to the expected delivery time window and the maximum allowed delivery time window for each delivery station, including: Based on the expected delivery time window and the maximum allowed delivery time window of each delivery station, an initial satisfaction function based on the delivery time deviation is constructed for each delivery station. Obtain the required cargo volume for each delivery station; The user satisfaction function is constructed based on the initial satisfaction functions and the demand for goods at each delivery station.
[0010] In one possible design, based on the expected delivery time window and the maximum allowed delivery time window for each delivery station, an initial satisfaction function based on the delivery time deviation is constructed for each delivery station, including: The initial satisfaction function for each delivery station is constructed according to the following formula; ; In the formula, Indicates the first The initial satisfaction function for each delivery station. Indicates the first The vehicle arrived at the The time for each delivery station, among which... Indicates the first The left endpoint of the expected delivery time window for each delivery station. Indicates the first The right endpoint of the expected delivery time window for each delivery station. Indicates the first The left endpoint of the maximum time window for each delivery station. Indicates the first The right endpoint of the maximum time window for each delivery station. ,and Indicates the total number of vehicles; Accordingly, based on the initial satisfaction functions and the demand for goods at each delivery station, the user satisfaction function is constructed, which includes: The user satisfaction function is constructed according to the following formula; ; In the formula, The user satisfaction function represents... Indicates the first The required volume of goods at each delivery station This indicates the total number of delivery stations.
[0011] In one possible design, the objective function for vehicle route planning is solved to obtain the optimal vehicle route that minimizes the total delivery cost and maximizes user satisfaction, including: Obtain an initial chromosome population, wherein any initial chromosome in the initial chromosome population is used to characterize a driving path for each vehicle; The initial chromosome population is subjected to a charging station insertion operation to obtain an individual population. Based on the objective function of vehicle path planning, multiple genetic operations are performed on the individual population to obtain the globally optimal chromosome; Obtain the perturbation evolution factor and the chromosome to be perturbed at the u-th iteration, wherein the initial value of u is 1, and when u is 1, the chromosome to be perturbed at the u-th iteration is the globally optimal chromosome; Based on the perturbation evolution factor, a perturbation search is performed on the chromosome to be perturbed in the u-th iteration to obtain the perturbed chromosome in the u-th iteration. Determine whether u has reached the maximum number of perturbations; If not, then increment u by 1, replace the chromosome to be perturbed in the u-th iteration with the perturbed chromosome, and reacquire the perturbing evolution factor and the chromosome to be perturbed in the u-th iteration until u reaches the maximum number of perturbing iterations, so as to determine the optimal vehicle driving path based on the perturbed chromosome when the maximum number of perturbing iterations is reached.
[0012] In a possible design, the perturbation evolution factor at the u-th iteration is obtained, including: Obtain the perturbed chromosome and perturbation evolution factor at the (u-1)th iteration; Obtain the maximum change in fitness and the average change in fitness during the process from the 1st iteration to the (u-1)th iteration; The perturbation evolution factor at the u-th iteration is calculated based on the perturbation evolution factor at the u-1th iteration, the average change in fitness, and the maximum change in fitness.
[0013] In one possible design, based on the perturbation evolution factor, a perturbation search is performed on the chromosome to be perturbed at the u-th iteration to obtain the perturbed chromosome at the u-th iteration, including: Obtain the specified chromosome for the g-th perturbation search, where the initial value of g is 1, and when g is 1, the specified chromosome for the g-th perturbation search is the chromosome to be perturbed for the u-th iteration; Generate the first perturbation random number and the second perturbation random number; An initial perturbation chromosome is generated based on the first perturbation random number, the second perturbation random number, and the specified chromosome; Calculate the difference between the fitness of the initial perturbed chromosome and the fitness of the specified chromosome; Determine whether the difference is less than 0; If so, the perturbation probability is calculated based on the difference and the perturbation evolution factor at the u-th iteration. Generate a third perturbation random number and determine whether the third perturbation random number is greater than the perturbation probability; If so, the initial perturbation chromosome is used as the initial perturbation chromosome after the g-th perturbation search; Determine whether g has reached the preset threshold; If not, then increment g by 1, update the specified chromosome at the time of the g-th perturbation search to the initial perturbation chromosome, and reacquire the specified chromosome at the time of the g-th perturbation search until g reaches a preset threshold to obtain the perturbation chromosome.
[0014] Secondly, a vehicle travel path planning system is provided, including: The acquisition unit is used to acquire vehicle battery information, charging station information in the delivery area, delivery station information, and vehicle information, wherein the delivery station information includes the expected delivery time window and the maximum allowed delivery time window for each delivery station. The battery cost calculation unit is used to construct the vehicle's battery loss cost function and charging cost function based on vehicle battery information and charging station information. The transportation cost calculation unit constructs a total transportation cost function for vehicles based on delivery station information and vehicle information. The total transportation cost function includes the transportation cost of the vehicles and the cost of damage to goods. The satisfaction function construction unit is used to construct a user satisfaction function based on the delivery time deviation, according to the expected delivery time window and the maximum allowed delivery time window of each delivery station. The smaller the delivery time deviation, the higher the user satisfaction. The route planning unit is used to construct a total vehicle delivery cost function using the battery loss cost function, the charging cost function, and the total transportation cost function, and to construct a vehicle driving route planning objective function based on the total vehicle delivery cost function and the user satisfaction function, with the optimization objectives of minimizing the total vehicle delivery cost and maximizing user satisfaction. The route planning unit is also used to solve the objective function of the vehicle driving route planning in order to obtain the optimal vehicle driving route that minimizes the total vehicle delivery cost and maximizes user satisfaction.
[0015] Thirdly, a vehicle travel path planning device is provided. Taking the device as an electronic device as an example, it includes a memory, a processor, and a transceiver that are connected in sequence. The memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the vehicle travel path planning method as described in the first aspect or any possible design in the first aspect.
[0016] Fourthly, a storage medium is provided, on which instructions are stored, which, when executed on a computer, perform the vehicle travel path planning method as described in the first aspect or any possible design of the first aspect.
[0017] Fifthly, a computer program product containing instructions is provided, which, when executed on a computer, cause the computer to perform the vehicle travel path planning method as described in the first aspect or any possible design of the first aspect.
[0018] Beneficial effects: (1) This invention proposes a logistics delivery route planning model for electric vehicles that comprehensively considers factors such as battery loss, charging cost, cargo damage cost, transportation cost and delivery time requirements. This model guides the route planning of electric vehicles, thus meeting the actual needs of electric vehicle logistics delivery, improving the accuracy of route planning, and providing decision support for the logistics route planning of electric vehicles. Attached Figure Description
[0019] Figure 1 A flowchart illustrating the steps of a vehicle travel path planning method provided in an embodiment of the present invention; Figure 2 A schematic diagram of the structure of a vehicle driving path planning system provided in an embodiment of the present invention; Figure 3 This is a schematic diagram of the structure of an electronic device provided in an embodiment of the present invention. Detailed Implementation
[0020] To more clearly illustrate the technical solutions in the embodiments of the present invention or the prior art, the present invention will be briefly introduced below in conjunction with the accompanying drawings and descriptions of the embodiments or the prior art. Obviously, the following description of the structure of the accompanying drawings is only some embodiments of the present invention. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort. It should be noted that the description of these embodiments is for the purpose of helping to understand the present invention, but does not constitute a limitation of the present invention.
[0021] It should be understood that although the terms first, second, etc., may be used herein to describe various units, these units should not be limited by these terms. These terms are only used to distinguish one unit from another. For example, a first unit may be referred to as a second unit, and similarly, a second unit may be referred to as a first unit, without departing from the scope of the exemplary embodiments of the invention.
[0022] It should be understood that the term "and / or" that may appear in this document is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can mean: A exists alone, B exists alone, and A and B exist simultaneously. The term " / and" that may appear in this document describes another relationship between related objects, indicating that two relationships can exist. For example, A / and B can mean: A exists alone, and A and B exist alone. In addition, the character " / " that may appear in this document generally indicates that the related objects before and after it are in an "or" relationship.
[0023] Example: See Figure 1As shown, the vehicle route planning method provided in this embodiment first establishes the vehicle's battery consumption cost function and charging cost function, and simultaneously constructs a total transportation cost function that includes transportation costs and cargo damage costs; then, it combines the aforementioned battery-related cost functions to form a total vehicle delivery cost function; subsequently, considering delivery timeliness, it establishes a user satisfaction function based on delivery time deviation; next, using the aforementioned total delivery cost function and user satisfaction function, it constructs a vehicle route planning objective function with the optimization objectives of minimizing the total vehicle delivery cost and maximizing user satisfaction; finally, by solving this objective function, the optimal vehicle route for an electric vehicle that minimizes the total delivery cost and maximizes user satisfaction can be obtained; Therefore, this method proposes a logistics delivery route planning model for electric vehicles that comprehensively considers factors such as battery loss, charging costs, cargo damage costs, transportation costs, and delivery time requirements. This model guides the route planning of electric vehicles, thus meeting the actual needs of electric vehicle logistics delivery, improving the accuracy of route planning, and providing decision support for electric vehicle logistics route planning. For example, this method can be run on the vehicle route planning end, which can be a server or an industrial computer, but is not limited to that used. It is understood that the aforementioned execution entity does not constitute a limitation on the embodiments of this application. Accordingly, the operation steps of this method can be, but are not limited to, the steps S1 to S6 below.
[0024] S1. Obtain vehicle battery information, charging station information for the delivery area, delivery station information, and vehicle information. The delivery station information includes the expected delivery time window and the maximum allowed delivery time window for each delivery station. In specific implementations, vehicle battery information may include, but is not limited to, the original battery price, the battery recycling price, and the vehicle's battery capacity and battery capacity retention rate during the current delivery cycle. The aforementioned charging station information includes the number of charging stations. Meanwhile, the delivery station information may include, but is not limited to, the distance between each delivery station, the expected delivery time window for each delivery station, and the maximum allowed delivery time window. Vehicle information may include, but is not limited to, the number of vehicles, the fixed cost of vehicle activation, the vehicle's driving speed (an average driving speed derived from historical delivery data), the cargo damage rate caused by vehicle operation, and the driver's labor cost per unit distance.
[0025] The expected delivery time window of any of the aforementioned delivery stations is the optimal delivery time window requested by the user. For example, if delivery is requested between 3 and 5 o'clock, the expected delivery time window is [3,5]. The maximum allowed delivery time window is the earliest and latest acceptable delivery time. For example, if the maximum time window is [2,6], it means that any delivery station can allow delivery to start as early as 2 o'clock and complete delivery as late as 6 o'clock. Based on this, the earliest delivery time of the maximum time window is earlier than the earliest delivery time of the expected delivery time window, and the latest delivery time of the maximum time window is later than the latest delivery time of the expected delivery time window.
[0026] Thus, after obtaining the aforementioned information, the objective function for vehicle driving path planning can be constructed. In this embodiment, since electric vehicles are used for goods delivery, compared to fuel vehicles, charging is involved, as well as issues such as battery wear and tear caused by charging. Therefore, considering the factors of charging and battery wear, a battery wear cost function and a charging cost function are constructed. The process can be, but is not limited to, the steps shown in step S2 below.
[0027] S2. Based on the vehicle battery information and charging station information, construct the battery loss cost function and the charging cost function caused by charging.
[0028] In practical applications, for example, but not limited to, the battery loss cost function can be constructed according to the following formula (1).
[0029] (1) In equation (1), This represents the battery wear cost function. This indicates the battery recycling price. This indicates the original price of the battery. Indicates the battery capacity retention rate (i.e., the first... The ratio of the current battery capacity of a vehicle to its initial battery capacity. Indicates battery capacity, Indicates the first Vehicles in The difference in electricity usage when charging at different charging stations Indicates the first Vehicles in Average electricity usage per charging station Both represent battery loss coefficients. This indicates the battery degradation index. Indicates the total number of vehicles. Indicates the number of charging stations; in this embodiment, Examples include, but are not limited to, setting the values to 2000, 3.25, 3.25, and 2.25 sequentially. Set to 2.21.
[0030] Furthermore, in the aforementioned formula (1), For charging variables, It is 1 or 0, when When it is 1, it means the first... Vehicles in Charging at a charging station, when When it is 0, it means the first... The vehicles were not in the first Charging at one charging station; meanwhile, the aforementioned difference in electricity usage is the first Vehicles in The maximum allowable charging capacity at each charging station (the maximum operating charging capacity for each vehicle is a set value, such as 80%, or other values can be set), and the maximum allowable charging capacity at each charging station. The difference in remaining battery power between charging stations; for example, the first charging station. The vehicle entered the first When there are multiple charging stations, if the remaining power is 20 (out of a total of 100), and the maximum allowed charging power is 80, then the difference in power usage is 60. Similarly, the average power usage is the average of the sum of the maximum allowed charging power and the remaining power. Of course, the above example is just an illustration and is not limited to this.
[0031] After constructing the battery loss cost function based on the aforementioned formula (1), the charging cost function can be constructed. For example, but not limited to, the following formula (2) can be used to construct the charging cost function.
[0032] (2) In equation (2), Represents the charging cost function. Indicates the first The electricity price for each vehicle during charging (i.e., the price per kilowatt-hour of electricity charged); among which... The value of the first This is related to the charging times of each vehicle, which divides the day into peak hours, off-peak hours, and low-price hours. Therefore, according to the... The charging time for each vehicle will be... The values are peak electricity price, off-peak electricity price, and off-peak electricity price; of course, the electricity price for different time periods can be obtained from the power grid and pre-stored in the vehicle route planning terminal.
[0033] Therefore, after constructing the function corresponding to battery loss and charging costs, the total transportation cost function can be constructed, as shown in step S3 below.
[0034] S3. Based on delivery station information and vehicle information, construct a total transportation cost function for the vehicle, wherein the total transportation cost function includes the vehicle transportation cost and the cargo damage cost.
[0035] In practical implementation, for example, but not limited to, the following formula (3) can be used to construct the aforementioned total transportation cost function.
[0036] (3) In equation (3), This represents the total transportation cost. This represents the fixed cost of putting a vehicle into operation (i.e., the fixed cost per vehicle). The total number of vehicles. This indicates the labor cost per unit distance for drivers. Indicates the first The delivery station and the first The distance between delivery stations Represents decision variables, Costs of damage to goods, of which, It is 1 or 0, when When it is 1, it means the first... Vehicle from the first The delivery station was reached by the first... Each delivery station, when When it is 0, it means the first... The vehicle did not depart from the first The delivery station was reached by the first... One delivery station The total number of delivery stations, and when When it is 0, the first The first delivery station and the first Each delivery station serves as a distribution center.
[0037] Furthermore, the cost of cargo damage can be expressed as: (4) In equation (4), This indicates the damage rate. Indicates the vehicle's speed.
[0038] Thus, the total transportation cost function can be constructed using the aforementioned formulas (3) and (4). Furthermore, this embodiment also considers delivery timeliness and establishes a user satisfaction function based on delivery time deviation to constrain the deviation between vehicle delivery time and user's expected time, thereby minimizing the deviation between delivery time and user's expected time and improving user satisfaction. The construction process of the user satisfaction function is shown in step S4 below.
[0039] S4. Based on the expected delivery time window and the maximum allowed delivery time window for each delivery station, construct a user satisfaction function based on delivery time deviation, where the smaller the delivery time deviation, the higher the user satisfaction. In specific implementation, for example, but not limited to, the following steps S41 to S43 can be used to construct the user satisfaction function.
[0040] S41. Based on the expected delivery time window and the maximum allowed delivery time window of each delivery station, an initial satisfaction function based on the delivery time deviation is constructed for each delivery station. In this embodiment, the following formula (5) can be used, but is not limited to, to construct the initial satisfaction function for each delivery station.
[0041] (5) In equation (5), Indicates the first The initial satisfaction function for each delivery station. Indicates the first The vehicle arrived at the The time for each delivery station, among which... Indicates the first The left endpoint of the expected delivery time window for each delivery station. Indicates the first The right endpoint of the expected delivery time window for each delivery station. Indicates the first The left endpoint of the maximum time window for each delivery station. Indicates the first The right endpoint of the maximum time window for each delivery station. ,and This indicates the total number of vehicles.
[0042] According to formula (5) above, when the vehicle arrives at the delivery station earlier than the left endpoint of the maximum time window, i.e., when the delivery time deviation is the largest, the initial satisfaction is 0. When the vehicle arrives at the delivery station at a time between the left endpoint of the maximum time window and the left endpoint of the expected delivery time window, indicating that the delivery time is within the earliest delivery time allowed by the user, the initial satisfaction is... Similarly, when the vehicle arrives at the delivery station within the expected delivery time window, it indicates that the delivery time is the optimal delivery time expected by the user, and its initial satisfaction level is 1. Furthermore, when the vehicle arrives outside the right end of the expected delivery time window but before the right end of the maximum time window, it indicates that the delivery time exceeds the latest delivery time expected by the user, but is before the latest delivery time acceptable to the customer, and its initial satisfaction level is [missing value]. Finally, if the vehicle arrives later than the latest delivery time acceptable to the customer, the initial satisfaction level is 0.
[0043] Thus, as can be seen from the aforementioned initial satisfaction formula, the smaller the difference between the delivery time and the expected delivery time window, the higher the satisfaction. Meanwhile, in order to take into account the impact of customers with different demand for goods on satisfaction, this embodiment also includes the demand for goods at each delivery station, as shown in steps S42 and S43 below.
[0044] S42. Obtain the required quantity of goods for each delivery station.
[0045] S43. Construct the user satisfaction function based on each initial satisfaction function and the demand for goods at each delivery station; in this embodiment, for example, but not limited to, the following formula (6) can be used to construct the user satisfaction function.
[0046] (6) In equation (6), The user satisfaction function represents... Indicates the first The required volume of goods at each distribution station.
[0047] In this embodiment, the initial satisfaction level is multiplied by the demand volume to highlight the impact of high-demand customers on their satisfaction with logistics services. High-demand customers are more dependent on logistics services; they may need more products, or the products may be crucial to their business or lives. Therefore, they have higher requirements for the timeliness, accuracy, and reliability of logistics services. At the same time, dissatisfaction with logistics services by high-demand customers is more likely to cause losses. If high-demand customers are dissatisfied with logistics services, they may switch to other suppliers or reduce their purchase volume, which will cause significant losses to the logistics company's revenue and profits.
[0048] Thus, after constructing the user satisfaction function through the aforementioned steps S41 to S43, the vehicle driving path planning objective function can be constructed by combining it with the aforementioned cost function, as shown in step S5 below.
[0049] S5. Using the battery loss cost function, the charging cost function, and the total transportation cost function, a total vehicle delivery cost function is constructed. Based on the total vehicle delivery cost function and the user satisfaction function, a vehicle driving route planning objective function is constructed with the optimization objectives of minimizing the total vehicle delivery cost and maximizing user satisfaction. In this embodiment, the total transportation cost function is obtained by summing the battery loss cost function, the charging cost function, and the total transportation cost function.
[0050] Meanwhile, the objective function for vehicle path planning can be, but is not limited to, the following: (7) In equation (7), This represents the objective function for vehicle path planning. The function representing the total cost of vehicle delivery, i.e., the overall optimization objective, is to minimize... That is to make To minimize the total cost function of vehicle delivery, we need to maximize user satisfaction.
[0051] Furthermore, the constraints of the objective function for the aforementioned vehicle route planning may include, but are not limited to: each delivery station is served only once; the number of vehicles is no greater than the number of delivery vehicles equipped at the delivery center; the origin and destination of each vehicle are both the delivery center; the vehicle's load weight cannot exceed the rated maximum load weight; the delivery distance of each vehicle does not exceed the maximum delivery distance; the load weight of the delivery vehicle when leaving point j is the load weight of the delivery vehicle when leaving point i minus the demand of the customer at point j; of course, the aforementioned constraints are commonly used constraints for vehicle delivery route functions.
[0052] For electric vehicles, the following constraints are also introduced: (1) The vehicle does not consume electricity when providing services at the delivery station, which is expressed as: ,in, Indicates the first The remaining battery power of the vehicle when it arrives at the i-th delivery station. Indicates the first (1) The remaining battery power of the vehicle when it leaves the i-th delivery station; (2) The remaining battery power of the vehicle when it leaves the i-th delivery station is sufficient to travel to the next delivery station j, which is expressed as: In the formula, This indicates the electricity consumption per unit distance.
[0053] Thus, after constructing the vehicle driving path planning objective function based on the aforementioned step S5, the vehicle driving path can be planned based on this objective function, as shown in step S6 below.
[0054] S6. Solve the objective function of the vehicle driving route planning to obtain the optimal vehicle driving route that minimizes the total vehicle delivery cost and maximizes user satisfaction. In specific implementation, this embodiment provides an improved genetic algorithm to solve the objective function, thereby obtaining the optimal vehicle driving route that minimizes the total vehicle delivery cost and maximizes user satisfaction.
[0055] The process of optimizing the driving path based on the improved genetic algorithm can be, but is not limited to, the steps S61 to S67 below.
[0056] S61. Obtain an initial chromosome population, wherein any initial chromosome in the initial chromosome population is used to represent a driving path for each vehicle; in this embodiment, the quality of the initial population is one of the key factors for the performance of the genetic algorithm. In order to quickly obtain a high-quality solution, this embodiment provides a scanning-based initial population generation method, the process of which may be, but is not limited to, the steps S61a to S61f below.
[0057] S61a. Establish a polar coordinate system with the coordinates of the distribution center as the origin.
[0058] S61b. Based on the coordinates of each delivery station and the origin, calculate the angle between the target line segment of each delivery station and the x-axis in the polar coordinate system. The target line segment of any delivery station is the line connecting that delivery station and the origin. In this embodiment, for any delivery station, the distance between that delivery station and the origin is calculated using the coordinate distance formula, which is the length of the target line segment corresponding to that delivery station. Then, the cosine of the angle between the target line segment and the x-axis is obtained by dividing the x-coordinate of that delivery station by the length of the target line segment. The sine of the angle between the target line segment and the x-axis is also obtained by dividing the y-coordinate of that delivery station by the length of the target line segment. Next, the sine is divided by the cosine to obtain the tangent. Finally, the arctangent function is used to calculate the angle between the target line segment corresponding to any delivery station and the x-axis.
[0059] Thus, after obtaining the angle between each delivery station and the x-axis, the delivery stations can be sorted based on the size of the angle, as shown in step S61c below.
[0060] S61c. Arrange each delivery station in descending order of the included angles to obtain a sorting sequence; in this embodiment, after obtaining the sorting sequence of the delivery stations, an initial driving path can be generated based on it, as shown in step S61d below.
[0061] S61d. Based on the sorted sequence, generate an initial driving path that starts and ends at the distribution center and includes all delivery stations; in specific implementation, the distribution center is added to the beginning and end of the sorted sequence to form an initial driving path, and the distribution center is represented by 0, while the other delivery nodes are represented by positive integers.
[0062] After obtaining an initial driving path, population initialization can be performed, which involves diversifying driving paths and allocating vehicles based on this path. The process is shown in steps S61e and S61f below.
[0063] S61e. Generate a random number between [0, n], and swap the delivery stations in the initial driving path according to the random number to obtain a pre-chromosome; in this embodiment, the swapped gene is located according to the generated random number. For example, if the generated random number is 5, the 5th station in the initial driving path is used as the swapped gene, and then swapped with any other station in the initial driving path to obtain a pre-chromosome.
[0064] After obtaining the pre-chromosomes, vehicle allocation can be performed, as shown in step S61f below.
[0065] S61f. Perform vehicle allocation operation on the pre-chromosome to obtain an initial chromosome, and regenerate a random number between [0, n] until the number of initial chromosomes reaches the preset population size, and generate the initial chromosome population; In this embodiment, for example, but not limited to, the traditional greedy algorithm can be used to allocate vehicles to obtain an initial chromosome. Of course, vehicle allocation based on the greedy algorithm is a common method of vehicle allocation in path planning, which mainly includes: (1) initialization, determining the number of available vehicle types and the quantity limit of each vehicle type, initializing the load status of each vehicle to empty, and the location to the distribution center; (2) allocation For each delivery station, the pre-chromosome is iterated through. Vehicles are selected from the available vehicles that meet the following conditions: their load capacity meets the station's cargo requirements, and the vehicle closest to the station is prioritized. Then, the customer node's cargo is allocated to the selected vehicle, and its load status is updated. This process continues until all delivery stations are allocated. If a selected vehicle is already fully loaded, it is removed from the available vehicle list. Finally, the feasibility of the resulting initial chromosome is verified, i.e., whether it meets the aforementioned constraints. If it does, it is considered an initial chromosome.
[0066] Therefore, by repeating the above process, multiple initial chromosomes can be generated. Of course, if the number of initial chromosomes obtained by generating a random number for gene swapping is insufficient to meet the population size, two random numbers can be generated to swap two gene segments. The principle is the same as the example above, and will not be repeated here.
[0067] Thus, this embodiment is equivalent to using natural number encoding to encode chromosomes and obtain initial chromosomes. For example, an initial chromosome is: 0-2-5-4-0-1-3-8-7-6-0. The travel path of the first vehicle is: starting from the distribution center, passing through distribution stations 2, 5 and 4 in sequence, and then returning to the distribution center. The travel path of the second vehicle is: starting from the distribution center, passing through distribution stations 1, 3, 8, 7 and 6 in sequence, and then returning to the distribution center. Of course, the above example is only an illustration, and this embodiment is not limited to this.
[0068] After obtaining the initial chromosome population through the aforementioned steps S61a to S61f, it is necessary to perform the charging station insertion operation to take the charging factor into account during the path planning process. The charging insertion process is shown in step S62 below.
[0069] S62. Perform a charging station insertion operation on the initial chromosome population to obtain an individual population. For any initial chromosome in the initial chromosome population, the charging station insertion operation is as follows: at each delivery station in any initial chromosome, check the remaining battery power of the corresponding vehicle; then, determine whether the remaining battery power is greater than the battery power required for the vehicle to travel from the current delivery station to the next delivery station. If not, determine the charging station closest to the current delivery station from among all the charging stations and insert it between the current delivery station and the next delivery station. In this way, by polling each delivery station in any initial chromosome in the aforementioned manner, the charging station insertion operation of any initial chromosome can be completed, thereby obtaining an individual population after all initial chromosomes have been processed.
[0070] For example, based on the aforementioned examples, assuming that a chromosome in an individual population is: 0-2-5-9-4-0-1-3-8-10-7-6-0, then it means that vehicle 1 departs from the distribution center, passes through distribution stations 2 and 5, charges at charging station 9 (9 is the identifier for the charging station), then makes deliveries at distribution station 4, and finally returns to the distribution center; of course, vehicle 2 passes through distribution stations 1, 3 and 8, charges at charging station 10, then passes through distribution stations 7 and 6, and finally returns to the distribution center; the aforementioned examples are merely illustrations, and this embodiment is not limited to them.
[0071] After obtaining the individual population, multiple genetic operations can be performed, as shown in step S63 below.
[0072] S63. Based on the objective function of vehicle path planning, multiple genetic operations are performed on the individual population to obtain the globally optimal chromosome; in specific implementation, the multiple genetic operations are as follows: (1) Obtain the specified population at the m-th iteration, where the initial value of m is 1, and when m is 1, the specified population at the m-th iteration is the individual population.
[0073] (2) The reciprocal of the objective function for vehicle path planning is used as the fitness function, and the fitness of each chromosome in the specified population at the m-th iteration is calculated based on the fitness function. In this embodiment, for any chromosome at the m-th iteration, the stations along the route of each vehicle and the charging station for battery charging can be determined based on the vehicle path represented by the chromosome. The remaining power consumption per unit mile of each vehicle (i.e., the remaining power at the current station minus the product of the distance between the current station and the next station and the power consumption) is used as the remaining power at the next station. The remaining power at each distribution station and the remaining power when entering the charging station are obtained. At the same time, the time for each vehicle to arrive at the corresponding station is calculated based on the departure time, driving speed, station distance, and charging time of each vehicle (which can be calculated based on the remaining power when entering the charging station, the maximum allowable charging power, and the charging power of the charging station (a preset value). Thus, by substituting the aforementioned data into the fitness function, the fitness of any chromosome can be obtained. That is, the greater the fitness of any chromosome, the lower the total vehicle delivery cost and the higher the user satisfaction.
[0074] (3) Select the largest fitness from each fitness and use the largest fitness to update the global optimal fitness at the m-th iteration. In this embodiment, it is first determined whether the largest fitness is greater than the global optimal fitness at the (m-1)-th iteration. If so, the largest fitness is used as the global optimal fitness at the m-th iteration. Otherwise, the global optimal fitness at the (m-1)-th iteration is used as the global optimal fitness at the m-th iteration.
[0075] After obtaining the globally optimal fitness at the current iteration, it can be determined whether m has reached the maximum number of inheritances, i.e.: (4) Determine whether m has reached the maximum number of inheritances.
[0076] (5) If not, then perform individual selection, crossover and mutation operations on the specified population at the m-th iteration to obtain the specified population at the (m+1)-th iteration.
[0077] In this embodiment, the roulette wheel selection method can be used, but is not limited to, for individual selection. Since the genes for the charging stations are embedded, direct crossover may result in the generation of unreasonable charging station selections. Therefore, before crossover, the genes corresponding to the charging stations need to be removed from the two selected parent individuals. Then, based on the crossover probability, multi-point crossover is performed to obtain two initial offspring individuals. Finally, a charging station insertion operation is performed on the two initial offspring individuals to obtain two more offspring individuals. The charging station insertion operation process can be found in the aforementioned step S62, and will not be repeated here.
[0078] Meanwhile, this embodiment provides an improved method for calculating the crossover probability to solve the problem that the fixed crossover probability in traditional technology easily destroys the optimal solution when the population tends to stabilize.
[0079] The crossover probability at the m-th iteration is calculated as follows: (8) In equation (8), Indicates the crossover probability. The fitness of the two parent individuals is the highest. This represents the average fitness of the specified population at the m-th iteration. The maximum fitness in the specified population at the m-th iteration. This represents the maximum mutation probability at the m-th iteration. This represents the minimum mutation probability at the m-th iteration.
[0080] Where m is less than or equal to R / 4, The value is 0.9, when m is greater than R / 4 and less than or equal to 3R / 4. The value is 0.8, when m is greater than 3R / 4 and less than or equal to R. The value is 0.7, where R represents the maximum number of inheritances; meanwhile, the minimum mutation probability is 0.5.
[0081] Thus, as can be seen from the aforementioned probability calculation formula, the crossover probability obtained by this function in the early stage can satisfy the purpose of increasing population diversity. However, as the number of inheritances increases, the probability of individual crossover gradually decreases, thereby ensuring that the optimal solution is not destroyed.
[0082] Similarly, when performing individual mutation, it is necessary to first delete the gene corresponding to the charging station, and then randomly generate two non-repeating natural numbers in the interval [1,n] as the position index of the gene exchange in the previous generation of the chromosome; then, based on the mutation probability and the two position indexes, perform the individual mutation operation (i.e., swap the genes corresponding to the two position indices), and after the individual mutation operation, perform the charging station insertion operation to obtain the mutated individual; finally, after all chromosomes have been mutated, the specified population at the (m+1)th iteration can be obtained.
[0083] This embodiment also provides an adaptive method for calculating the mutation probability: (9) In the formula, This represents the mutation probability at the m-th iteration. This represents the variation control factor, with values between (0,1).
[0084] After completing one genetic operation, genetic operations can continue, as shown below.
[0085] (6) Increment m by 1 and reacquire the specified population at the m-th iteration until m reaches the maximum number of inheritances. Then, take the chromosome corresponding to the global optimal fitness that has reached the maximum number of inheritances as the global optimal chromosome.
[0086] After completing multiple genetic operations, in order to prevent getting trapped in local optima and improve the search capability for optimal solutions, this embodiment also includes a perturbation search process, as shown in steps S64 to S67.
[0087] S64. Obtain the perturbation evolution factor and the chromosome to be perturbed at the u-th iteration, wherein the initial value of u is 1, and when u is 1, the chromosome to be perturbed at the u-th iteration is the globally optimal chromosome; in specific implementation, for example, but not limited to, the following steps S64a to S64c can be used to calculate the perturbation evolution factor at the u-th iteration.
[0088] S64a. Obtain the perturbed chromosome and perturbation evolution factor at the (u-1)th iteration.
[0089] S64b. Obtain the maximum change in fitness and the average change in fitness during the process from the 1st iteration to the (u-1)th iteration; in this embodiment, assuming u is 4, the maximum value among the fitness changes of the first and second iterations, and the second and third iterations, is obtained as the maximum change in fitness; then, the average of the aforementioned fitness changes is used as the average change in fitness; after obtaining the maximum change in fitness and the average change in fitness, the perturbation evolution factor at the current iteration can be calculated, as shown in step S64d below.
[0090] S64d. Calculate the perturbation evolution factor at the u-1th iteration based on the perturbation evolution factor, the average change in fitness, and the maximum change in fitness.
[0091] In this embodiment, for example, but not limited to, the following formula (10) can be used to calculate the perturbation evolution factor at the u-th iteration.
[0092] (10) In equation (10), Let represent the perturbation evolution factor at the u-th iteration. This represents the perturbation evolution factor at the (u-1)th iteration. These represent the average change in fitness and the maximum change in fitness, respectively. This is the disturbance control factor, which is a very small constant, such as 0.01.
[0093] Therefore, after calculating the perturbation evolution factor at the u-th iteration through the aforementioned steps S64a to S64c, a perturbation search for the globally optimal chromosome can be performed, as shown in step S65 below.
[0094] S65. Based on the perturbation evolution factor, perform a perturbation search on the chromosome to be perturbed in the u-th iteration to obtain the perturbed chromosome in the u-th iteration; in specific applications, the perturbation search on the chromosome to be perturbed in the u-th iteration is a multiple neighborhood search process, as shown in the following steps S65a to S65j.
[0095] S65a. Obtain the specified chromosome for the g-th perturbation search, wherein the initial value of g is 1, and when g is 1, the specified chromosome for the g-th perturbation search is the chromosome to be perturbed for the u-th iteration.
[0096] After obtaining the specified chromosome, two perturbation random numbers can be generated, as shown in step S65b below.
[0097] S65b. Generate a first perturbation random number and a second perturbation random number; in this embodiment, the value range of the two perturbation random numbers is [1, n]; thus, after generating the two perturbation random numbers, the initial perturbation chromosome can be generated based on them, and the process is shown in step S65c below.
[0098] S65c. Based on the first perturbation random number, the second perturbation random number, and the specified chromosome, an initial perturbation chromosome is generated; in specific applications, the first perturbation random number is used as the first gene position index of the specified chromosome, and the second perturbation random number is used as the second gene position index of the specified chromosome; then, the gene corresponding to the first gene position index is swapped with the gene corresponding to the second gene position index to obtain the initial perturbation chromosome.
[0099] After obtaining the initial perturbed chromosome, the fitness difference can be calculated, as shown in step S65d below.
[0100] S65d. Calculate the difference between the fitness of the initial perturbed chromosome and the fitness of the specified chromosome; in this embodiment, calculating the fitness difference before and after the perturbed search is to determine whether the solution after the perturbed search is better, and the determination process is shown in step S65e below.
[0101] S65e. Determine whether the difference is less than 0; In this embodiment, when the difference is less than 0, it means that the fitness of the initial perturbation chromosome is less than that of the specified chromosome at the time of the g-th perturbation search, that is, after the perturbation search, the individual is worse than the original individual. At this time, a new solution needs to be accepted with a probability; Conversely, when the difference is greater than 0, it means that the solution after perturbation is better, that is, the total cost is lower and the satisfaction is higher. Therefore, it can be directly used as the initial perturbation chromosome after the g-th perturbation search.
[0102] Meanwhile, the process of accepting a new solution with a probability is shown in steps S65f to S65h below.
[0103] S65f. If so, the perturbation probability is calculated based on the difference and the perturbation evolution factor at the u-th iteration; in specific implementation, for example, but not limited to, the following formula (11) can be used to calculate the perturbation probability.
[0104] (11) In equation (11), This represents the probability of the perturbation. This represents the difference. This represents the Boltzmann constant.
[0105] After calculating the perturbation probability, a third perturbation random number is generated so that the new solution can be judged based on the magnitude of the two perturbation probabilities. The process is shown in steps S65g and S65h below.
[0106] S65g. Generate a third perturbation random number and determine whether the third perturbation random number is greater than the perturbation probability. In this embodiment, the value range of the third perturbation random number is (0,1). If the third perturbation random number is greater than the perturbation probability, then the following step S65h is executed. Otherwise, the new solution is not accepted, that is, the specified chromosome at the time of the g-th perturbation search is retained as the initial perturbation chromosome after the g-th perturbation search.
[0107] S65h. If so, the initial perturbation chromosome is used as the initial perturbation chromosome after the g-th perturbation search.
[0108] Thus, through the aforementioned steps, a perturbation search for a specified chromosome can be completed. Then, it can be determined whether g has reached a preset threshold. If the aforementioned conditions are not met, the search needs to continue until g reaches the preset threshold, at which point the perturbation search for the chromosome to be perturbed in the u-th iteration can be completed. The aforementioned judgment and loop process is as shown in steps S65i and S65j below.
[0109] S65i. Determine whether g has reached the preset threshold; In this embodiment, the preset threshold represents the number of neighborhood searches in one perturbation search process, which can be specifically set according to actual use, and is not specifically limited here.
[0110] S65j. If not, increment g by 1, update the specified chromosome at the time of the g-th perturbation search to the initial perturbation chromosome, and reacquire the specified chromosome at the time of the g-th perturbation search until g reaches a preset threshold to obtain the perturbation chromosome.
[0111] After completing the perturbation search for the chromosome to be perturbed in the u-th iteration through the aforementioned steps S65a to S65j, it can be determined whether u has reached the maximum number of perturbations, as shown in step S66 below.
[0112] S66. Determine whether u has reached the maximum number of perturbations; in this embodiment, if the maximum number of perturbations has not been reached, the perturbation search needs to continue, and the process is as shown in step S67 below.
[0113] S67. If not, increment u by 1, replace the chromosome to be perturbed in the u-th iteration with the perturbed chromosome, and reacquire the perturbation evolution factor and the chromosome to be perturbed in the u-th iteration until u reaches the maximum number of perturbations, so as to determine the optimal vehicle driving path based on the perturbed chromosome when the maximum number of perturbations is reached.
[0114] When u reaches the maximum number of perturbations, the vehicle path represented by the corresponding perturbed chromosome is the optimal driving path for each vehicle, which includes the delivery order and the charging stations visited during the delivery process. Therefore, using this path for delivery can minimize the total vehicle delivery cost function while ensuring the highest user satisfaction.
[0115] Therefore, through the vehicle driving path planning method described in detail in steps S1 to S6 above, this invention proposes a logistics delivery driving path planning model for electric vehicles that comprehensively considers factors such as battery loss, charging cost, cargo damage cost, transportation cost, and delivery time requirements. This model guides the path planning of electric vehicles, thereby meeting the actual needs of electric vehicle logistics delivery, improving the accuracy of path planning, and providing decision support for the logistics path planning of electric vehicles.
[0116] like Figure 2 As shown, the second aspect of this embodiment provides a hardware system for implementing the vehicle driving path planning method described in the first aspect of the embodiment, comprising: The acquisition unit is used to acquire vehicle battery information, charging station information in the delivery area, delivery station information, and vehicle information. The delivery station information includes the expected delivery time window and the maximum allowed delivery time window for each delivery station.
[0117] The battery cost calculation unit is used to construct the vehicle's battery loss cost function and charging cost function based on vehicle battery information and charging station information.
[0118] The transportation cost calculation unit constructs a total transportation cost function for vehicles based on delivery station information and vehicle information. The total transportation cost function includes the transportation cost of the vehicles and the cost of damage to goods.
[0119] The satisfaction function construction unit is used to construct a user satisfaction function based on the delivery time deviation, according to the expected delivery time window and the maximum allowed delivery time window of each delivery station. The smaller the delivery time deviation, the higher the user satisfaction.
[0120] The route planning unit is used to construct a total vehicle delivery cost function using the battery loss cost function, the charging cost function, and the total transportation cost function, and based on the total vehicle delivery cost function and the user satisfaction function, to construct a vehicle driving route planning objective function with the optimization objectives of minimizing the total vehicle delivery cost and maximizing user satisfaction.
[0121] The route planning unit is also used to solve the objective function of the vehicle driving route planning in order to obtain the optimal vehicle driving route that minimizes the total vehicle delivery cost and maximizes user satisfaction.
[0122] The working process, working details and technical effects of the system provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.
[0123] like Figure 3 As shown, the third aspect of this embodiment provides a vehicle driving path planning device. Taking the device as an electronic device as an example, it includes: a memory, a processor, and a transceiver that are connected in sequence. The memory is used to store a computer program, the transceiver is used to send and receive messages, and the processor is used to read the computer program and execute the vehicle driving path planning method as described in the first aspect of the embodiment.
[0124] For specific examples, the memory may include, but is not limited to, random access memory (RAM), read-only memory (ROM), flash memory, first-in-first-out (FIFO) memory, and / or first-in-last-out (FILO) memory, etc.; specifically, the processor may include one or more processing cores, such as a 4-core processor, an 8-core processor, etc. The processor may be implemented using at least one hardware form of DSP (Digital Signal Processing), FPGA (Field-Programmable Gate Array), PLA (Programmable Logic Array). The processor may also include a main processor and a coprocessor. The main processor, also known as the CPU (Central Processing Unit), is used to process data in the wake-up state; the coprocessor is a low-power processor used to process data in the standby state.
[0125] In some embodiments, the processor may integrate a GPU (Graphics Processing Unit), which is responsible for rendering and drawing the content to be displayed on the screen. For example, the processor may not be limited to microprocessors of the STM32F105 series, reduced instruction set computer (RISC) microprocessors, x86 architecture processors, or processors with integrated neural network processing units (NPUs). The transceiver may be, but is not limited to, a Wi-Fi transceiver, a Bluetooth transceiver, a General Packet Radio Service (GPRS) transceiver, a ZigBee (a low-power LAN protocol based on the IEEE 802.15.4 standard) transceiver, a 3G transceiver, a 4G transceiver, and / or a 5G transceiver. Furthermore, the device may also include, but is not limited to, a power module, a display screen, and other necessary components.
[0126] The working process, working details and technical effects of the electronic device provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.
[0127] The fourth aspect of this embodiment provides a storage medium for storing instructions containing the vehicle driving path planning method described in the first aspect of the embodiment. That is, the storage medium stores instructions that, when executed on a computer, perform the vehicle driving path planning method as described in the first aspect of the embodiment.
[0128] The storage medium refers to a carrier for storing data, which may include, but is not limited to, floppy disks, optical disks, hard disks, flash memory, USB flash drives, and / or memory sticks. The computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable devices.
[0129] The working process, working details and technical effects of the storage medium provided in this embodiment can be found in the first aspect of the embodiment, and will not be repeated here.
[0130] The fifth aspect of this embodiment provides a computer program product containing instructions that, when executed on a computer, cause the computer to perform a vehicle driving path planning method as described in the first aspect of the embodiment, wherein the computer may be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device.
[0131] Finally, it should be noted that the above description is merely a preferred embodiment of the present invention and is not intended to limit the scope of protection of the present invention. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of the present invention should be included within the scope of protection of the present invention.
Claims
1. A method of planning a travel path of a vehicle, characterized by, The method comprises the following steps: acquiring vehicle battery information, charging station information of a delivery area, delivery site information and vehicle information, wherein the delivery site information comprises expected delivery time windows and maximum delivery time windows of each delivery site; constructing a battery loss cost function and a charging cost function of the vehicle according to the vehicle battery information and the charging station information; constructing a total transportation cost function of the vehicle based on the delivery site information and the vehicle information, wherein the total transportation cost function comprises a transportation cost and a goods damage cost of the vehicle; constructing a user satisfaction function based on delivery time deviation according to the expected delivery time windows and the maximum delivery time windows of each delivery site, wherein the smaller the delivery time deviation is, the higher the user satisfaction is; constructing a total vehicle delivery cost function by using the battery loss cost function, the charging cost function and the total transportation cost function, and constructing a vehicle driving path planning target function with the optimization objectives of minimizing the total vehicle delivery cost and maximizing the user satisfaction based on the total vehicle delivery cost function and the user satisfaction function; solving the vehicle driving path planning target function to obtain an optimal vehicle driving path with the minimum total vehicle delivery cost and the maximum user satisfaction.
2. The method of claim 1, wherein, The vehicle battery information comprises a battery original price, a battery recycling price, a battery capacity of the vehicle in a current delivery cycle and a battery capacity retention rate, and the charging station information comprises a charging station number; wherein the battery loss cost function of the vehicle is constructed according to the vehicle battery information and the charging station information, comprising: the battery loss cost function is constructed according to the following formula: ; In the formula, This represents the battery wear cost function. This indicates the battery recycling price. This indicates the original price of the battery. Indicates battery capacity retention rate. Indicates battery capacity, Indicates the first Vehicles in The difference in electricity usage when charging at different charging stations Indicates the first Vehicles in Average electricity usage per charging station Both represent battery loss coefficients. This indicates the battery degradation index. Indicates the total number of vehicles. Indicates the number of charging stations; wherein, is a charging variable, is 1 or 0, when is 1, indicates that the th vehicle is charging at the th charging station, when is 0, indicates that the th vehicle is not charging at the th charging station, the power usage difference is the difference between the maximum allowed charging power of the th vehicle when charging at the th charging station and the remaining power when entering the th charging station, and the power usage average is the average of the sum of the maximum allowed charging power and the remaining power.
3. The method of claim 1, wherein, the user satisfaction function based on delivery time deviation is constructed according to the expected delivery time windows and the maximum delivery time windows of each delivery site, comprising: an initial satisfaction function based on delivery time deviation of each delivery site is constructed according to the expected delivery time windows and the maximum delivery time windows of each delivery site; the demand goods quantity of each delivery site is acquired; the user satisfaction function is constructed according to the initial satisfaction functions and the demand goods quantity of each delivery site.
4. The method of claim 3, wherein, the initial satisfaction function based on delivery time deviation of each delivery site is constructed according to the expected delivery time windows and the maximum delivery time windows of each delivery site, comprising: the initial satisfaction function of each delivery site is constructed according to the following formula: ; In the formula, Indicates the first The initial satisfaction function for each delivery station Indicates the first The vehicle arrived at the The time for each delivery station, among which... Indicates the first The left endpoint of the expected delivery time window for each delivery station. Indicates the first The right endpoint of the expected delivery time window for each delivery station. Indicates the first The left endpoint of the maximum time window for each delivery station. Indicates the first The right endpoint of the maximum time window for each delivery station. ,and Indicates the total number of vehicles; correspondingly, the user satisfaction function is constructed according to the initial satisfaction functions and the demand goods quantity of each delivery site, comprising: the user satisfaction function is constructed according to the following formula: ; wherein represents the user satisfaction function, represents the demand amount of goods of the th delivery site, represents the total number of delivery sites.
5. The method of claim 1, wherein, solving the vehicle driving path planning target function to obtain an optimal vehicle driving path with the minimum total vehicle delivery cost and the maximum user satisfaction, comprising: an initial chromosome population is acquired, wherein any initial chromosome in the initial chromosome population is used to represent a driving path of each vehicle; a charging station insertion operation is performed on the initial chromosome population to obtain an individual population; a global optimal chromosome is obtained by performing multiple genetic operations on the individual population based on the vehicle driving path planning target function; obtaining a perturbation evolution factor at the u-th iteration and a chromosome to be perturbed, wherein an initial value of u is 1, and when u is 1, the chromosome to be perturbed at the u-th iteration is the global optimal chromosome; performing perturbation search on the chromosome to be perturbed at the u-th iteration according to the perturbation evolution factor, to obtain a perturbed chromosome at the u-th iteration; determining whether u reaches a maximum perturbation number; if not, increasing u by 1, replacing the chromosome to be perturbed at the u-th iteration with the perturbed chromosome, and re-obtaining the perturbation evolution factor at the u-th iteration and the chromosome to be perturbed, until u reaches the maximum perturbation number, to determine the optimal vehicle driving path based on the perturbed chromosome when the maximum perturbation number is reached.
6. The method of claim 5, wherein, obtaining a perturbation evolution factor at the u-th iteration, comprising: obtaining a perturbed chromosome and a perturbation evolution factor at the (u-1)-th iteration; obtaining a maximum fitness change and an average fitness change during the first iteration to the (u-1)-th iteration; calculating the perturbation evolution factor at the u-th iteration according to the perturbation evolution factor at the (u-1)-th iteration, the average fitness change and the maximum fitness change.
7. The method of claim 5, wherein, performing perturbation search on the chromosome to be perturbed at the u-th iteration according to the perturbation evolution factor, to obtain a perturbed chromosome at the u-th iteration, comprising: obtaining a specified chromosome at the g-th perturbation search, wherein an initial value of g is 1, and when g is 1, the specified chromosome at the g-th perturbation search is the chromosome to be perturbed at the u-th iteration; generating a first perturbation random number and a second perturbation random number; generating an initial perturbed chromosome based on the first perturbation random number, the second perturbation random number and the specified chromosome; calculating a difference between a fitness of the initial perturbed chromosome and a fitness of the specified chromosome; determining whether the difference is less than 0; if yes, calculating a perturbation probability according to the difference and the perturbation evolution factor at the u-th iteration; generating a third perturbation random number, and determining whether the third perturbation random number is greater than the perturbation probability; if yes, taking the initial perturbed chromosome as an initial perturbed chromosome after the g-th perturbation search; determining whether g reaches a preset threshold; if not, increasing g by 1, updating the specified chromosome at the g-th perturbation search to the initial perturbed chromosome, and re-obtaining the specified chromosome at the g-th perturbation search, until g reaches the preset threshold, to obtain the perturbed chromosome.
8. A system for planning a travel path of a vehicle, characterized by comprising: an obtaining unit, configured to obtain vehicle battery information, charging station information of a delivery area, delivery site information and vehicle information, wherein the delivery site information comprises an expected delivery time window and a maximum delivery time window allowed for each delivery site; a battery cost calculation unit, configured to construct a battery loss cost function and a charging cost function of a vehicle according to the vehicle battery information and the charging station information; a transportation cost calculation unit, configured to construct a total transportation cost function of the vehicle based on the delivery site information and the vehicle information, wherein the total transportation cost function comprises a transportation cost and a cargo damage cost of the vehicle; The satisfaction function construction unit is configured to construct a user satisfaction function based on a delivery time deviation according to the expected delivery time window and the maximum delivery time window allowed for each delivery site, wherein the smaller the delivery time deviation is, the higher the user satisfaction is; The path planning unit is configured to construct a vehicle delivery total cost function by using the battery consumption cost function, the charging cost function and the transportation total cost function, and to construct a vehicle driving path planning target function with the optimization goal of minimizing the vehicle delivery total cost and maximizing the user satisfaction based on the vehicle delivery total cost function and the user satisfaction function; The path planning unit is further configured to solve the vehicle driving path planning target function to obtain an optimal vehicle driving path that minimizes the vehicle delivery total cost and maximizes the user satisfaction.
9. An electronic device, comprising: Comprise: A memory, a processor and a transceiver connected in sequence, wherein the memory is configured to store a computer program, the transceiver is configured to transceive messages, and the processor is configured to read the computer program and execute the vehicle driving path planning method according to any one of claims 1-7.
10. A computer program product comprising instructions, characterized in that, When the instructions are run on the computer, the computer is caused to execute the vehicle driving path planning method according to any one of claims 1-7.