Method for collaborative optimization of distribution path and charging strategy of electric animal-powered delivery vehicle under time-varying road network conditions
By using the TCN-STA-LSTM model to predict road speed and an improved genetic algorithm to optimize the route and charging strategy of electric logistics vehicles, combined with daytime hybrid charging and nighttime orderly charging, the problem of insufficient coupling between route planning and power characteristics under time-varying road network conditions is solved, thereby achieving cost reduction and grid load balancing.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- KUNMING UNIV OF SCI & TECH
- Filing Date
- 2026-03-13
- Publication Date
- 2026-06-23
Smart Images

Figure CN122264241A_ABST
Abstract
Description
Technical Field
[0001] This invention relates to the field of intelligent transportation technology, specifically to a method for the collaborative optimization of delivery routes and charging strategies for electric logistics vehicles under time-varying road network conditions. Background Technology
[0002] With the goals of carbon peaking and carbon neutrality being proposed, the electrification transformation of urban delivery has accelerated significantly. Electric logistics vehicles, with their advantages of zero emissions, low energy consumption, and low operation and maintenance costs, have become an important component of urban green transportation. In the field of electric logistics vehicle route planning, existing research has made some progress: some scholars have established route planning models for hybrid fuel-electric fleets, considering vehicle range constraints; some scholars have constructed time-varying road network models in vehicle route planning, introducing the time-varying nature of traffic conditions; and others have established route planning models incorporating time-of-use pricing with the objectives of minimizing total delivery costs and maximizing discharge profits, or proposed joint optimization models for electric logistics vehicle delivery-charging / discharging routes considering time-of-use pricing. Regarding traffic speed prediction, urban traffic exhibits significant multi-scale spatiotemporal heterogeneity and random fluctuations; introducing speed prediction can significantly enhance the foresight and robustness of optimization models. Deep learning methods have received widespread attention due to their strong nonlinear expressive power. Long Short-Term Memory (LSTM) networks have advantages in mitigating gradient vanishing and modeling temporal dependencies, outperforming traditional methods. Temporal Convolutional Networks (TCNs) are widely used for traffic speed prediction due to their strong parallelization capabilities and high training efficiency. Regarding charging optimization, some researchers have modeled full-charging and partial-charging strategies in an attempt to reduce charging costs.
[0003] However, existing technologies still have shortcomings: First, the coupling between route planning and power characteristics is insufficient. Existing research has failed to fully characterize the impact of energy consumption models, power constraints, and charging behavior on route decisions, making it difficult to simultaneously achieve coordinated optimization of traffic and power. Second, the time-varying nature of road traffic is not adequately considered. Most studies use static speeds or historical averages, while urban road networks generally exhibit significant time-of-day congestion characteristics, causing travel time, power consumption, and charging demand to become disconnected from actual operation. Third, charging strategies are not sufficiently responsive to time-of-use pricing. Existing research rarely considers the refined decision-making process for charging timing, which can easily lead to concentrated charging during periods of high electricity prices, thereby increasing operating costs and degrading the power quality of the grid. Current research has not yet provided an in-depth characterization of the energy consumption model, power constraints, and charging process of electric logistics vehicles. It neglects the nonlinear changes and real-time fluctuations in vehicle speeds in real road networks. Furthermore, due to insufficient attention to charging timing, there are issues with excessively high operating and charging costs. At the same time, it has not fully considered time-of-use pricing or optimized charging timing, which can easily lead to concentrated charging during peak hours of time-of-use pricing, exacerbating the pressure on the power distribution network and resulting in poor charging economics.
[0004] In summary, current research rarely integrates time-varying road network speed prediction, electric logistics vehicle route planning, and charging strategies. Unified modeling for electric logistics vehicle speed prediction, route planning, and charging strategies is still lacking, especially a joint optimization framework for time-varying road network conditions, making it difficult to achieve overall coordinated optimization of delivery routes and charging decisions. Summary of the Invention
[0005] To address the aforementioned technical problems, this invention provides a method for the collaborative optimization of delivery routes and charging strategies for electric logistics vehicles under time-varying road network conditions.
[0006] To achieve the above technology, the specific steps include: S1. Based on historical traffic operation data, construct a time-varying road network model and establish a TCN-STA-LSTM composite deep learning model to predict urban road traffic speed; S2. Based on the dynamic driving time of S1, construct a collaborative optimization model for electric logistics vehicle delivery route planning and charging strategy with the goal of minimizing total operating cost and set constraints. S3. Based on the charging cost in S2, design a dual-time period charging optimization strategy that combines daytime hybrid energy replenishment with nighttime orderly charging. S4. Based on the charging station insertion mechanism, dynamic selection mechanism and hierarchical repair strategy, an improved genetic algorithm is constructed to solve the collaborative optimization model of electric logistics vehicle delivery route planning and charging strategy, obtain the optimization results, and complete the optimization design.
[0007] Specifically, the method for constructing the time-varying road network model is as follows: Represent the road network as a graph structure ,in For the set of road network nodes, Gather at the roadside; The day is divided into 288 time periods, each lasting 5 minutes. Define the time-varying road network model as , representing each moment Road network speed .
[0008] Specifically, the steps for establishing a TCN-STA-LSTM composite deep learning model to predict urban road traffic speed include: To eliminate the influence of different numerical ranges and improve the training efficiency and prediction accuracy of the model, the velocity sequence needs to be normalized. Let the velocity sequence be The normalization formula is: In the formula, and These are the minimum and maximum values of the velocity sequence, respectively. This is the result of normalization; Normalized velocity sequence Input the TCN-STA-LSTM model to predict future speeds: In the formula, This represents the prediction function based on the TCN-STA-LSTM model; This indicates the normalization rate of the prediction; After the prediction is completed, the normalized velocity is converted back to the original scale for use in travel time calculation: In the formula, This indicates the prediction speed after inverse normalization; Based on the method for calculating cross-time travel time using segmented road speeds, the travel time of a vehicle from the starting node to the target node under time-varying road network conditions is calculated using the following formula: In the formula, Vehicle departure time The time period to which it belongs; For the first Road traffic speed corresponding to each time period; This represents the total distance the vehicle travels on the road segment. The end time period number for the last time period in which the vehicle completes its remaining driving distance; This indicates the start time of each 5-minute time interval; This represents the modulo operator; This indicates the speed during the last time period.
[0009] Specifically, the expression for constructing the collaborative optimization model of electric logistics vehicle delivery route planning and charging strategy with the objective of minimizing total operating cost is as follows: In the formula, Total cost; For fixed costs; Operating costs; For charging costs; To incur penalties; The costs are expressed as follows: In the formula, The total number of vehicles used; Fixed costs for each delivery vehicle; Operating costs; For vehicle assembly, Index for vehicles; Represents a node To the node The distance; Indicates vehicle From node To the node Decision variables; and These represent the charging costs for delivery vehicles during operating hours and non-operating hours, respectively. For nodes To the node The edge, Gathering at the roadside.
[0010] Specifically, the constraints include: Constraint 1: The origin and destination of delivery vehicles are both the distribution center; Constraint 2: Each vehicle shall complete only one delivery. Constraint 3: Each customer can only be served by one vehicle; Constraint 4: Flow balance during the delivery process; Constraint 5: Capacity constraints during delivery vehicle operation; Constraint 6: The sum of customer demand delivered by each delivery vehicle shall not exceed the vehicle's maximum load capacity; Constraint 7: Based on the dynamic travel time output by S1, set time constraints for delivery vehicles from the distribution center to the customer's location; Constraint 8: Based on the dynamic travel time output by S1, set a time window constraint for the delivery vehicle to travel from the customer point to the customer point. Constraint 9: Based on the dynamic travel time output by S1, set time constraints for the delivery vehicle from the charging station to the customer point; Constraint 10: Delivery vehicles must be fully charged when they depart from the distribution center; Constraint 11: Delivery vehicles do not require electricity when providing service at customer locations; Constraint 12: Power consumption constraints between delivery vehicle nodes; Constraint 13: The departure time of electric logistics vehicle delivery can be determined based on the initial customer visit time window, with a 30-minute time buffer period allowed. Constraint 14: Set the departure time window to [05:00, 08:00].
[0011] Specifically, step S3 includes: S3.1, Daytime Hybrid Charging Strategy: Based on Charging Costs Set charging costs for delivery vehicles during operating hours. It includes two aspects: Firstly, a partial charging strategy is adopted, meaning that the vehicle does not need to be fully charged every time it arrives at the charging station; it can be charged within a preset range. Partial charging can not only reduce the charging time per charge but also avoid the battery degradation problem caused by frequent full charging. Secondly, a dynamic optimization charging timing is set. That is, if there is a period with a lower electricity price than when the vehicle arrived at the station within the next hour, the vehicle will wait for the lower price to charge; if there is no better electricity price, the vehicle will adopt an immediate charging strategy to reduce unnecessary waiting time. S3.2, Nighttime Ordered Charging Strategy: All vehicles are fully charged during the nighttime low electricity price period. A scheduling model is constructed with the objective of minimizing the concurrent number of charging stations to mitigate grid fluctuations. Its expression is: In the formula, The maximum number of charging stations that can be used concurrently during nighttime charging; This is a set of nighttime periods with low electricity prices. The number of vehicles that need to be charged overnight; No. Vehicles at time Should charging be performed? For vehicles The charging power; , indicating a time interval; For vehicles The electrical energy required to replenish the battery to full charge; The constraints include charging completion constraints, charging pile capacity constraints, and charging continuity constraints. S3.3 Time-of-use pricing: Six price levels are set, and the price sequence is reconstructed and calibrated. The expression is as follows: In the formula, This indicates the electricity price after reconstruction and calibration; Indicates the mean alignment coefficient; This represents the minimum electricity price after restructuring; This represents the maximum electricity price after restructuring; This represents the minimum base electricity price; This represents the maximum base electricity price.
[0012] Specifically, step S4 includes: S4.1 Chromosome encoding method using path sequence representation: Customer nodes, charging stations, and distribution centers are arranged in the form of numbered sequences; each sequence represents the complete service path of a vehicle; each path starts and ends at a distribution center; multiple vehicles are separated by virtual distribution centers; at the same time, charging node insertion positions are reserved in the encoding structure to support dynamic adjustment of charging strategies; S4.2 Construct the initial population. The construction methods include: using a saving algorithm, a greedy strategy, and a heuristic strategy. Among them, the heuristic strategy is the nearest neighbor strategy and the time window priority strategy. S4.3. Based on the constructed delivery route planning and charging strategy model, calculate the fitness value for each individual in the population. The fitness function consists of vehicle driving cost, charging cost, and penalty cost for violating constraints, and is expressed as: The penalty item adopts a weighted floating mechanism. S4.4 Perform power feasibility testing on the initial population and individuals generated during subsequent evolution, and trigger the charging station insertion mechanism if necessary; S4.5 In the selection stage of the genetic algorithm, a dynamic selection mechanism is introduced to dynamically adjust the individual selection probability according to the algorithm iteration process. In the early stage of the algorithm, the population diversity is maintained to avoid premature convergence, and in the later stage of the algorithm, the convergence is accelerated and the solution quality is improved. S4.6 During the evolution of the genetic algorithm, a crossover operation is performed on the selected parent individuals to generate new offspring individuals by exchanging some node sequences in the delivery path; at the same time, a mutation operation is performed on some individuals to adjust the access order of nodes in the path or the position of charging nodes, so as to enhance the algorithm's ability to search complex solution spaces. S4.7. For individuals that may not meet the constraints after crossover and mutation operations, a stratified repair strategy shall be adopted for handling. S4.8 Repeat the selection, crossover, mutation and repair steps until the preset maximum number of iterations or the preset convergence condition of population fitness is reached; S4.9 After the algorithm terminates, select the individual with the best fitness from the final population as the solution for the collaborative optimization of the electric logistics vehicle delivery route and charging strategy.
[0013] Specifically, the penalty term is represented using a weighted floating-point mechanism as follows: In the formula, This indicates that the logistics delivery vehicle carrying out the delivery task has arrived at the logistics delivery point. The cost of punishment; Indicates the safe power threshold; For vehicles Reaching the customer node The remaining battery power at that time; Indicates vehicle Reaching the customer node The moment; Represents client node Latest service hours; Represents client node The earliest service time; 750 and 500 represent the power penalty coefficient and time penalty coefficient, respectively.
[0014] Specifically, the triggering condition for the charging station insertion mechanism is expressed as follows: In the formula, Represents a node The trigger condition value; Represents a node The battery status; Indicates the total number of subsequent road segments. Indicates the index of subsequent road segments; Indicates from node The distance to each subsequent segment; Energy consumption rate; The safe power threshold; The charging selection rating function is expressed as follows: In the formula, For plugging into the charging station The rating; For nodes To plug into the charging station The distance; For plugging into the charging station Distance to subsequent road sections; For a moment Electricity prices below; The maximum value of the time-of-use electricity price; To avoid penalties for continuous charging stations.
[0015] Specifically, the repair sequence of the layered repair strategy includes: The first layer is structural repair, which involves checking all customer points that have been visited and eliminating duplicate access points. The second layer is constraint repair. By checking whether the overall customer demand on the road segment exceeds the vehicle's maximum capacity, paths that violate vehicle load constraints and customer service time window constraints are repaired first. The system also checks whether the vehicle's battery will run out during the path execution process, which would prevent the vehicle from completing subsequent tasks. The triggering conditions are as described above. When an individual cannot restore its battery through the charging station insertion mechanism, the individual is eliminated. The third layer of repair includes: 1. The charging station has been inserted, but the charging timing and charging amount are not optimal. Call the S3 strategy to optimize the charging strategy. 2. Perform redundant charging cleanup within the path to avoid increasing running time due to unnecessary charging; 3. To avoid penalties for early arrivals or late arrivals due to fixed departure times, the S2 strategy is used to optimize departure times.
[0016] Beneficial effects of the present invention (1) The TCN-STA-LSTM composite speed prediction model proposed in this invention integrates the long-range dependency capture capability of TCN, the dynamic feature selection capability of spatiotemporal attention mechanism, and the sequence modeling advantage of LSTM, achieving high-precision prediction of short-term traffic speed on urban roads. Experimental results show that the proposed model significantly outperforms traditional prediction methods in multiple accuracy indicators, effectively improving the accuracy of time-varying traffic condition representation and providing a reliable data foundation for subsequent electric logistics vehicle route planning and charging strategy optimization.
[0017] (2) The dual-period charging optimization scheme proposed in this invention, which combines daytime hybrid charging and nighttime orderly charging strategies, effectively reduces charging costs by dynamically evaluating the matching relationship between charging timing and time-of-use electricity prices. Comparative experiments show that this strategy achieves a significant reduction in total operating costs compared to traditional charging schemes. Simultaneously, by shifting more charging tasks to nighttime low-price periods, this strategy achieves a spatiotemporal redistribution of grid load with the goal of minimizing the number of concurrent charging piles, generating a good peak-shaving and valley-filling effect, which is beneficial for voltage stability and grid-friendly operation.
[0018] (3) The improved genetic algorithm designed in this invention significantly improves the solution quality and convergence performance of complex constrained optimization problems by integrating a demand-based charging station insertion mechanism, a dynamic selection mechanism, and a hierarchical repair strategy. While ensuring the feasibility of the solution, the algorithm effectively balances global search capability and local optimization accuracy, avoids local optima problems, and provides an efficient solution tool for large-scale electric logistics vehicle scheduling problems. Attached Figure Description
[0019] Figure 1 This is a flowchart of the steps of the present invention; Figure 2 This is a general framework diagram of the present invention; Figure 3 This is a flowchart of the charging strategy of the present invention; Figure 4 A comparison between traditional and improved genetic algorithms; Figure 5 This is a comparative experiment of the prediction model of the present invention; Figure 6This is a schematic diagram of the RC208 delivery route in an embodiment of the present invention; Figure 7 This is a comparison diagram of the algorithm of this invention with other algorithms; Figure 8 This is a graph showing the changes in SOC and mileage of RC208 along path 16 in this embodiment of the invention. Figure 9 This is a graph showing the changes in SOC and mileage of RC208 along path 14 in an embodiment of the present invention; Figure 10 This is a comparison chart of ordered / unordered charging at night using the RC208 dataset in an embodiment of the present invention; Figure 11 This is a schematic diagram of the R103 path in an embodiment of the present invention; Figure 12 This is a graph showing the changes in SOC and mileage of Route 9 (R103) in this embodiment of the invention. Figure 13 This is a graph showing the changes in SOC and mileage of route 13 (R103) in this embodiment of the invention. Figure 14 This is a comparison chart of ordered / unordered charging at night using the R103 dataset in an embodiment of the present invention. Detailed Implementation
[0020] The present invention will be further described in detail below with reference to specific embodiments.
[0021] like Figure 1 and Figure 2 The diagram shows the overall framework of a collaborative optimization method for delivery routes and charging strategies of electric logistics vehicles under time-varying road network conditions, including the following steps: S1. Based on historical traffic data, construct a time-varying road network model and establish a TCN-STA-LSTM composite deep learning model to predict urban road traffic speed, achieving dynamic estimation of travel time between any nodes at any time. The steps include: S1.1 Data Acquisition and Preprocessing; Use network technology to obtain real-time road traffic speed data in logistics and distribution areas from public internet platforms; The acquired data is cleaned, including: filling missing values using methods such as interpolation and mean filling; and correcting, truncating, or separately labeling outliers based on their causes. To create a well-structured and reliable dataset, ensuring its quality and usability, and laying the foundation for subsequent modeling and analysis; S1.2 Construct a time-varying road network model; First, the road network is represented as a graph structure. ,in For a set of road network nodes (such as customer nodes) Charging nodes and distribution centers and replication points wait), To gather by the roadside, ,in, and Represents road network nodes; Then, considering the changes in traffic conditions over time, the road segment speed is modeled as a time-dependent function. The day is divided into 288 time periods, with time intervals of... ; Finally, the time-varying road network can be represented as: That is, every moment The road network speed information is different. ,in Represents a time set; S1.3, Construction of TCN-STA-LSTM composite prediction network; A TCN-STA-LSTM composite prediction model is proposed, which combines the advantages of TCN and LSTM, and introduces a spatial-temporal attention (STA) mechanism to improve prediction accuracy and robustness. Specifically, TCN can effectively capture local time series features and handle long-range dependencies, while LSTM is good at capturing dynamic changes and nonlinear patterns in time series, and the STA mechanism can adaptively focus on key time points and spatial features in the sequence, thereby enhancing the model's ability to capture important information. This composite model is robust when faced with noisy or irregular data and can significantly improve the accuracy of road speed prediction. S1.4 Calculate travel time based on TCN-STA-LSTM network; To eliminate the influence of different numerical ranges and improve the training efficiency and prediction accuracy of the model, the velocity sequence needs to be normalized. Let the velocity sequence be The normalization formula is: In the formula, and These are the minimum and maximum values of the velocity sequence, respectively. This is the result of normalization; Normalized velocity sequence Input the TCN-STA-LSTM model to predict future speeds: In the formula, This represents the prediction function based on the TCN-STA-LSTM model; This indicates the normalization rate of the prediction; After the prediction is completed, the normalized velocity is converted back to the original scale for use in travel time calculation: In the formula, This indicates the prediction speed after inverse normalization; S1.5. A method for calculating cross-time travel time based on segmented road speeds: The travel time of a vehicle from the starting node to the target node under time-varying road network conditions is calculated using the following formula: In the formula, Vehicle departure time The time period to which it belongs; For the first Road traffic speed corresponding to each time period; This represents the total distance the vehicle travels on the road segment. The end time period number for the last time period in which the vehicle completes its remaining driving distance; This indicates the start time of each 5-minute time interval; This represents the modulo operator; Indicates the speed of the last time period; The specific derivation process is as follows: Because road speed varies with time segments, vehicles from Node heading to The actual travel time of a node depends on its speed when entering each time period; therefore, an iterative cross-time period travel time calculation method based on segmented speed is adopted, where the vehicle's current time... Speed period Represented as: In the formula, For the floor function, For a moment Time period index; At any moment Entering the The remaining available travel time for each period is The maximum distance that can be traveled during this period for: In the formula, express Speed over time; If the remaining distance satisfy: If the vehicle cannot complete its journey in the current time period, it will need to proceed to the next time period to continue the calculation; otherwise, it can complete the journey within the current time period. If the remaining distance During the period If completed within [time period], then the precise travel time is [time]. for: Vehicles from node To the node The total travel time across time periods can be expressed as: In the formula, Indicates the first The remaining distance at the start of each time period; Indicates the vehicle is in The actual travel time spent within each time period; Indicates the first The speed over a time period; for When, satisfy Use the full time period; for When, satisfy Use the remaining time slot; The cumulative result is then expressed as: Is it entering the first Remaining distance during the time period; After substituting the values, its final expression can be obtained.
[0022] S2. Construct a collaborative optimization model for electric logistics vehicle delivery route planning and charging strategy with the objective of minimizing total operating cost, and set constraints, including: S2.1 The goal of the charging strategy and route planning collaborative optimization model is to minimize the total cost of the electric logistics vehicle, which includes fixed costs, operating costs, charging costs, and penalty costs, and is expressed as follows: In the formula, Total cost; For fixed costs; Operating costs; For charging costs; To incur penalties; The total number of vehicles used; The fixed costs for each delivery vehicle include employee wages and benefits, vehicle depreciation, and maintenance costs. Operating costs; For vehicle assembly, Index for vehicles; Represents a node To the node The distance; Indicates vehicle From node To the node Decision variables; and These represent the charging costs for delivery vehicles during operating hours (daytime charging costs) and non-operating hours (nighttime charging costs), respectively. This indicates that the logistics delivery vehicle carrying out the delivery task has arrived at the logistics delivery point. The cost of punishment; Indicates the safe power threshold; For vehicles Reaching the customer node The remaining battery power at that time; Indicates vehicle Reaching the customer node The moment; Represents client node Latest service hours; Represents client node The earliest service time; 750 and 500 represent the power penalty coefficient and time penalty coefficient, respectively; S2.2 Setting constraints includes: Delivery vehicles originate from and terminate at the distribution center: In the formula, Indicates vehicle From the distribution center To customer node ; Indicates vehicle Return from the node to the distribution center; Each vehicle completes only one delivery: In the formula, Indicates vehicle from arrive The situation; Represents the starting set; Each customer can only be served by one vehicle: In the formula, Indicates that the customer is from the vehicle Serve; Flow balance constraints during the delivery process: In the formula, Indicates vehicle from arrive The situation; Capacity constraints during delivery vehicle operations: In the formula, Indicates vehicle arrive Load capacity at that time; Represents a node The demand; Indicates vehicle arrive Load capacity at that time; Indicates vehicle arrive Load capacity at that time; Represents positive numbers for linear constraints; The sum of customer demand delivered by each delivery vehicle shall not exceed the vehicle's maximum load capacity. ; In the formula, Indicates the vehicle's maximum load capacity; Time constraints for delivery vehicles from the distribution center to the customer's location: In the formula, Indicates vehicle Reaching the customer node The moment; Indicates from arrive Travel time; Indicates vehicle Service customer nodes The moment; Time window constraint for delivery vehicles to arrive at customer nodes (charging stations or distribution centers) from the customer node: In the formula, Indicates vehicle Service customer nodes The moment; Indicates at node Charging time; Indicates the unloading operation time; Time constraints for delivery vehicles from charging stations to customer nodes (or distribution centers): In the formula, Indicates the time when the vehicle begins charging; Indicates charging time; Delivery vehicles depart from the distribution center with a full charge. In the formula, Indicates that the vehicle has left the node. Battery life at that time; Indicates the total battery capacity; Delivery vehicles do not require electricity when serving customer nodes: In the formula, Indicates the arrival time of the delivery vehicle. Battery life at that time; Power consumption constraints between delivery vehicle nodes: In the formula, express arrive The distance; Indicates energy consumption rate per unit distance; Indicates the arrival time of the delivery vehicle. Battery life at that time; The departure time for electric logistics vehicle deliveries can be determined based on the initial customer visit time window, with a 30-minute buffer period included. In the formula, Indicates the time the vehicle departs from the distribution center; Indicates the earliest service time of the first customer node; This indicates the distance from the distribution center to the first customer node; Departure time window set to [05:00, 08:00]: .
[0023] S3. Design a dual-period charging optimization model that combines daytime hybrid charging strategy and nighttime orderly charging strategy. Combine the time-of-use pricing mechanism to dynamically match charging timing and price structure. During the day, the optimal charging time is dynamically selected based on the predicted speed, task urgency and time-of-use pricing. At night, all vehicles are uniformly replenished to full charge to achieve charging cost optimization. The overall charging process is as follows: Figure 3 As shown, the steps include: S3.1 The charging strategy adopted, based on the delivery route, will reduce charging costs. Secondary modeling: Delivery vehicle operating hours (daytime charging cost) This includes two aspects. First, a partial charging strategy is adopted, meaning that the vehicle does not need to be fully charged every time it arrives at a charging station. Partial charging not only reduces the charging time per charge but also avoids the battery degradation problem caused by frequent full charging. Second, the charging timing is dynamically optimized. If a lower electricity price is available within the next hour after arriving at the station, a price-optimized charging strategy is adopted. If no better electricity price is available, an immediate charging strategy is adopted to reduce unnecessary waiting time. Specifically, the objective function for the daytime charging strategy is: ; For price-optimized charging strategies, the waiting time at charging stations is: ,in, The earliest departure time, the latest departure time This can be determined by the latest time window of the next customer, with a 10-minute buffer reserved. The calculation formula is as follows: In the formula, Represents client node Latest service hours; The estimated charging demand for the delivery vehicle upon arrival at the charging station is [to be filled in]. ; The charging capacity is between the maximum rechargeable capacity and the minimum required charging capacity, and the calculation formula is as follows: In the formula, Indicates the maximum rechargeable capacity; This indicates the remaining battery power of the vehicle when it arrives at the charging station. Indicates the minimum chargeable capacity; This represents the set of the next three nodes in the path. Indicates the index of subsequent nodes; This indicates the distance from the charging station to subsequent nodes; The amount of charge in each time period is recorded as follows: The calculation formula is: In the formula, Indicates charging power; Indicates charging efficiency; The estimated charging demand when the delivery vehicle arrives at the charging station. ; Optimized charging costs Represented as: In the formula, Indicates the end of charging; Indicates the start time of charging; Indicates the electricity price for a given time period; Find the number of charging periods. The charging period with the lowest charging cost : In the formula, The time period during which an electric vehicle begins charging at a charging station; The total charging energy and charging cost for electric logistics vehicles employing a price-optimized charging strategy are as follows: In the formula, This indicates the total electricity consumption for the price optimization strategy; This indicates the total electricity consumption for the price optimization strategy; For the immediate charging strategy, due to the time discretization processing used in the model, the vehicle arrival time is random and may not align with the start point of the interval, thus involving incomplete time intervals. Therefore, the following will be considered: Adjusted to ; For scenarios employing an immediate charging strategy, the total charging time for electric logistics vehicles at charging stations... It can be represented as: The charging cost per vehicle is: In the formula, Indicates the cost of immediate charging; The total charging energy and charging cost for electric logistics vehicles using the immediate charging strategy are as follows: In the formula, This indicates the total charging amount under the immediate charging strategy; This indicates the total cost of immediate charging; In summary, the total amount of electricity and charging cost for all delivery vehicles at charging stations during working hours are as follows: In the formula, This indicates the total amount of electricity charged during the day; This indicates the total cost of charging during the day; S3.2 After electric logistics vehicles complete their daily delivery tasks, all vehicles need to be recharged to full capacity during the nighttime low-electricity-price period to meet the delivery needs of the next day. The total nighttime charging cost is calculated based on the charging needs of vehicles returning after daytime tasks. A scheduling model is then constructed to minimize the concurrent number of charging stations, in order to mitigate grid fluctuations. Its expression is as follows: In the formula, The maximum number of charging stations that can be used concurrently during nighttime charging; This is a set of nighttime periods with low electricity prices. No. Vehicles at time Should charging be performed? For vehicles The charging power; For vehicles The electrical energy required to replenish the battery to full charge; The number of vehicles that need to be charged overnight; The constraints include charging completion constraints, charging pile capacity constraints, and charging continuity constraints. The derivation process specifically includes: First, the objective function is to minimize the number of vehicles charging. In the formula, This indicates the number of vehicles charging at night; In the formula, Indicates vehicle Is it starting to charge? , indicating vehicles Selectable number of charging periods to start. Indicates the index of the number of charging periods that have started; This indicates the total number of charging periods during the night; This represents the total number of charging stations, with a value of 4. After the delivery task is completed, calculate the remaining battery power of each vehicle upon arrival at the distribution center. Its charging capacity and charging cost are: In the formula, This indicates the total amount charged overnight; Indicates vehicle Remaining battery power upon return to the distribution center; This indicates the total cost of charging overnight; The amount of electricity charged by each vehicle per time period can be expressed as: In the formula, This indicates the amount of electricity that can be charged in each 5-minute interval; For the The number of charging periods required for a vehicle can be expressed as: In the formula, Indicates vehicle How many 5-minute intervals are needed to complete charging? That is, the number of vehicles charging at night corresponds to the maximum number of charging piles used concurrently during the nighttime charging process, which can be derived as follows: ; S3.3 Time-of-use pricing: Combining the idea of multi-period dynamic pricing modeling, the pricing sequence is reconstructed and calibrated to enhance its ability to characterize load differences in different periods. The final time-of-use pricing scheme is shown in Table 1. The expression for reconstructing and calibrating the electricity price series is as follows: In the formula, This indicates the electricity price after reconstruction and calibration; Indicates the mean alignment coefficient; This represents the minimum electricity price after restructuring; This represents the maximum electricity price after restructuring; This represents the minimum base electricity price; This represents the maximum base electricity price; Table 1: Time-of-use electricity pricing S4. An improved genetic algorithm is designed as the solution method. A demand-driven charging station insertion mechanism, a dynamic selection mechanism, and a hierarchical repair strategy are introduced to solve the collaborative optimization model of electric logistics vehicle delivery route planning and charging strategy. The route planning and charging coordination optimization model for electric logistics vehicles under changing road network conditions is a large-scale mixed integer programming problem. This problem involves discrete path decisions and continuous time and power consumption decisions, and is superimposed with multiple complex constraints such as time-varying traffic states, time-of-use electricity prices, vehicle capacity, and time windows. It is a typical high-dimensional, strongly nonlinear, and NP-hard combined optimization problem. Therefore, a solution method based on an improved genetic algorithm (IGA) is constructed, with the optimization objective of minimizing the total running cost, such as... Figure 4 The image shows a comparison between traditional and improved genetic algorithms.
[0024] The specific steps include: S4.1 Chromosome encoding method using path sequence representation: Customer nodes, charging stations, and distribution centers are arranged in the form of numbered sequences; each sequence represents the complete service path of a vehicle; each path starts and ends at a distribution center; multiple vehicles are separated by virtual distribution centers; at the same time, charging node insertion positions are reserved in the encoding structure to support dynamic adjustment of charging strategies; S4.2. Combine multiple strategies to generate the initial population and improve the structural diversity and problem adaptability of the population: Under the premise of satisfying vehicle load constraints and customer demand constraints, randomly generate several delivery route individuals to construct the initial population. The construction methods include: using the saving algorithm, the greedy strategy and the heuristic strategy, among which the heuristic strategy is the nearest neighbor strategy and the time window priority strategy. Specifically, the saving algorithm merges paths based on distance savings to generate a high-quality initial solution; it uses a greedy strategy to select the nearest or most urgent customer each time to quickly build a feasible path; it uses a nearest neighbor strategy to prioritize visiting the customer closest to the current node to ensure path compactness; and it uses a time window priority strategy to prioritize visiting customers with urgent time windows to reduce time window penalties. S4.3 Based on the constructed delivery route planning and charging strategy model, the fitness value of each individual in the population is calculated. The fitness function consists of vehicle driving cost, charging cost and penalty cost for violating constraints. The penalty term adopts a sub-item floating weighted mechanism, that is, the penalty weight is dynamically adjusted according to the degree of constraint violation. S4.4 Perform power feasibility testing on the initial population and individuals generated during subsequent evolution, and trigger the charging station insertion mechanism if necessary; The triggering condition is as follows: Based on the remaining battery power of the electric logistics vehicle at each node and the energy consumption demand of the subsequent route, it is determined whether the vehicle has insufficient battery power. When the remaining battery power of the vehicle cannot support the subsequent delivery task, the charging station insertion mechanism is triggered, selecting a suitable charging station node between the current node and the subsequent customer node to insert into the delivery route. The selection of the inserted charging station node comprehensively considers accessibility, time-of-use electricity price level, and impact on the subsequent route. The charging station selection triggering condition and evaluation function are as follows: In the formula, Represents a node The trigger condition value; Represents a node The battery status; Indicates the total number of subsequent road segments. Indicates the index of subsequent road segments; Indicates from node The distance to each subsequent segment; Energy consumption rate; The safe power threshold; For plugging into the charging station The rating; For nodes To plug into the charging station The distance; For plugging into the charging station Distance to subsequent road sections; For a moment Electricity prices below; The maximum value of the time-of-use electricity price; To avoid penalties at continuous charging stations; , , The weighting coefficients for each item are 0.3, 4, and 2, respectively. S4.5 In the selection stage of the genetic algorithm, a dynamic selection mechanism is introduced to dynamically adjust the individual selection probability according to the algorithm iteration process, so as to maintain population diversity in the early stage of the algorithm and enhance the selection intensity of high fitness individuals in the later stage of the algorithm. Common dynamic selection mechanisms include: tournament selection and elite retention strategies; S4.6 During the evolution of the genetic algorithm, a crossover operation is performed on the selected parent individuals to generate new offspring individuals by exchanging some node sequences in the delivery path; at the same time, a mutation operation is performed on some individuals to adjust the access order of nodes in the path or the position of charging nodes, so as to enhance the algorithm's ability to search complex solution spaces. S4.7. For individuals that may not meet the constraints after crossover and mutation operations, a stratified repair strategy shall be adopted for handling. The hierarchical repair strategy includes the following repair order: The first layer is structural repair, which involves checking all customer points being visited and eliminating duplicate visits; the second layer is constraint repair, which involves checking whether the overall customer demand on the road segment exceeds the vehicle's maximum capacity, prioritizing the repair of paths that violate vehicle load constraints and customer service time window constraints; checking whether the vehicle's battery will run out during the path execution process, preventing the completion of subsequent tasks, with triggering conditions as described above. When an individual cannot restore its battery through the charging station insertion mechanism, it is eliminated; the third layer of repair includes: 1. Charging station has been inserted, but the charging timing and amount may not be optimal, so the charging strategy is optimized by calling the strategy in S3; 2. Redundant charging within the path is cleaned up to avoid unnecessary increases in running time due to charging; 3. To avoid penalties for early arrivals or late arrivals due to fixed departure times, departure time optimization is performed by calling the electric logistics vehicle delivery departure time in S2, which can be determined based on the initial customer point access time window and a 30-minute time buffer is reserved, with the departure time window set to [05:00, 08:00] for optimization. S4.8 Repeat the selection, crossover, mutation and repair steps until the preset maximum number of iterations or the population fitness convergence condition is reached; S4.9 After the algorithm terminates, select the individual with the best fitness from the final population as the solution for the collaborative optimization of the electric logistics vehicle delivery route and charging strategy.
[0025] To verify the present invention, a delivery area in a city, including a distribution center, multiple customer nodes, and several charging station nodes, was selected as a case study scenario. The road network structure and node spatial distribution of the delivery area were used to construct the case study road network model. Multiple electric logistics vehicles were set to perform delivery tasks simultaneously. The vehicles had uniform battery capacity, unit driving energy consumption, and maximum load parameters.
[0026] According to the present invention, a day is divided into multiple consecutive time periods to describe the changes in road traffic speed and time-of-use electricity prices; the nighttime period is set as a low-electricity-price interval for centralized charging scheduling of electric logistics vehicles after they have completed their delivery tasks.
[0027] Road network data and speed prediction parameter settings The logistics and delivery work hours are set to 16 hours (05:00-21:00), dividing the day into 288 time periods. Data collection is set to be performed every 5 minutes, resulting in 192 data points collected daily. Speeds before 05:00 and after 21:00 are represented by the speeds at 05:00 and 21:00 respectively, resulting in a total of 288 speed values. Road data for each time period is collected over 59 days. Data from days 1-57 is used as the training set, and day 58 as the validation set. The predicted values for day 59 are compared with the actual values.
[0028] Node data parameter settings The experimental data uses the RC208 portion of the Solomon dataset, a publicly available test dataset for the classic vehicle routing problem with time windows. The baseline dataset was adaptively modified, and charging station locations with a topologically balanced distribution were generated based on the K-means clustering algorithm. The resulting enhanced RC208-EV dataset contains 116 nodes: 1 distribution center, 100 customer nodes, and 15 charging station nodes. Node number 0 represents the distribution center, nodes 1-100 represent customer nodes, and nodes 101-115 represent charging station nodes. Some node coordinates and time window information are shown in Table 2.
[0029] Table 2: Node Data Electric logistics vehicle parameter settings The electric logistics vehicle with model number BAW5031XXY6Z55BEV was selected. The vehicle, battery and charging facility parameters are shown in Table 3.
[0030] Table 3: Parameters of Electric Logistics Vehicles The improved genetic algorithm parameters are shown in Table 4.
[0031] Table 4: Parameters of the Improved Genetic Algorithm Speed prediction model validation; To evaluate the superior performance of the TCN-STA-LSTM model in velocity prediction, GRU and BiLSTM models were selected as benchmarks for comparative experiments. The comparison results of the evaluation metrics of the prediction models are shown in Table 5, and the comparison results of the TCN-STA-LSTM velocity prediction model with other algorithms are shown in Table 5. Figure 5 As shown.
[0032] Table 5: Evaluation Indicators of Model Prediction Error As shown in Table 7, the mean square error (MSE) of the TCN-STA-LSTM model proposed in this invention is 0.038, and the R² coefficient is significantly improved by 0.027 and 0.024 compared with the GRU and BiLSTM models, respectively, indicating that the model has a significant advantage in prediction accuracy compared with other models.
[0033] Analysis of charging strategy solution: To verify the effectiveness of the proposed charging strategy, multiple sets of comparative experiments were designed, including three schemes: using only the price-optimized charging strategy, using only the immediate charging strategy, and the full charging strategy. The comparison results are shown in Table 6.
[0034] Table 6: Comparative Analysis of Various Charging Strategies The following conclusions can be drawn from Table 6: 1) The daytime hybrid charging strategy proposed in this invention is superior to the other three schemes in terms of overall cost, with total costs reduced by 1.44%, 2.59%, and 4.04% compared to the price-optimized charging strategy, the immediate charging strategy, and the full charging strategy, respectively; 2) Regarding the timing of charging, the price-optimized charging strategy, compared to the immediate charging strategy, can reduce daytime charging costs by 17.57%; 3) Compared with the full charging strategy, the daytime charging cost of the method of the present invention can be reduced by 65.13%, indicating that partial charging is superior to full charging in terms of time efficiency, saving more available delivery time for vehicles while meeting their power demand, and avoiding increased penalty costs due to time window constraints.
[0035] Dynamic departure time comparison analysis: To verify the rationality of the dynamic departure time strategy, a fixed departure time was set as the comparison scheme. 05:00, 06:00, 07:00 and 08:00 were selected as the fixed departure time points respectively. The comparison results are shown in Table 7.
[0036] Table 7 Comparison Analysis of Fixed Departure Times The following conclusions can be drawn from Table 7: 1) Compared to fixed departure times of 05:00, 06:00, 07:00, and 08:00, the dynamic departure time strategy adopted in this invention reduces the total cost by 3.12%, 4.85%, 5.28%, and 5.78%, respectively; 2) In the case of a fixed departure time of 05:00, the high rigidity of the departure time limits the flexibility of vehicle scheduling, resulting in a significant increase in driving costs and a long waiting time at the first customer node. 3) The 06:00 departure plan incurred a penalty cost of 89.28 yuan because it did not increase the number of delivery vehicles; the 07:00 departure plan increased the number of vehicles required due to the later departure time, resulting in a fixed cost increase of 5339 yuan; the 08:00 departure plan not only increased the number of delivery vehicles but also incurred a penalty cost of 24.58 yuan. 4) The dynamic departure mechanism can effectively alleviate the problem of vehicles waiting too long at customer points due to time window restrictions, and improve the efficiency and flexibility of the overall delivery process.
[0037] Algorithm performance comparison and analysis: To verify the performance advantages of the improved genetic algorithm constructed in this invention, particle swarm optimization (PSO) and traditional genetic algorithm (GA) were selected as comparison algorithms. Figure 6 Analysis shows that: 1) All three algorithms converged rapidly within the first 100 generations, after which the convergence speed slowed down and tended to stabilize; 2) The improved genetic algorithm proposed in this invention outperforms PSO and GA in both convergence speed and solution quality; 3) By introducing a charging station insertion mechanism, a dynamic selection mechanism, and a hierarchical repair strategy, the problem of local optima is effectively avoided.
[0038] Optimization Result Analysis: Delivery route optimization results; Optimization results show that a total of 18 electric logistics vehicles are needed to complete the delivery task, involving 9 charging operations, with a minimum total operating cost of 7939.64 yuan. The vehicle delivery routes are shown in Table 8. A route planning diagram is shown below. Figure 7 As shown.
[0039] Table 8: Delivery Routes for Each Vehicle Analysis of SOC changes and charging timing; Based on the proposed daytime hybrid charging strategy, two typical operating paths are selected for analysis. Figure 8 and Figure 9 The changes in the State of Charge (SOC) of electric logistics vehicles under paths 16 and 14 are shown respectively to intuitively demonstrate the effectiveness of the proposed strategy.
[0040] Figure 8 The diagram illustrates the SOC (State of Charge) changes of the electric logistics vehicle along route 16. Before customers 51 and 99, the vehicle waited due to time window constraints, for 75.9 minutes and 68.7 minutes respectively (as shown in numbers 1 and 2). At location 3, the vehicle arrived at charging station 110 at 678.2 minutes. However, after traversing the electricity price curve within one hour of arrival, a lower price period was found. Therefore, the vehicle chose to wait 7.2 minutes before starting charging, replenishing 7.19 kWh, and then continued its journey to complete subsequent delivery tasks.
[0041] Figure 9 To optimize the operation of the departure time route, the departure time is set at 569.1 minutes. Since the travel time is estimated using average speed, the vehicle needs to wait 24.7 minutes after arriving at customer 77 to begin service (as shown in sequence 1). Subsequently, when recharging at charging station 114, no low electricity price period was found during the next hour. Therefore, according to the daytime hybrid charging strategy, the required electricity was immediately replenished before continuing to complete the subsequent delivery tasks.
[0042] Results of nighttime orderly charging optimization: Based on the proposed nighttime optimized charging model, vehicles can be fully charged within the time window of 00:00–04:00 after completing daytime operations. Figure 10 Comparison of orderly and disorderly charging at night.
[0043] Depend on Figure 10 It is evident that orderly charging, by implementing peak-shaving and layered parallel operation in the time dimension, significantly reduces peak concurrent power and smooths power jumps. The number of parallel charging stations remains around 3 during most periods, decreasing to 1-2 during some periods. In contrast, the disordered approach reaches its initial limit of 4 concurrent stations before rapidly dropping to 0. With the total supplementary energy remaining constant, adjusting only the time allocation and concurrent structure yields two benefits: firstly, peak power decreases from approximately 240kW to approximately 180kW; secondly, off-peak power no longer drops to zero but stabilizes in the 60-120kW range, reducing the peak-to-valley difference and significantly decreasing load fluctuations, which is beneficial for voltage stability. Overall, orderly charging, while ensuring the completion and continuity of charging tasks, creates a load curve that is more grid-friendly.
[0044] Analysis of optimization results for different datasets: To further verify the generality and applicability of the proposed program, an R103 instance from the Solomon benchmark dataset was selected and modified and solved based on the proposed method. The resulting optimized delivery route is as follows: Figure 11 As shown. Other experimental results are as follows. Figure 12-14 As shown.
[0045] In summary, the proposed collaborative optimization method for electric logistics vehicle delivery routes and charging strategies under time-varying road network conditions demonstrates the effectiveness of this invention. 1) The TCN-STA-LSTM speed prediction model has an R² coefficient of 0.999 and an MSE of only 0.038, which is significantly better than traditional prediction methods and effectively improves the accuracy of time-varying traffic condition characterization. 2) The daytime hybrid charging strategy achieved a maximum reduction of 4.04% in total operating costs compared to traditional charging solutions, validating the economic advantages of this strategy; 3) The dynamic departure time strategy can reduce the total cost by up to 5.78% compared to the fixed departure time strategy; 4) The improved genetic algorithm significantly improves the solution quality and convergence performance of complex constrained optimization problems by integrating the charging station insertion mechanism, dynamic selection mechanism and hierarchical repair strategy; 5) The nighttime orderly charging strategy realizes the temporal and spatial redistribution of grid load, resulting in a good peak shaving and valley filling effect.
[0046] The specific embodiments of the present invention have been described in detail above with reference to examples. However, the present invention is not limited to the above embodiments. Within the scope of knowledge possessed by those skilled in the art, various changes can be made without departing from the spirit of the present invention.
Claims
1. A method for collaborative optimization of delivery routes and charging strategies for electric logistics vehicles under time-varying road network conditions, characterized in that, Includes the following steps: S1. Based on historical traffic operation data, construct a time-varying road network model and establish a TCN-STA-LSTM composite deep learning model to predict urban road traffic speed; S2. Based on the dynamic driving time of S1, construct a collaborative optimization model for electric logistics vehicle delivery route planning and charging strategy with the goal of minimizing total operating cost and set constraints. The electric logistics vehicle delivery route planning and charging strategy collaborative optimization model with the goal of minimizing total operating costs consists of fixed costs, operating costs, charging costs, and penalty costs. S3. Based on the charging cost in S2, design a dual-time period charging optimization strategy that combines daytime hybrid energy replenishment with nighttime orderly charging. S4. Based on the charging station insertion mechanism, dynamic selection mechanism and hierarchical repair strategy, an improved genetic algorithm is constructed to solve the collaborative optimization model of electric logistics vehicle delivery route planning and charging strategy, obtain the optimization results, and complete the optimization design.
2. The method for collaborative optimization of delivery routes and charging strategies for electric logistics vehicles under time-varying road network conditions as described in claim 1, characterized in that: The method for constructing the time-varying road network model is as follows: Represent the road network as a graph structure ,in For the set of road network nodes, Gather at the roadside; The day is divided into 288 time periods, each lasting 5 minutes. Define the time-varying road network model as , representing each moment Road network speed .
3. The method for collaborative optimization of delivery routes and charging strategies for electric logistics vehicles under time-varying road network conditions as described in claim 1, characterized in that: The steps for establishing a TCN-STA-LSTM composite deep learning model to predict urban road traffic speed include: To eliminate the influence of different numerical ranges and improve the training efficiency and prediction accuracy of the model, the velocity sequence needs to be normalized. Let the velocity sequence be The normalization formula is: In the formula, and These are the minimum and maximum values of the velocity sequence, respectively. This is the result of normalization; Normalized velocity sequence Input the TCN-STA-LSTM model to predict future speeds: In the formula, This represents the prediction function based on the TCN-STA-LSTM model; This indicates the normalization rate of the prediction; After the prediction is completed, the normalized velocity is converted back to the original scale for use in travel time calculation: In the formula, This indicates the prediction speed after inverse normalization; Based on the method for calculating cross-time travel time using segmented road speeds, the travel time of a vehicle from the starting node to the target node under time-varying road network conditions is calculated using the following formula: In the formula, Vehicle departure time The time period to which it belongs; For the first Road traffic speed corresponding to each time period; This represents the total distance the vehicle travels on the road segment. The end time period number for the last time period in which the vehicle completes its remaining driving distance; This indicates the start time of each 5-minute time interval; This represents the modulo operator; This indicates the speed during the last time period.
4. The method for collaborative optimization of delivery routes and charging strategies for electric logistics vehicles under time-varying road network conditions as described in claim 1, characterized in that: The expression for the collaborative optimization model of electric logistics vehicle delivery route planning and charging strategy with the objective of minimizing total operating cost is as follows: In the formula, Total cost; For fixed costs; Operating costs; For charging costs; To incur penalties; The costs are expressed as follows: In the formula, The total number of vehicles used; Fixed costs for each delivery vehicle; Operating costs; For vehicle assembly, Index for vehicles; Represents a node To the node The distance; Indicates vehicle From node To the node Decision variables; and These represent the charging costs for delivery vehicles during operating hours and non-operating hours, respectively. For nodes To the node The edge, Gathering at the roadside.
5. The method for collaborative optimization of delivery routes and charging strategies for electric logistics vehicles under time-varying road network conditions according to claim 1, characterized in that: The setting constraints include: Constraint 1: The origin and destination of delivery vehicles are both the distribution center; Constraint 2: Each vehicle shall complete only one delivery. Constraint 3: Each customer can only be served by one vehicle; Constraint 4: Flow balance during the delivery process; Constraint 5: Capacity constraints during delivery vehicle operation; Constraint 6: The sum of customer demand delivered by each delivery vehicle shall not exceed the vehicle's maximum load capacity; Constraint 7: Based on the dynamic travel time output by S1, set time constraints for delivery vehicles from the distribution center to the customer's location; Constraint 8: Based on the dynamic travel time output by S1, set a time window constraint for the delivery vehicle to travel from the customer point to the customer point. Constraint 9: Based on the dynamic travel time output by S1, set time constraints for the delivery vehicle from the charging station to the customer point; Constraint 10: Delivery vehicles must be fully charged when they depart from the distribution center; Constraint 11: Delivery vehicles do not require electricity when providing service at customer locations; Constraint 12: Power consumption constraints between delivery vehicle nodes; Constraint 13: The departure time of electric logistics vehicle delivery can be determined based on the initial customer visit time window, with a 30-minute time buffer period allowed. Constraint 14: Set the departure time window to [05:00, 08:00].
6. The method for collaborative optimization of delivery routes and charging strategies for electric logistics vehicles under time-varying road network conditions according to claim 4, characterized in that: The steps in S3 include: S3.1, Daytime Hybrid Charging Strategy: Based on Charging Costs Set charging costs for delivery vehicles during operating hours. It includes two aspects: Firstly, a partial charging strategy is adopted, meaning that the vehicle does not need to be fully charged every time it arrives at the charging station; it can be charged within a preset range. Partial charging can not only reduce the charging time per charge but also avoid the battery degradation problem caused by frequent full charging. Secondly, a dynamic optimization charging timing is set. That is, if there is a period with a lower electricity price than when the vehicle arrived at the station within the next hour, the vehicle will wait for the lower price to charge; if there is no better electricity price, the vehicle will adopt an immediate charging strategy to reduce unnecessary waiting time. S3.2, Nighttime Ordered Charging Strategy: All vehicles are fully charged during the nighttime low electricity price period. A scheduling model is constructed with the objective of minimizing the concurrent number of charging stations to mitigate grid fluctuations. Its expression is: In the formula, The maximum number of charging stations that can be used concurrently during nighttime charging; This is a set of nighttime periods with low electricity prices. The number of vehicles that need to be charged overnight; No. Vehicles at time Should charging be performed? For vehicles The charging power; , indicating a time interval; For vehicles The electrical energy required to replenish the battery to full charge; The constraints include charging completion constraints, charging pile capacity constraints, and charging continuity constraints. S3.3 Time-of-use pricing: Six price levels are set, and the price sequence is reconstructed and calibrated. The expression is as follows: In the formula, This indicates the electricity price after reconstruction and calibration; Indicates the mean alignment coefficient; This represents the minimum electricity price after restructuring; This represents the maximum electricity price after restructuring; This represents the minimum base electricity price; This represents the maximum base electricity price.
7. The method for collaborative optimization of delivery routes and charging strategies for electric logistics vehicles under time-varying road network conditions according to claim 1, characterized in that: The steps in S4 include: S4.1 Chromosomal coding methods using path sequence expression: Customer nodes, charging stations, and distribution centers are arranged in a numbered sequence. Each sequence represents the complete service route of a vehicle; each route begins and ends at a distribution center; Multiple vehicles are separated by a virtual delivery center; Meanwhile, a charging node insertion position is reserved in the coding structure to support dynamic adjustment of the charging strategy; S4.2 Construct the initial population. The construction methods include: using a saving algorithm, a greedy strategy, and a heuristic strategy. Among them, the heuristic strategy is the nearest neighbor strategy and the time window priority strategy. S4.
3. Based on the constructed delivery route planning and charging strategy model, calculate the fitness value for each individual in the population. The fitness function consists of vehicle driving cost, charging cost, and penalty cost for violating constraints, and is expressed as: The penalty item adopts a weighted floating mechanism. S4.4 Perform power feasibility testing on the initial population and individuals generated during subsequent evolution, and trigger the charging station insertion mechanism if necessary; S4.5 In the selection stage of the genetic algorithm, a dynamic selection mechanism is introduced to dynamically adjust the individual selection probability according to the algorithm iteration process. In the early stage of the algorithm, the population diversity is maintained to avoid premature convergence, and in the later stage of the algorithm, the convergence is accelerated and the solution quality is improved. S4.6 During the evolution of the genetic algorithm, a crossover operation is performed on the selected parent individuals to generate new offspring individuals by exchanging some node sequences in the delivery path; at the same time, a mutation operation is performed on some individuals to adjust the access order of nodes in the path or the position of charging nodes, so as to enhance the algorithm's ability to search complex solution spaces. S4.
7. For individuals that may not meet the constraints after crossover and mutation operations, a stratified repair strategy shall be adopted for handling. S4.8 Repeat the selection, crossover, mutation and repair steps until the preset maximum number of iterations or the preset convergence condition of population fitness is reached; S4.9 After the algorithm terminates, select the individual with the best fitness from the final population as the solution for the collaborative optimization of the electric logistics vehicle delivery route and charging strategy.
8. The method for collaborative optimization of delivery routes and charging strategies for electric logistics vehicles under time-varying road network conditions according to claim 7, characterized in that: The penalty term is represented using a weighted floating-point mechanism as follows: In the formula, This indicates that the logistics delivery vehicle carrying out the delivery task has arrived at the logistics delivery point. The cost of punishment; Indicates the safe power threshold; For vehicles Reaching the customer node Remaining battery power at that time; Indicates vehicle Reaching the customer node The moment; Represents client node Latest service hours; Represents client node The earliest service time; 750 and 500 represent the power penalty coefficient and time penalty coefficient, respectively.
9. The method for collaborative optimization of delivery routes and charging strategies for electric logistics vehicles under time-varying road network conditions according to claim 7, characterized in that: The triggering condition for the charging station insertion mechanism is expressed as follows: In the formula, Represents a node The trigger condition value; Represents a node The battery status; Indicates the total number of subsequent road segments. Indicates the index of subsequent road segments; Indicates from node The distance to each subsequent segment; Energy consumption rate; The safe power threshold; The charging selection rating function is expressed as follows: In the formula, For plugging into the charging station The rating; For nodes To plug into the charging station The distance; For plugging into the charging station Distance to subsequent road sections; For a moment Electricity prices below; The maximum value of the time-of-use electricity price; To avoid penalties for continuous charging stations.
10. The method for collaborative optimization of delivery routes and charging strategies for electric logistics vehicles under time-varying road network conditions according to claim 7, characterized in that: The repair sequence of the layered repair strategy includes: The first layer is structural repair, which involves checking all customer points that have been visited and eliminating duplicate access points. The second layer is constraint repair. By checking whether the overall customer demand on the road segment exceeds the vehicle's maximum capacity, paths that violate vehicle load constraints and customer service time window constraints are repaired first. The system also checks whether the vehicle's battery will run out during the path execution process, which would prevent the vehicle from completing subsequent tasks. The triggering conditions are as described above. When an individual cannot restore its battery through the charging station insertion mechanism, the individual is eliminated. The third layer of repair includes: The charging station has been inserted, but the charging timing and charging amount are not optimal. The S3 strategy is invoked to optimize the charging strategy. Perform redundant charging cleanup within the path to avoid increasing runtime due to unnecessary charging; To avoid penalties for arriving early or late due to fixed departure times, the S2 strategy is invoked to optimize departure times.