Vehicle path scheduling method and system for battery swap station battery distribution

By constructing the objective function and genetic algorithm with the smallest total distribution cost, the battery distribution path is optimized, the problem of imbalance in battery inventory and demand in the car park is solved, and efficient path balance and cost reduction are achieved.

CN120509561APending Publication Date: 2025-08-19XJ ELECTRIC CO LTD +1
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510351253.1
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-03-24
Publication Date
2025-08-19

AI Technical Summary

Technical Problem

The prior art ignores the balance between battery inventory and demand in the car park when selecting the battery distribution path, resulting in the inability to meet the balance between battery inventory and demand, which affects the use experience of automobile users.

Method used

The objective function with the smallest total distribution cost is constructed, including transportation cost, time cost, distance cost and carbon emission cost, and the optimal path is solved through genetic algorithms by combining the maximum load capacity of a bicycle, the number and times allowed to pass through each demand point, the number of vehicles that can be distributed in each garage, and the constraints that the vehicle can only exit from one garage.

Benefits of technology

The battery distribution path is optimized, the battery inventory and demand in the parking lot is balanced, operating costs are reduced, and distribution efficiency and user satisfaction are improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120509561A_ABST
    Figure CN120509561A_ABST
Patent Text Reader

Abstract

The invention relates to a vehicle path scheduling method and system for battery distribution of a battery swap station, and belongs to the field of logistics and operation management. The method comprises the following steps: firstly, establishing a target function with the minimum total distribution cost; taking the maximum loading capacity of the single vehicle, the number and times of vehicles allowed to pass through each demand point, the vehicles which can be distributed in each parking lot, and the quantitative relation between the loading capacity of the vehicles and the demand quantity of the stations in the scheduling process as constraint conditions of the target function; and finally, solving the target function according to the constraint condition to obtain an optimal distribution path, and scheduling the vehicles of each parking lot according to the optimal distribution path. The problems that the balance between the battery inventory and the demand of the parking lot is ignored when the optimal path is selected in the prior art, the obtained path cannot meet the balance between the battery inventory and the demand, and the use experience of an automobile user is affected are solved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present invention relates to a vehicle path scheduling method and system for battery distribution at a battery swap station, belonging to the field of logistics and operation management. Background Art

[0002] With the rapid development of the new energy vehicle industry, electric vehicles (EVs), as an important alternative to traditional fuel vehicles, have seen their market share climb year by year. However, the widespread adoption of EVs faces challenges such as limited battery life and uneven distribution of charging infrastructure. To address this, battery swap stations have emerged. This model allows drivers to quickly swap batteries when they are depleted, rather than waiting for recharging. In this model, battery delivery becomes a critical component.

[0003] Optimizing battery delivery routes is a typical multi-depot vehicle routing problem, requiring consideration of whether battery inventory and demand are balanced across multiple depots. Existing battery delivery primarily considers distance and time costs, ignoring the balance between battery inventory and demand across depots. The resulting routes fail to balance battery inventory and demand, impacting vehicle user experience. Summary of the Invention

[0004] The purpose of the present invention is to provide a vehicle path scheduling method and system for battery distribution at battery swap stations, so as to optimize the battery distribution path and solve the problem that the existing technology ignores the balance between battery inventory and demand in the parking lot when selecting the optimal path, and the resulting path cannot meet the balance between battery inventory and demand, which affects the user experience of the car.

[0005] To achieve the above object, the solution of the present invention includes:

[0006] A vehicle routing method for battery distribution at a battery swap station according to the present invention comprises the following steps:

[0007] 1) Constructing an objective function that minimizes the total delivery cost of vehicles at the battery swap station based on at least three of the following costs: the transportation cost of the vehicle, the time cost of the vehicle reaching the demand point, the distance cost of the vehicle reaching the demand point, and the carbon emission cost;

[0008] 2) The objective function is constrained by the following conditions: the maximum load capacity of a single vehicle; only one vehicle can pass through each demand point once; the number of vehicles that can be dispatched from each depot cannot exceed the depot's maximum limit; vehicles can only leave from one depot; and the quantitative relationship between the vehicle load and the station demand during the dispatch process;

[0009] 3) Solve the objective function based on the constraints to obtain the optimal delivery path, and dispatch the vehicles at each depot according to the optimal delivery path.

[0010] Furthermore, a genetic algorithm is used to solve the objective function.

[0011] Furthermore, when solving the problem using the genetic algorithm, the optimized crossover probability and mutation probability are used. The crossover probability optimization refers to the dynamic adjustment of the crossover probability with the evolutionary generations, and the mutation probability optimization refers to the dynamic adjustment of the mutation probability with the evolutionary generations.

[0012] Furthermore, the crossover probability optimization expression is:

[0013]

