Accelerated computational method for solving equilibrium state of transportation network considering high electric vehicle penetration
The accelerated calculation method addresses inefficiencies in TAP-UE by using a path recognition agent and Lagrangian relaxation with L-BFGS optimizer to quickly achieve accurate traffic network equilibrium, enhancing real-time scheduling in electric vehicle transportation networks.
Patent Information
- Application Number
- CN202410208052.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-02-26
- Publication Date
- 2024-12-17
- Estimated Expiration
- 2044-02-26
AI Technical Summary
Conventional methods for solving the traffic assignment problem with user equilibrium (TAP-UE) in electric-transport coupled systems are inefficient and slow, particularly due to prolonged solution times and challenges posed by nonlinearities in large-scale transportation networks with high electric vehicle penetration.
An accelerated calculation method using a path recognition agent trained with a multi-head attention mechanism and a fully connected network, combined with Lagrangian relaxation and L-BFGS optimizer, to transform the traffic flow allocation model into an unconstrained optimization problem, enabling faster convergence and accurate path flow prediction.
The method significantly reduces solution time and maintains high accuracy in predicting traffic network equilibrium, facilitating real-time joint scheduling of power and transportation systems.
Smart Images

Figure CN118097947B_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of electric power systems, and mainly relates to an accelerated calculation method for solving a traffic network equilibrium state taking into account a high electric vehicle penetration rate. Background Art
[0002] Electric vehicles are becoming one of the promising strategies to promote the transition to a sustainable energy system, and global electric vehicle sales are expected to reach 23 million units by 2030. With the development of charging infrastructure, the electrification of transportation is accelerating. Therefore, there is an urgent need for a tool that effectively describes the distribution of electric vehicle traffic and charging load in the transportation network.
[0003] The traffic assignment problem with user equilibrium (TAP-UE) is widely used in electric-transport coupled systems. In this framework, user equilibrium represents the state in which the decisions of individual electric vehicle users influence each other, which leads to a situation in which a unilateral change in decision does not improve individual benefits. A deep understanding of user equilibrium plays a key role in analyzing transportation systems, including the complex interactions between electric vehicle users, charging station operators, and network operators. Therefore, the solution of the equilibrium state of transportation network users constitutes an inevitable stage in analyzing individual characteristics and overall trends.
[0004] The reduced efficiency of solving TAP-UE by conventional commercial solvers can be attributed to two fundamental factors. First, the solution time is significantly prolonged due to the iterative computation process required to identify the optimal set of paths. Second, despite the inherent convexity of the model, the presence of nonlinearities, especially the relationship between link flows and associated time costs, poses a huge challenge to achieving the optimal traffic flow solution.
[0005] Based on the above research barriers, this patent proposes an accelerated calculation method for solving the equilibrium state of the traffic network taking into account high electric vehicle penetration rate Summary of the invention
[0006] The present invention is aimed at the problem that TAP-UE in the prior art is slow to solve, inefficient, and difficult to cope with the real-time scheduling requirements of large-scale transportation networks. It provides an accelerated calculation method for solving the equilibrium state of a transportation network taking into account a high penetration rate of electric vehicles. First, in the day-ahead stage, the travel demand, charging price and actual path selection of historical electric vehicles are collected. Based on this, the path recognition agent is trained, and the multi-head attention mechanism of the transformer is used to minimize the prediction error; then in the intraday stage, the travel demand and charging station price in the real-time transportation network are collected, and the path set is obtained through the path recognition agent, which is input into the initialized fully connected network to obtain the path flow. The loss is calculated and the parameters are updated through the generalized objective function of the transportation network to determine whether it is currently in equilibrium. If so, the calculation is terminated and the result is output. If not, the parameters are continuously updated iteratively until the path flow is in equilibrium. The method of this invention has significant results in accelerating the calculation of the equilibrium state of large-scale transportation networks, and is expected to help the real-time joint scheduling of power and transportation.
[0007] In order to achieve the above object, the technical solution adopted by the present invention is: an accelerated calculation method for solving the equilibrium state of a traffic network taking into account a high electric vehicle penetration rate, comprising the following steps:
[0008] S1, data collection: in the day-ahead stage, collect the state information of the determined traffic network, the state information at least includes the travel demand of historical traffic electric vehicles, charging price and the actual route selection of users, and the data collection is completed through the traffic flow allocation model taking into account the user game equilibrium;
[0009] S2, training the path recognition agent: Based on the data collected in step S1, the travel demand and charging price of electric vehicles in historical traffic are used as features, and the actual path selection training of users is used as labels to train the path recognition agent, and the multi-head attention mechanism of transformer is used to minimize the training error;
[0010] S3, obtain the path set: In the intraday stage, collect the travel demand and charging station prices of electric vehicles in the real-time transportation network, obtain the path set through the path recognition agent trained in step S2, and initialize the fully connected network at the same time;
[0011] S4, obtaining path flow: inputting the travel demand of electric vehicles and the price of charging stations collected in step S3 into the fully connected network to obtain path flow;
[0012] S5, calculate the loss and update the parameters: transform the traffic flow allocation model taking into account the user game equilibrium into an unconstrained optimization problem with only the objective function through Lagrangian relaxation, form an augmented objective function, calculate the loss of the path flow output by the neural network, and update the parameters;
[0013] S6, judgment: judge whether the current path traffic is in a balanced state. If so, the step is accepted and the result is output; otherwise, return to step S3.
[0014] As an improvement of the present invention, the data collection of step S1 is completed through a traffic flow distribution model that takes into account user game equilibrium, and the model includes objective function constraints, coupling relationship constraints between path traffic flow and section traffic flow, connection constraints between path traffic flow and the number of vehicles waiting at electric vehicle fast charging stations, interaction constraints between link flow and link passing time, constraints on the waiting time of electric vehicle fast charging stations, correspondence constraints between path traffic flow and electric vehicle travel demand, non-negativity constraints on path traffic flow, and relationship constraints between the charging load of electric vehicle fast charging stations and path traffic flow.
[0015] As another improvement of the present invention, the objective function constraint of the traffic flow allocation model taking into account the user game equilibrium is:
[0016]
[0017] The coupling relationship constraint between the path traffic flow and the section traffic flow is specifically:
[0018]
[0019] The connection constraint between the path traffic flow and the number of vehicles waiting at the electric vehicle fast charging station is specifically:
[0020]
[0021] The interaction constraint between the link flow and the link transit time is specifically:
[0022]
[0023] In the formula, x a and x k represent the electric vehicle flow of road section a and electric vehicle charging station k respectively; t a (x a ) and t k (x k ) represent the travel time of road section a and the waiting time of charging queue at electric vehicle charging station k respectively; f p,w represents the traffic flow on path p of the start-end point pair w. w represents the electric vehicle travel demand for the start-end point pair w; and They represent the free travel time of road section a and the inherent charging service time of charging station k respectively; c a and c kThe traffic capacity of road section a and the charging capacity of charging station k; and v k,p,w The coupling relationship between road section a, charging station k and path p is pointed out; ω is the conversion coefficient of time and money.
[0024] As another improvement of the present invention, the constraints of the waiting time of the electric vehicle fast charging station are specifically:
[0025]
[0026] The corresponding relationship constraint between the path traffic flow and the electric vehicle travel demand is specifically:
[0027]
[0028] The non-negativity constraint of the path traffic flow is specifically:
[0029]
[0030] The relationship constraint between the charging load of the electric vehicle fast charging station and the path traffic volume is specifically:
[0031]
[0032] in, The charging load of charging k, Represents the amount of electricity needed to replenish the electric vehicle through path p.
[0033] As another improvement of the present invention, the augmented objective function in step S5 is specifically:
[0034]
[0035] In the formula, λ w is the penalty term in the objective function for violating the corresponding relationship between the path traffic flow and the electric vehicle travel demand; μ p,w It is the penalty term of the non-negativity constraint of the path traffic flow in the objective function.
[0036] As a further improvement of the present invention, the process of updating parameters in step S5 adopts L-BFGS optimizer, introduces the approximate value of the second-order derivative, and speeds up the calculation.
[0037] Compared with the current technical level, the present invention has significant beneficial effects, which are mainly reflected in the following two aspects:
[0038] First, compared with the traditional solver solution method, the present invention transforms the original constrained model into an unconstrained model by introducing the Lagrangian relaxation method. Subsequently, the unconstrained optimization model, i.e., the generalized objective function, is used as the loss function of the neural network training, and the quadratic term of Taylor expansion is cleverly introduced in the parameter update process through the L-BFGS optimizer, thereby greatly accelerating the convergence speed.
[0039] Secondly, compared with directly using deep learning neural networks for prediction, this method shows excellent high accuracy and sample utilization advantages. Traditional deep learning methods usually rely on a large amount of sample data to ensure the accuracy of the model, but this approach is particularly difficult when samples are scarce. The present invention successfully achieves satisfactory prediction accuracy with fewer samples through the regression of a single batch of samples (which can be regarded as a single batch of supervised deep learning). BRIEF DESCRIPTION OF THE DRAWINGS
[0040] Figure 1 is a flow chart of the steps of the method of the present invention;
[0041] Figure 2 is a test network topology diagram in the test example of the present invention;
[0042] Figure 3 It is a comparison diagram of the training process of the present method and the traditional solver in the test example of the present invention, in which the optimizer is replaced with the Adam framework;
[0043] Figure 4 It is a comparison chart of charging station loads in the test example of the present invention. DETAILED DESCRIPTION
[0044] The present invention will be further explained below in conjunction with the accompanying drawings and specific embodiments. It should be understood that the following specific embodiments are only used to illustrate the present invention and are not used to limit the scope of the present invention.
[0045] Example 1
[0046] An accelerated computational method for solving the equilibrium state of a transportation network taking into account high electric vehicle penetration, such as Figure 1 As shown, the following steps are included:
[0047] Step S1: In the day-ahead stage, for a specific transportation network, historical transportation electric vehicle travel demand, charging prices, and users’ actual route choices are collected;
[0048] When collecting historical traffic electric vehicle travel demand, charging prices and users' actual route choices, the model selected is a traffic flow allocation model that takes into account user game equilibrium, including:
[0049]
[0050] In the formula, x a and x k They represent the electric vehicle flow of road section a and electric vehicle charging station k respectively. a (x a ) and t k (x k ) represent the travel time of road section a and the waiting time of charging queue at electric vehicle charging station k respectively. p,w represents the traffic flow on path p of the start-end point pair w. w represents the electric vehicle travel demand for the start-end point pair w. and They represent the free travel time of road section a and the inherent charging service time of charging station k respectively; c a and c k The traffic capacity of road section a and the charging capacity of charging station k; and v k,p,w The coupling relationship between road section a and charging station k and path p is pointed out. ω is the conversion coefficient of time and money; The charging load of charging k, Represents the amount of electricity needed to replenish the electric vehicle through path p.
[0051] Among them, constraint (0-1) is the objective function of the traffic flow allocation model taking into account the user game equilibrium, including travel time cost, charging waiting cost and charging cost. Constraint (0-2) describes the coupling relationship between the path traffic flow and the section traffic flow. Constraint (0-3) clarifies the connection between the path traffic flow and the number of vehicles waiting at the electric vehicle fast charging station. Constraint (0-4) follows the classic BRP equation and describes the interaction between link flow and link passing time. Constraint (0-5) outlines the calculation method for calculating the waiting time of electric vehicle fast charging stations. Constraint (0-6) summarizes the corresponding relationship between the path traffic flow and the travel demand of electric vehicles. Constraint (0-7) ensures the non-negativity of the path traffic flow. Constraint (0-8) reflects the relationship between the charging load of the electric vehicle fast charging station and the path traffic flow.
[0052] Step S2: Using historical traffic electric vehicle travel demand and charging prices as features and users’ actual path selection training as labels, train the path recognition agent and use the transformer’s multi-head attention mechanism to minimize the training error;
[0053] Using historical typical daily travel demand and charging prices, we adopt normal distribution for sampling to obtain a large number of sample features, solve the above model based on commercial solvers (such as GURUBI, CPLEX, etc.), obtain historical path traffic as labels, build a database, and use transformer with multi-head attention mechanism to minimize training error.
[0054] Step S3: In the intraday stage, real-time traffic network status information is collected: electric vehicle travel demand and charging station prices, and the path set is obtained through the path recognition agent trained in the second step, and the fully connected neural network is initialized.
[0055] Step S4: Input the real-time traffic network status information into the fully connected network to obtain the path flow; construct a fully connected neural network, use the known real-time status information and the path set obtained by the path recognition agent to obtain the path flow.
[0056] Step S5: Calculate the loss and update the parameters through the generalized objective function of the transportation network;
[0057] By converting the traffic assignment model into an unconstrained optimization problem with only an objective function through Lagrangian relaxation, an augmented objective function is formed to calculate the loss of path flow output by the neural network.
[0058] Using the Lagrangian relaxation method, the relevant constraints of the traffic equilibrium model are added to the objective function through the penalty term, and the original optimization problem is transformed into an unconstrained optimization problem. Subsequently, the gradient of the unconstrained optimization problem is calculated based on the deep learning framework. Therefore, the loss function in the deep learning framework, that is, the augmented objective function, is expressed as follows:
[0059]
[0060] In the formula, λ w and μ p,w is the penalty term in the objective function for violating constraints (0-6) and (0-7).
[0061] It is difficult to solve the unconstrained optimization problem (0-9) and obtain the optimal solution using the traditional simple gradient method. Therefore, this patent uses a gradient update method based on deep learning to approximate the optimal solution to the problem. After iterative convergence, the path flow output by the neural network is regarded as an approximate solution to the traffic assignment problem.
[0062] In the process of updating parameters, the L-BFGS optimizer is used to introduce the approximate value of the second-order derivative to speed up the calculation.
[0063] The L-BFGS (Broyden-Fletcher-Goldfarb-Shanno) algorithm is a gradient update method for solving unconstrained optimization problems. Currently, the algorithm has been extended to the field of deep learning and is used in the parameter update process.
[0064] Consider the following optimization problem:
[0065] argmin θf(θ)(0-10)
[0066]
[0067] y k =g k+1 -g k (0-12)
[0068] δ k =θ k+1 -θ k (0-13)
[0069] y k =H k δ k (0-14)
[0070] By Taylor expansion of the above formula, it is easy to get the following formula:
[0071]
[0072] Where H is the Hessian matrix.
[0073] Since the iterative calculation process requires a large amount of memory to store the Hessian matrix, the traditional BFGS algorithm chooses to use an approximate method to replace the exact Hessian matrix H. The calculation method is as follows:
[0074]
[0075] In the formula, Here, keep the vector and V k is enough. It is obtained by successive updates, and its calculation method is as follows:
[0076]
[0077] Due to limited memory capacity, after multiple iterations, the vectors that need to be stored and V k Therefore, when calculating the approximate value of the Hessian matrix, only the last m saved vectors are considered, and the redundant vectors are no longer stored, and formula (0-17) becomes the following form.
[0078]
[0079] After the L-BFGS algorithm is completed, the matrix B is obtained -1 (θ K ) as the Hessian matrix H(θ k). This algorithm is essentially a method to approximate the Hessian matrix. Due to the introduction of the approximate value of the second-order matrix, the calculation speed is greatly accelerated.
[0080] Step S6: Determine whether the current path traffic is in a balanced state. If so, end the calculation and output the result. If not, return to step S3.
[0081] Test Case
[0082] Test environment: In this patent, the experimental test system adopts a real case study of the traffic network in Nanjing, China. The traffic network consists of 39 nodes and 10 electric vehicle fast charging stations, such as Figure 2 As shown in the figure, the deep reinforcement learning method in the test system is implemented using 32GB RAM and GTX4070 GPU. The framework is built in pytorch2.0.1 and GUROBI solver on Python3.7 platform for model optimization simulation.
[0083] Test content: To prove the accuracy and efficiency of the present invention in solving the TAP-UE model; to compare the time and accuracy of the present invention with those of the traditional solver; to prove the superiority of the L-BFGS optimizer used in the present invention, the parameter iteration update process is compared with the Adam optimizer.
[0084] A. Display of the accuracy of objective function solution:
[0085] Figure 3 It is a comparison chart of the present invention and the commercial solver, which uses the iterative framework of Adam. Among them, the square line represents the present invention, the triangle line represents the iterative framework using Adam, and the circle line represents the solver solution. Since this method does not produce the final result by iteration, it is a straight line parallel to the x-axis. It can be seen that with the increase of the number of iterations, the objective function value obtained by the Adam optimizer shows good stability in the entire training process, but the objective function value decreases relatively slowly. Therefore, a lot of time is required to iterate to meet the convergence conditions. However, since the second-order term of the Taylor expansion of the objective function is introduced in the process of parameter update, the present invention converges faster.
[0086] B. Demonstration of solution accuracy of state variables (charging load):
[0087] To further illustrate the accuracy of the present invention in solving TAP-UE, Figure 4 The charging load obtained by the proposed framework is shown. It is not difficult to see from the figure that the solution results of the solver are basically consistent with the solution results of the present invention. The average error between the optimal solution obtained by the solver and the result obtained by the proposed framework is only 1.43%.
[0088] C. Display of solution time:
[0089] Table 1 is a comparison of the time required to obtain the traffic equilibrium state when the solver solution method and the present invention have the same input (electric vehicle travel demand and electric vehicle fast charging station price). Among them, the solver solution time is 37.42 seconds, and the time required for the present invention to solve is 3.87 seconds. It is not difficult to see that the solution efficiency of the method proposed by the present invention has been greatly improved, which is about 0.1 times the solution time of the traditional method.
[0090] Table 1
[0091] method Solution time Solver: gurobi 37.42 The present invention 3.87
[0092] In summary, in the day-ahead stage, the method of this case collects historical electric vehicle travel demand, charging prices and actual path choices of users. Based on the above information, the path identification agent is trained, and the multi-head attention mechanism of transformer is used to minimize the prediction error; in the intraday stage, real-time traffic network status information is collected: travel demand and charging station prices, and the path set is obtained through the path identification agent, which is input into the initialized fully connected network to obtain the path flow. The loss is calculated and the parameters are updated through the generalized objective function of the traffic network to determine whether it is currently in equilibrium. If so, the calculation is terminated and the results are output. If not, the parameters are updated iteratively. This method has significant results in accelerating the calculation of the equilibrium state of large-scale traffic networks, and is expected to assist in the real-time joint dispatch of electricity and transportation.
[0093] It should be noted that the above content only illustrates the technical idea of the present invention and cannot be used to limit the protection scope of the present invention. For ordinary technicians in this technical field, several improvements and modifications can be made without departing from the principle of the present invention. These improvements and modifications all fall within the protection scope of the claims of the present invention.
Claims
1. An accelerated computational method for solving the equilibrium state of a transportation network taking into account a high penetration rate of electric vehicles, characterized in that: The steps include: S1, data collection: In the day-ahead stage, the state information of the determined traffic network is collected, and the state information at least includes the travel demand of the historical traffic electric vehicles, the charging price and the actual path selection of the users. The data collection is completed through the traffic flow allocation model taking into account the user game equilibrium; the model includes the objective function constraint, the coupling relationship constraint between the path traffic flow and the section traffic flow, the connection constraint between the path traffic flow and the number of vehicles waiting at the electric vehicle fast charging station, the interaction constraint between the link flow and the link passing time, the constraint of the waiting time of the electric vehicle fast charging station, the corresponding relationship constraint between the path traffic flow and the travel demand of the electric vehicle, the non-negativity constraint of the path traffic flow, and the relationship constraint between the charging load of the electric vehicle fast charging station and the path traffic flow; wherein, the objective function constraint of the traffic flow allocation model is: The coupling relationship constraint between the path traffic flow and the section traffic flow is specifically: The connection constraint between the path traffic flow and the number of vehicles waiting at the electric vehicle fast charging station is specifically: The interaction constraint between the link flow and the link transit time is specifically: In the formula, x a and x k represent the electric vehicle flow of road section a and electric vehicle charging station k respectively; t a (x a ) and t k (x k ) represent the travel time of road section a and the waiting time of charging queue at electric vehicle charging station k respectively; f p,w represents the traffic flow on path p of the start-end point pair w; d w represents the electric vehicle travel demand for the start-end point pair w; and They represent the free travel time of road section a and the inherent charging service time of charging station k respectively; c a and c k The traffic capacity of road section a and the charging capacity of charging station k; and v k,p,w The coupling relationship between road section a, charging station k and path p is pointed out; ω is the conversion coefficient of time and money; The waiting time constraints of the electric vehicle fast charging station are specifically: The corresponding relationship constraint between the path traffic flow and the electric vehicle travel demand is specifically: The non-negativity constraint of the path traffic flow is specifically: The relationship constraint between the charging load of the electric vehicle fast charging station and the path traffic volume is specifically: in, The charging load of charging k, Represents the amount of electricity needed to replenish the electric vehicle through path p; S2, training the path recognition agent: Based on the data collected in step S1, the travel demand and charging price of electric vehicles in historical traffic are used as features, and the actual path selection training of users is used as labels to train the path recognition agent, and the multi-head attention mechanism of transformer is used to minimize the training error; S3, obtain the path set: In the intraday stage, collect the travel demand and charging station prices of electric vehicles in the real-time transportation network, obtain the path set through the path recognition agent trained in step S2, and initialize the fully connected network at the same time; S4, obtaining path flow: inputting the travel demand of electric vehicles and the price of charging stations collected in step S3 into the fully connected network to obtain path flow; S5, calculate the loss and update the parameters: The traffic flow distribution model taking into account the user game equilibrium is transformed into an unconstrained optimization problem with only the objective function through Lagrangian relaxation, forming an augmented objective function, calculating the loss of the path flow output by the neural network, and updating the parameters; the augmented objective function is specifically: In the formula, λ w is the penalty term in the objective function for violating the corresponding relationship between the path traffic flow and the electric vehicle travel demand; μ p,w is the penalty term of the non-negativity constraint of the path traffic flow in the objective function; S6, judgment: judge whether the current path traffic is in a balanced state. If so, the step is accepted and the result is output; otherwise, return to step S3.
2. The accelerated calculation method for solving the equilibrium state of a transportation network taking into account a high electric vehicle penetration rate as claimed in claim 1, characterized in that: The process of updating parameters in step S5 adopts the L-BFGS optimizer and introduces the approximate value of the second-order derivative.