[0014] Among them, P c is the crossover probability; is the basic crossover probability, a constant; φ is the adjustment coefficient, which affects the fractional term in the formula on P c the extent of contribution; is the maximum or current value of the cross-individual fitness; f min is the minimum fitness value in the population; m and n are power exponents; f max is the maximum fitness value in the population; σ is the sigmoid function; γ is the slope parameter of Sigmoid, which controls the rate of change of the Sigmoid function; k represents the current evolutionary generation, k max To set the maximum evolution generation threshold, η is the amplitude coefficient of the sine function; ω is the frequency parameter of the sine function.

[0015] Furthermore, the mutation probability optimization expression is:

[0016]

[0017] Among them, P m is the mutation probability; σ is the basic mutation probability, a constant; ε is the adjustment coefficient, affecting the fractional term in the fraction on P m The contribution degree of the variant individual; f represents the fitness value of the variant individual; f min is the minimum fitness value in the population; p and q are power exponents; σ is the sigmoid function; ξ is the slope parameter of Sigmoid, which controls the rate of change of the Sigmoid function; k represents the current evolutionary generation; k max is to set the maximum evolution generation threshold; θ represents the influence intensity of the exponential decay term; is the decay rate parameter.

[0018] Furthermore, the transportation cost of the vehicle is expressed as:

[0019]

[0020] Among them, f1 represents the transportation cost objective function; l ijRepresents the distance from demand point i to demand point j; If there is a vehicle τ passing through demand point i and demand point j, the value is 1, otherwise, the value is 0; represents the load of vehicle τ passing through demand point i to demand point j; C o represents the fixed cost of each vehicle; N represents the total number of vehicles finally dispatched from the parking lot;

[0021] The time cost of a vehicle reaching the demand point is expressed as:

[0022]

[0023] Among them, f2 represents the time cost function; μ, v represent the penalty factor, which is a fixed constant; et i Indicates the earliest arrival time of the vehicle; rt i Indicates the actual arrival time of the vehicle; i Indicates the latest arrival time of the delivery vehicle;

[0024] The distance cost for a vehicle to reach a demand point is expressed as:

[0025]

[0026] Among them, f3 represents the distance cost function; λ represents the penalty factor, which is used to adjust the impact of the delivery distance and is a fixed constant; l ij represents the distance from demand point i to demand point j; p is an adjustable parameter used to control the intensity of distance penalty; γ is a penalty factor used to adjust the impact of special circumstances; ω ij represents a binary variable, which is set to 1 when a situation that affects vehicle delivery occurs, and 0 otherwise;

[0027] The function used for carbon emission cost is:

[0028]

[0029] Among them, f4 represents the carbon emission cost function; l iτj represents the distance that vehicle τ travels from demand point i to demand point j; o represents the parking lot distribution center, l i,o represents the distance the i-th vehicle returns to the distribution center, ρ represents the carbon emissions per unit distance, C carbon represents the cost of carbon emissions.

[0030] Furthermore, the first constraint condition for determining the single vehicle load is:

[0031]

[0032] Among them, β represents the demand point that the parking lot needs to serve; m i is the battery demand at demand point i, Indicates the maximum load that each vehicle can bear; ensure Its value can only be 0 or 1. When the value is 1, it means that there are vehicles passing through demand points i and j at this time. Conversely, when the value is 0, it means that there are no vehicles passing through demand points i and j at this time.

[0033] The second constraint determined by the fact that only one vehicle can pass through each demand point and can only pass through once is:

[0034] and

[0035] Among them, Γ represents the set of vehicles dispatched by the parking lot, Θ represents the set of multiple parking lots and each demand point; ensure Its value can only be 0 or 1. When the value is 1, it means that there are vehicles passing through demand points i and j at this time. Conversely, when the value is 0, it means that there are no vehicles passing through demand points i and j at this time. ensure Its value can only be 0 or 1. When the value is 1, it means that there are vehicles passing through demand point j and demand point i at this time. Conversely, when the value is 0, it means that there are no vehicles passing through demand point j and demand point i at this time.

[0036] The third constraint is determined based on the maximum limit value of the number of vehicles that can be dispatched from each parking lot:

[0037]

[0038] Among them, α represents the set of battery swap station depots; Γ represents the set of vehicles dispatched to the battery swap station depots; β represents the demand points to be served by the depot; γ i Indicates the maximum number of items that can be dispatched from the parking lot; ensure Its value can only be 0 or 1. When the value is 1, it means that there are vehicles passing through demand points i and j at this time. Conversely, when the value is 0, it means that there are no vehicles passing through demand points i and j at this time.

[0039] The fourth constraint is determined based on the fact that vehicles can only exit from one parking lot:

[0040]

[0041] in, ensure Its value can only be 0 or 1. When the value is 1, it means that there are vehicles passing through demand points i and j at this time. Conversely, when the value is 0, it means that there are no vehicles passing through demand points i and j at this time. ensure Its value can only be 0 or 1. When the value is 1, it means that there are vehicles passing through demand point j and demand point i at this time. Conversely, when the value is 0, it means that there are no vehicles passing through demand point j and demand point i at this time.

[0042] The fifth constraint is determined based on the quantitative relationship between the vehicle load and the station demand during the scheduling process:

[0043]

[0044] in, ensure Its value can only be 0 or 1. When the value is 1, it means that there are vehicles passing through demand points i and j at this time. Conversely, when the value is 0, it means that there are no vehicles passing through demand points i and j at this time. ensure Its value can only be 0 or 1. When the value is 1, it means that there are vehicles passing through demand point j and demand point i at this time. Conversely, when the value is 0, it means that there are no vehicles passing through demand point j and demand point i at this time. It is expressed as the sum of the demand of all stations from point j to the end of the planned path; Indicates the maximum load that each vehicle can bear.

[0045] Furthermore, the constraints also include a sixth constraint determined based on the vehicle arrival time not being overdue:

[0046] et i ≤rt i ≤lt i

[0047] Among them, et i Indicates the earliest arrival time of the vehicle; rt i Indicates the actual arrival time of the vehicle; i Indicates the latest arrival time of the delivery vehicle;

[0048] It also includes the seventh constraint condition determined by the path scheduling process that no sub-loop occurs:

[0049]

[0050] in represents the cumulative travel distance of vehicle τ passing through station i, represents the cumulative travel distance of vehicle τ passing through station j, d ij Represents the distance between demand point i and demand point j.

[0051] Furthermore, the site demand is determined based on the battery swap request sent by the car user to the battery swap station, and the car user and the battery swap station communicate using the MQTT communication mode.

[0052] A vehicle path scheduling system for battery distribution at a battery swap station includes a processor for executing a computer program to implement the steps of the above vehicle path scheduling method for battery distribution at a battery swap station.

[0053] The beneficial effects of the present invention are as follows: as an improved invention, the method first constructs an objective function that minimizes the total distribution cost of vehicles at the battery swap station based on at least three costs including the vehicle's transportation cost, the time cost to reach the demand point, the distance cost, and the carbon emission cost; and then uses the maximum load weight of a single vehicle, the number and number of vehicles allowed to pass through each demand point, the number of vehicles that can be dispatched from each parking lot, the fact that vehicles can only leave from one parking lot, and the quantitative relationship between the vehicle's load weight and the site demand during the scheduling process as constraints of the objective function; by constructing the objective function and establishing constraints to optimize the battery distribution path, and finally solving the objective function according to the constraints, the optimal distribution path is obtained, which solves the problem in the prior art that the balance between the battery inventory and demand of the parking lot is ignored, the resulting path cannot meet the balance between battery inventory and demand, and affects the user experience of the car. BRIEF DESCRIPTION OF THE DRAWINGS

[0054] Figure 1 This is a schematic diagram of multi-park battery distribution at a battery swap station according to the present invention;

[0055] Figure 2 Schematic diagram of the change of optimized crossover probability and mutation probability of the present invention;

[0056] Figure 3 This is a flow chart of the battery swap station path optimization algorithm solution of the present invention;

[0057] Figure 4 This is the total distribution route diagram of multiple vehicle yards in a battery swap station using the traditional algorithm of the present invention;

[0058] Figure 5 This is the optimal distribution route diagram of the battery swap station 1 yard according to the traditional algorithm of the present invention;

[0059] Figure 6 This is the optimal distribution route diagram of the battery swap station 2 yard according to the traditional algorithm of the present invention;

[0060] Figure 7 This is the optimal distribution route diagram of the three-depot battery swap station according to the traditional algorithm of the present invention;

[0061] Figure 8 This is the optimal distribution route diagram of the four-depot battery swap station according to the traditional algorithm of the present invention;

[0062] Figure 9 This is the optimal distribution route diagram of the five-depot battery swap station according to the traditional algorithm of the present invention;

[0063] Figure 10The total distribution route diagram of multiple vehicle yards in the battery swap station optimized by the algorithm of the present invention;

[0064] Figure 11 The optimal distribution route diagram of the battery swap station 1 yard according to the optimization algorithm of the present invention;

[0065] Figure 12 This is the optimal distribution route diagram of the battery swap station 2 yard according to the optimization algorithm of the present invention;

[0066] Figure 13 This is the optimal distribution route diagram of the battery swap station 3 yards according to the optimization algorithm of the present invention;

[0067] Figure 14 This is the optimal distribution route diagram of the battery swap station 4 yards according to the optimization algorithm of the present invention;

[0068] Figure 15 This is the optimal distribution route diagram of the battery swap station 5 yards according to the optimization algorithm of the present invention;

[0069] Figure 16 This is a bar chart comparing the costs of each vehicle in the parking lot before and after optimization of the present invention. DETAILED DESCRIPTION

[0070] In order to make the objectives, technical solutions and advantages of the present invention more clear, the present invention is described in detail below in detail with reference to the accompanying drawings and embodiments.

[0071] The concept of the present invention is that the method first establishes an objective function for minimizing the total delivery cost; then uses the quantitative relationship between the vehicle load and the site demand during the scheduling process as one of the constraints of the objective function; finally, the objective function is solved according to the constraints to obtain the optimal delivery path.

[0072] Example of a vehicle routing method for battery distribution at a battery swap station:

[0073] For a given battery swap station system with multiple parking lots, each battery swap station has a certain number of vehicles, which need to go to a series of different stations (demand points) for service. Each station can only be visited once, and the load of each vehicle cannot exceed a preset value. Figure 1As shown, the battery swap station system has two depots, Depot 1 and Depot 2. Each depot has a certain number of vehicles. Vehicles in Depot 1 need to travel to four battery delivery demand points for service: Demand Point 1, Demand Point 8, Demand Point 7, and Demand Point 6. Vehicles in Depot 2 need to travel to five battery delivery demand points: Demand Point 2, Demand Point 8, Demand Point 5, Demand Point 4, and Demand Point 3. The purpose of this embodiment is to plan a service route to reduce the average delivery distance and time, thereby reducing operating costs and improving delivery efficiency. At the same time, it balances the battery inventory at each battery swap station, reduces carbon emissions, ensures service levels, and improves user satisfaction.

[0074] To achieve the above objectives, the delivery route scheduling method includes the following steps:

[0075] (1) constructing an objective function that minimizes the total distribution cost of vehicles at the battery swap station based on at least three of the following costs: the transportation cost of the vehicle at the battery swap station, the time cost of the vehicle reaching the demand point, the distance cost of the vehicle reaching the demand point, and the carbon emission cost;

[0076] (2) The constraints of the objective function are based on the maximum load of a single vehicle, the fact that only one vehicle can pass through each demand point and can only pass through once, the number of vehicles that can be dispatched from each parking lot cannot exceed the maximum limit of the parking lot, vehicles can only leave from one parking lot, and the quantitative relationship between the load of the vehicle and the demand at the station during the scheduling process;

[0077] (3) Solve the objective function based on the constraints to obtain the optimal delivery path.

[0078] Specifically, in order to achieve real-time communication between electric vehicle users and battery swap stations and obtain the number of batteries required by electric vehicle users in real time, before step (1), a real-time communication model between electric vehicle users and battery swap stations is constructed:

[0079] In the present invention, the MQTT protocol publish-subscribe model is used to establish a communication model between car users and battery swap stations, thereby realizing real-time information exchange between the two. In this model, EMQX plays the role of a message router, responsible for distributing Topic messages containing battery swap information published by battery swap stations to all electric vehicle users who have subscribed to relevant topics. In this mode, battery swap stations can not only publish messages, but also receive information as subscribers. When a car user publishes a Topic, EMQX will receive the message and forward it to all devices that have subscribed to the Topic. By using the MQTT communication model, information interaction between electric vehicle users and battery swap stations can be realized, and battery swap stations can dispatch vehicles in real time according to the battery swap request Topic to meet the needs of electric vehicle users. The specific optimization strategies are as follows:

[0080] Enhance message filtering capabilities. By using MQTT's retained message and will message functions, unnecessary message delivery can be reduced, ensuring that only the latest and relevant messages are delivered to subscribers. Improve message delivery efficiency, optimize message structure, reduce message size, and use compression algorithms to reduce network bandwidth usage, thereby improving the speed and efficiency of message delivery. Implement load balancing on the EMQX message server to ensure even message routing and distribution, avoid overloading a single server, and improve the overall performance and stability of the system. Introduce QoS levels and set different quality of service (QoS) levels for messages based on different business needs. For example, for critical messages such as battery replacement requests, QoS level 2 can be set to ensure that messages are received and not repeated. Add security mechanisms and use TLS encrypted communication to ensure the security of messages during transmission. At the same time, an authentication mechanism is implemented to prevent unauthorized devices from subscribing to or publishing messages; real-time monitoring and fault recovery are implemented to realize a real-time monitoring system to monitor the message transmission process. Once a fault or delay is found, measures are taken immediately to restore it to ensure the continuity and reliability of communication; subscription management is optimized to allow subscribers to flexibly subscribe to and unsubscribe from different topics according to actual needs, reduce unnecessary message reception, and improve the response speed of the system; use edge computing to deploy edge computing nodes near battery swap stations and electric vehicle users for local data processing and optimization, reduce the number of communications with the central server, and reduce latency; intelligent routing selection dynamically selects the best route according to network conditions and device status to ensure that messages can be transmitted through the most stable path.

[0081] In order to achieve real-time communication and optimized scheduling between electric vehicle users and battery swap stations, it is necessary to deploy an EMQXMQTT Broker cluster, load balancer, and authentication server to ensure efficient message distribution and security. At the same time, database servers and cache servers are also required to manage data storage and accelerate access speed. In addition, the introduction of edge computing nodes and intelligent routing engines will further improve the system's response speed and reliability.

[0082] In step (1):

[0083] The transportation cost function expression of the vehicle at the battery swap station is:

[0084]

[0085] Among them, f1 represents the transportation cost objective function; l ij Represents the distance from demand point i to demand point j; If there is a vehicle τ passing through demand point i and demand point j, the value is 1, otherwise, the value is 0; represents the load of vehicle τ passing through demand point i to demand point j; N represents the total number of vehicles finally dispatched from the parking lot; Co represents the fixed cost of each vehicle, which is calculated as follows:

[0086] C o =C fuel +C maintenance +C depreciation +C insurance +C labor

[0087] Where C fuel represents the vehicle fuel cost, C maintenance represents the maintenance cost of the vehicle, C depreciation represents the depreciation cost of the vehicle, C insurance represents the insurance cost of the vehicle, C labor Represents the labor cost of the vehicle.

[0088] The time cost function expression of the vehicle reaching the demand point is:

[0089]

[0090] Among them, f2 represents the time cost function; μ and ν represent the penalty factors, which are fixed constants; et i Indicates the earliest arrival time of the vehicle; rt i Indicates the actual arrival time of the vehicle; i Indicates the latest arrival time of the delivery vehicle.

[0091] The distance cost function expression of the vehicle to the demand point is:

[0092]

[0093] Among them, f3 represents the distance cost function; λ represents the penalty factor, which is used to adjust the impact of the delivery distance and is a fixed constant; l ij represents the distance from demand point i to demand point j; p is an adjustable parameter used to control the intensity of distance penalty; γ is a penalty factor used to adjust the impact of special circumstances; ω ij Represents a binary variable, which is set to 1 when certain conditions (such as traffic congestion, bad weather, etc.) are met, and 0 otherwise.

[0094] The carbon emission cost function expression is:

[0095]

[0096] Among them, f4 represents the carbon emission cost function; l iτj represents the distance that vehicle τ travels from demand point i to demand point j; o represents the parking lot distribution center, l i,o represents the distance the i-th vehicle returns to the distribution center, ρ represents the carbon emissions per unit distance, Ccarbon represents the cost of carbon emissions.

[0097] In summary, the objective function for minimizing the total distribution cost of the battery swap station is:

[0098] f=min(f1+f2+f3+f4)

[0099] In step (2):

[0100] The first constraint condition determined by the single vehicle load is:

[0101]

[0102] Among them, β represents the demand point that the parking lot needs to serve; m i is the battery demand at demand point i, Indicates the maximum load that each vehicle can bear; ensure Its value can only be 0 or 1. When the value is 1, it means that a vehicle has passed ij at this time. Conversely, when the value is 0, it means that no vehicle has passed ij at this time.

[0103] The second constraint determined by the fact that only one vehicle can pass through each demand point and can only pass through once is:

[0104] and

[0105] Among them, Γ represents the set of vehicles dispatched by the parking lot, Θ represents the set of multiple parking lots and each demand point; ensure Its value can only be 0 or 1. When the value is 1, it means that a vehicle has passed ij at this time. On the contrary, when the value is 0, it means that no vehicle has passed ij at this time. ensure Its value can only be 0 or 1. When the value is 1, it means that a vehicle has passed ji at this time. Conversely, when the value is 0, it means that no vehicle has passed ji at this time.

[0106] The third constraint is determined based on the maximum limit value of the number of vehicles that can be dispatched from each parking lot:

[0107]

[0108] Among them, α represents the set of battery swap station depots; Γ represents the set of vehicles dispatched from the battery swap station depots; γ i Indicates the maximum number of items that can be dispatched from the parking lot; ensure Its value can only be 0 or 1. When the value is 1, it means that a vehicle has passed ij at this time. Conversely, when the value is 0, it means that no vehicle has passed ij at this time.

[0109] The fourth constraint is determined based on the fact that vehicles can only exit from one parking lot:

[0110]

[0111] in, ensure Its value can only be 0 or 1. When the value is 1, it means that a vehicle has passed ij at this time. On the contrary, when the value is 0, it means that no vehicle has passed ij at this time. ensure Its value can only be 0 or 1. When the value is 1, it means that a vehicle has passed ji at this time. Conversely, when the value is 0, it means that no vehicle has passed ji at this time.

[0112] The fifth constraint is determined based on the quantitative relationship between the vehicle load and the station demand during the scheduling process:

[0113]

[0114] in, ensure Its value can only be 0 or 1. When the value is 1, it means that a vehicle has passed ij at this time. On the contrary, when the value is 0, it means that no vehicle has passed ij at this time. ensure Its value can only be 0 or 1. When the value is 1, it means that a vehicle has passed ji at this time. On the contrary, when the value is 0, it means that no vehicle has passed ji at this time. It is expressed as the sum of the demand of all stations from point j to the end of the planned path; Indicates the maximum load that each vehicle can bear.

[0115] In addition, in order to ensure that the arrival time of the delivery vehicle at the battery swap station is within the specified range, otherwise a corresponding penalty will be imposed, this embodiment also determines a sixth constraint condition based on the vehicle arrival time not exceeding the specified range:

[0116] et i ≤rt i ≤lt i

[0117] Among them, et i Indicates the earliest arrival time of the vehicle; rt i Indicates the actual arrival time of the vehicle; i Indicates the latest arrival time of the delivery vehicle.

[0118] In order to ensure that there is no sub-loop in the route scheduling process when the vehicle serves the next demand point, the cumulative driving distance from demand point i to demand point j is Should be greater than or equal to the cumulative distance traveled by the vehicle to demand point i The distance between the two demand points i and j. This embodiment also provides a seventh constraint:

[0119]

[0120] in represents the cumulative travel distance of vehicle τ passing through station i, represents the cumulative travel distance of vehicle τ passing through station j, d ij Represents the distance between demand point i and demand point j.

[0121] In step (3):

[0122] This paper uses an optimized genetic algorithm to solve the problem. Genetic algorithms are highly robust and can simultaneously search for solutions at multiple points in the problem space. They are widely used in vehicle routing optimization research. Traditional genetic algorithms suffer from low search efficiency and tend to converge prematurely into local optima. To make the algorithm more efficient in searching for the shortest path, this paper optimizes the GA. The optimization strategy is as follows:

[0123] The optimization concept of the genetic algorithm is to select the best individuals through the fitness function and maintain the diversity of the population to achieve rapid convergence of the population while avoiding the problem of local optimal solutions. A large number of studies have shown that selecting appropriate crossover probability and mutation probability is of great significance for the population to find the optimal solution. Appropriate probability parameters can significantly improve the search ability of the population and prevent the algorithm from converging prematurely. Therefore, the present invention optimizes the crossover probability and mutation probability of the genetic algorithm. The crossover probability reflects the intensity of the algorithm's crossover operation. If it is set too high, although it can enhance the algorithm's search ability, it will reduce the overall efficiency of the GA algorithm. If it is set too low, the algorithm's global search ability will be greatly reduced, resulting in slow and inefficient algorithm operation. In the mutation operation, the mutation probability represents the intensity of the mutation operation. Its value should also be reasonable and usually small. If it is set too high, it is easy to cause the algorithm to search randomly and lose the original characteristics of the genetic algorithm.

[0124] Specifically, crossover probability optimization refers to the dynamic adjustment of crossover probability with the number of iterations, and its expression is:

[0125]

[0126] Among them, P c is the crossover probability; is the basic crossover probability, a constant; φ is the adjustment coefficient, which affects the fractional term in the formula on P c the extent of contribution; is the maximum or current value of the cross-individual fitness; f minis the minimum fitness value in the population; n is the power index, which is used to adjust the impact of fitness difference; f max is the maximum fitness value in the population; m is the power index, similar to n, but applied to the maximum fitness value; σ is the sigmoid function, the specific expression is γ is the slope parameter of Sigmoid, which controls the rate of change of the Sigmoid function; k represents the current evolution generation, k max To set the maximum evolution generation threshold, η is the amplitude coefficient of the sine function, which determines the size of the sine fluctuation; ω is the frequency parameter of the sine function, which determines the periodicity of the fluctuation.

[0127] Mutation probability optimization refers to the dynamic adjustment of mutation probability with the number of iterations, and its expression is:

[0128]

[0129] Among them, P m is the mutation probability; σ is the basic mutation probability, a constant; ε is the adjustment coefficient, affecting the fractional term in the fraction on P m The contribution degree of the variant individual; f represents the fitness value of the variant individual; f min is the minimum fitness value in the population; p represents the power exponent, which is used to adjust the influence of fitness difference; q is also a power exponent, similar to p, but applied to the maximum fitness value; σ is the sigmoid function, the specific expression is ξ is the slope parameter of Sigmoid, which controls the rate of change of the Sigmoid function; k represents the current evolutionary generation; k max is to set the maximum evolution generation threshold; θ represents the influence intensity of the exponential decay term; is the decay rate parameter, which determines the speed at which the probability of mutation decreases; the . in the formula represents the dot product.

[0130] Based on the above adjustments, a sine function is introduced into the crossover probability, which provides periodic changes to the crossover probability. This change can help the algorithm avoid falling into local optimality during the search process and helps explore different areas of the solution space. At the same time, the introduction of the Sigmoid function provides a nonlinear way to adjust the overall crossover probability, making the change of the crossover probability smoother and more continuous. By introducing parameters to control the size of the sinusoidal fluctuations, the algorithm can maintain the diversity of the population to a certain extent and prevent premature convergence to a suboptimal solution. Similarly, the introduction of a dynamically adjusted exponential decay term in the mutation probability helps the algorithm increase exploration in the early stages of the search and improve exploitation in the later stages. By controlling the influence of the exponential decay term by parameters, the effect of the mutation operation can be more finely adjusted to ensure that it can effectively promote population diversity when more mutations are needed, while reducing unnecessary disturbances when they are not needed. After optimization, combined with the original fitness difference term, the algorithm allows the mutation probability to better reflect the current state of the population, ensuring that the algorithm can automatically adjust to achieve the best effect at different search stages, better balancing global exploration and local exploitation, and increasing the possibility of finding the global optimal solution. The schematic diagram of the changes in the optimized crossover probability and mutation probability is shown below. Figure 2 shown.

[0131] In summary, the steps for solving the distribution path of the battery swap station are as follows: Figure 3 As shown, no further details are given here.

[0132] The distribution routes of the five battery swap stations before and after optimization are shown in the figure below: Figures 4 to 15 shown, specifically, Figure 4 This is the total vehicle distribution route diagram of the five parking lots of the battery swap station when using the traditional algorithm before algorithm optimization; Figures 5 to 9 The optimal delivery route diagrams for battery swap station yards 1, 2, 3, 4, and 5 are shown respectively when using the traditional algorithm; Figure 10 The total vehicle distribution route diagram of the five parking lots of the battery swap station using the optimization algorithm of the present invention; Figures 11-15 The optimal delivery route diagrams for battery swap station yards 1, 2, 3, 4, and 5 are shown respectively when using the traditional algorithm; Figure 16 This is a bar chart comparing the costs of the five battery swap stations before and after optimization. The specific cost values are shown in the table. Obviously, after using the optimization algorithm of the present invention, the cost is greatly reduced.

[0133] Example of a vehicle routing system for battery distribution at battery swap stations:

[0134] The present invention provides a vehicle path scheduling system for battery distribution at battery swap stations. The system includes a processor, which is used to execute computer program instructions to implement a vehicle path scheduling method for battery distribution at battery swap stations introduced in a method embodiment. The method has been introduced clearly enough in the method embodiment and will not be repeated here.

Claims

1. A vehicle routing method for battery distribution at a battery swap station, characterized in that: The steps include: 1) Constructing an objective function that minimizes the total delivery cost of vehicles at the battery swap station based on at least three of the following costs: the transportation cost of the vehicle, the time cost of the vehicle reaching the demand point, the distance cost of the vehicle reaching the demand point, and the carbon emission cost; 2) The objective function is constrained by the following conditions: the maximum load capacity of a single vehicle; only one vehicle can pass through each demand point once; the number of vehicles that can be dispatched from each depot cannot exceed the depot's maximum limit; vehicles can only leave from one depot; and the quantitative relationship between the vehicle load and the station demand during the dispatch process; 3) Solving the objective function based on the constraints to obtain an optimal delivery path, and then dispatching vehicles at each depot according to the optimal delivery path.

2. The vehicle routing method for battery distribution at a battery swap station according to claim 1, characterized in that: The objective function is solved using a genetic algorithm.

3. The vehicle routing method for battery distribution at a battery swap station according to claim 2, characterized in that: When solving the problem using the genetic algorithm, the optimized crossover probability and mutation probability are used. The crossover probability optimization refers to the dynamic adjustment of the crossover probability with the evolutionary generations, and the mutation probability optimization refers to the dynamic adjustment of the mutation probability with the evolutionary generations.

4. The vehicle routing method for battery distribution at a battery swap station according to claim 3, characterized in that: The crossover probability optimization expression is: Among them, P c is the crossover probability; is the basic crossover probability, a constant; φ is the adjustment coefficient, which affects the fractional term in the formula on P c the extent of contribution; is the maximum or current value of the cross-individual fitness; f min is the minimum fitness value in the population; m and n are power exponents; f max is the maximum fitness value in the population; σ is the sigmoid function; γ is the slope parameter of Sigmoid, which controls the rate of change of the Sigmoid function; k represents the current evolutionary generation, k max To set the maximum evolution generation threshold, η is the amplitude coefficient of the sine function; ω is the frequency parameter of the sine function.

5. The vehicle routing method for battery distribution at battery swap stations according to claim 3, characterized in that: The mutation probability optimization expression is: Among them, P m is the mutation probability; σ is the basic mutation probability, a constant; ε is the adjustment coefficient, affecting the fractional term in the fraction on P m The contribution degree of the variant individual; f represents the fitness value of the variant individual; f min is the minimum fitness value in the population; p and q are power exponents; σ is the sigmoid function; ξ is the slope parameter of Sigmoid, which controls the rate of change of the Sigmoid function; k represents the current evolutionary generation; k max is to set the maximum evolution generation threshold; θ represents the influence intensity of the exponential decay term; is the decay rate parameter.

6. The vehicle routing method for battery distribution at battery swap stations according to claim 1, characterized in that: The transportation cost of the vehicle is expressed as: Among them, f1 represents the transportation cost objective function; l ij Represents the distance from demand point i to demand point j; If there is a vehicle τ passing through demand point i and demand point j, the value is 1, otherwise, the value is 0; represents the load of vehicle τ passing through demand point i to demand point j; C o represents the fixed cost of each vehicle; N represents the total number of vehicles finally dispatched from the parking lot; The time cost of the vehicle reaching the demand point is expressed as: Among them, f2 represents the time cost function; μ and ν represent the penalty factors, which are fixed constants; et i Indicates the earliest arrival time of the vehicle; rt i Indicates the actual arrival time of the vehicle; i Indicates the latest arrival time of the delivery vehicle; The distance cost of the vehicle to the demand point is expressed as: Among them, f3 represents the distance cost function; λ represents the penalty factor, which is used to adjust the impact of the delivery distance and is a fixed constant; l ij represents the distance from demand point i to demand point j; p is an adjustable parameter used to control the intensity of distance penalty; γ is a penalty factor used to adjust the impact of special circumstances; ω ij represents a binary variable, which is set to 1 when a situation that affects vehicle delivery occurs, and 0 otherwise; The function used for the carbon emission cost is: Among them, f4 represents the carbon emission cost function; l iτj represents the distance that vehicle τ travels from demand point i to demand point j; o represents the parking lot distribution center, l i,o represents the distance the i-th vehicle returns to the distribution center, ρ represents the carbon emissions per unit distance, C carbon represents the cost of carbon emissions.

7. The vehicle routing method for battery distribution at battery swap stations according to claim 1, characterized in that: The first constraint condition determined by the single vehicle load is: Among them, β represents the demand point that the parking lot needs to serve; m i is the battery demand at demand point i, Indicates the maximum load that each vehicle can bear; ensure Its value can only be 0 or 1. When the value is 1, it means that there are vehicles passing through demand points i and j at this time. Conversely, when the value is 0, it means that there are no vehicles passing through demand points i and j at this time. The second constraint determined by the fact that only one vehicle can pass through each demand point and can only pass through once is: and Among them, Γ represents the set of vehicles dispatched by the parking lot, Θ represents the set of multiple parking lots and each demand point; ensure Its value can only be 0 or 1. When the value is 1, it means that there are vehicles passing through demand points i and j at this time. Conversely, when the value is 0, it means that there are no vehicles passing through demand points i and j at this time. ensure Its value can only be 0 or 1. When the value is 1, it means that there are vehicles passing through demand point j and demand point i at this time. Conversely, when the value is 0, it means that there are no vehicles passing through demand point j and demand point i at this time. The third constraint is determined based on the maximum limit value of the number of vehicles that can be dispatched from each parking lot: Among them, α represents the set of battery swap station depots; Γ represents the set of vehicles dispatched to the battery swap station depots; β represents the demand points to be served by the depot; γ i Indicates the maximum number of items that can be dispatched from the parking lot; ensure Its value can only be 0 or 1. When the value is 1, it means that there are vehicles passing through demand points i and j at this time. Conversely, when the value is 0, it means that there are no vehicles passing through demand points i and j at this time. The fourth constraint is determined based on the fact that vehicles can only exit from one parking lot: in, ensure Its value can only be 0 or 1. When the value is 1, it means that there are vehicles passing through demand points i and j at this time. Conversely, when the value is 0, it means that there are no vehicles passing through demand points i and j at this time. ensure Its value can only be 0 or 1. When the value is 1, it means that there are vehicles passing through demand point j and demand point i at this time. Conversely, when the value is 0, it means that there are no vehicles passing through demand point j and demand point i at this time. The fifth constraint is determined based on the quantitative relationship between the vehicle load and the station demand during the scheduling process: in, ensure Its value can only be 0 or 1. When the value is 1, it means that there are vehicles passing through demand points i and j at this time. Conversely, when the value is 0, it means that there are no vehicles passing through demand points i and j at this time. ensure Its value can only be 0 or 1. When the value is 1, it means that there are vehicles passing through demand point j and demand point i at this time. Conversely, when the value is 0, it means that there are no vehicles passing through demand point j and demand point i at this time. It is expressed as the sum of the demand of all stations from point j to the end of the planned path; Indicates the maximum load that each vehicle can bear.

8. The vehicle routing method for battery distribution at battery swap stations according to claim 1, characterized in that: The constraint conditions also include a sixth constraint condition determined based on the vehicle arrival time not being overdue: And i ≤rt i ≤lt i Among them, et i Indicates the earliest arrival time of the vehicle; rt i Indicates the actual arrival time of the vehicle; i Indicates the latest arrival time of the delivery vehicle; It also includes the seventh constraint condition determined by the path scheduling process that no sub-loop occurs: in represents the cumulative travel distance of vehicle τ passing through station i, represents the cumulative travel distance of vehicle τ passing through station j, d ij Represents the distance between demand point i and demand point j.

9. The vehicle routing method for battery distribution at battery swap stations according to claim 1, characterized in that: The site demand is determined based on the battery swap request sent by the car user to the battery swap station, and the car user and the battery swap station communicate using the MQTT communication mode.

10. A vehicle routing system for battery distribution at a battery swap station, comprising a processor, characterized in that: The processor is used to execute a computer program to implement the steps of a vehicle path scheduling method for battery distribution at a battery swap station as described in any one of claims 1 to 9.