A parameter calibration method for large-scale road network traffic assignment model based on improved C-SPSA
By combining the improved C-SPSA algorithm with a machine learning model, the problems of slow parameter calibration speed and low accuracy in large-scale road network traffic assignment models are solved, achieving more efficient parameter calibration and more accurate traffic assignment results.
Patent Information
- Application Number
- CN202211597956.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-12-12
- Publication Date
- 2026-02-17
- Estimated Expiration
- 2042-12-12
AI Technical Summary
In the process of calibrating parameters for traffic assignment models under large-scale road networks, existing technologies suffer from slow solution speed, low accuracy, and the influence of parameter selection on the accuracy of assignment results. In particular, when using mobile phone signaling data, there are problems such as low positioning accuracy and discontinuous tracking.
An improved C-SPSA algorithm combined with a machine learning model is adopted. By classifying the path cost function and path selection model, the parameters of the path selection model are estimated using mobile signaling data. The improved C-SPSA algorithm and machine learning model are then used for parameter calibration to reduce gradient estimation errors and improve model accuracy and speed.
It improves the accuracy and speed of traffic assignment models for large-scale road networks, reduces the gap between assignment results and actual traffic flow, and provides more accurate planning guidance.
Smart Images

Figure CN115935820B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of large-scale transportation planning technology, and in particular relates to a parameter calibration method for a large-scale road network traffic assignment model based on an improved C-SPSA. Background Technology
[0002] With economic globalization and regional integration, urban and regional development is increasingly characterized by global urbanization and urban globalization, as well as regional urbanization and urban regionalization. A key feature of these trends is that urban development is no longer confined to individual cities, giving rise to urban clusters centered around major cities and transcending administrative boundaries. However, the development of urban clusters not only increases residents' travel distances, but also places higher demands on transportation service systems due to the resulting increased traffic demand. Therefore, researching traffic assignment models for large-scale road networks is crucial, as accurate traffic assignment models can guide road network planning and traffic demand management.
[0003] Route selection models, as the core of traffic assignment models, have historically relied on SP (Special Purpose) or RP (Recall) surveys for parameter estimation. However, simplified routes in SP surveys reduce accuracy, while RP surveys, based on drivers' recollections of selected routes, also have issues. Since mobile phone signaling can completely record users' activity trajectories, it avoids the drawbacks of low positioning accuracy and discontinuous tracking found in large-scale road network travel. Using mobile phone signaling data for parameter estimation in route selection models across large-scale road networks can improve the predictive accuracy of these models.
[0004] For large-scale road networks, traffic assignment can be time-consuming. Parameter calibration, during its execution, continuously generates new parameters, repeatedly performs traffic assignments, and compares the differences between the assigned results and the actual results. Therefore, a drawback of parameter optimization problems in large-scale road networks is their slow solution speed. However, machine learning models, as "black boxes," offer advantages such as fast computation time, high accuracy, and ease of training. Using trained machine learning models instead of traffic assignment models can significantly improve calibration efficiency and reduce operation time.
[0005] Parameter calibration is the process of using mathematical methods to specify the undetermined parameters of a model based on actual data. In traffic assignment models for large-scale road networks, road segment attributes, traffic flow characteristics, and individual travel behaviors rely on numerous independent parameters for description, and the selection of these parameters directly affects the assignment results. Therefore, in the practical application of traffic assignment models, it is essential to calibrate the model's parameters based on the traffic characteristics and individual attributes of the assigned area to ensure the accuracy of the assignment model. Summary of the Invention
[0006] Purpose of the invention: The purpose of this invention is to provide a parameter calibration method for a large-scale road network traffic assignment model based on an improved C-SPSA. This method combines a surrogate model and an improved C-SPSA calibration algorithm, which can reduce the gap between the assignment results and the actual traffic flow, ensure accuracy, and provide guidance for the planning of large-scale road networks.
[0007] Technical Solution: To achieve the above objectives, this invention proposes a parameter calibration method for a large-scale road network traffic assignment model based on an improved C-SPSA. This method includes the following steps:
[0008] S1, obtain the attributes of the road segment and the attributes of the origin and destination points;
[0009] S2, based on the characteristics of a large-scale road network, road segment attributes, and origin-destination attributes, establishes a path cost function and a path selection model;
[0010] S3, based on the number of lanes in a road segment, the distance between the origin and destination, and traffic demand, classifies the generalized travel cost function parameters and path selection model parameters for road segments;
[0011] S4. Based on the classification results of the path selection model, mobile signaling is used to estimate the initial values and range of path selection model parameters for different clusters.
[0012] S5. Establish a traffic assignment model and train a machine learning model based on the input parameters and the objective function value assigned by the model.
[0013] S6 combines machine learning models and uses improved C-SPSA-calibrated generalized travel cost function parameters and path selection model parameters.
[0014] Furthermore, the road segment attributes mentioned in S1 include the number of lanes, length, free-flow time, and road segment capacity. The origin and destination attributes include the regional centroid coordinates of the origin and destination and the traffic demand between the origin and destination.
[0015] Furthermore, the path cost mentioned in S2 is obtained by summing the segment costs, and its functional form is:
[0016]
[0017] in, For OD, the generalized travel cost of path k between rs; c a The generalized travel cost of the route segment; δ ak This represents the path association relationship between road segments. If road segment a is on path k, the value is 1; otherwise, it is 0.
[0018] The generalized travel cost of a road segment consists of the segment's impedance and the toll fee. The impedance of a road segment is uniformly represented by the BPR function:
[0019]
[0020] Among them, t a v represents the free-flow time of road segment a, in minutes; a Traffic volume allocated to road segment a, in pcu / h; C a Let be the traffic capacity of road segment a, in pcu / h; α and β are the stagnation coefficients in the BPR function, l a Let α be the length of road segment a in km, ρ be the toll cost per unit length in yuan / km, and η be the time conversion factor for monetary costs. In the generalized travel cost of the road segment, α, β and ρ are parameters to be calibrated.
[0021] The model expression for the path selection model is:
[0022]
[0023] In the formula, P k C represents the probability of choosing path k; k The cost of path k; K rs Let S be the set of paths on OD pairs rs; μ1 and μ2 are the parameters to be calibrated in the path selection model, and S k For correction items:
[0024]
[0025] In the formula, l a L is the length of road segment a; k Γ is the length of path k; k Let be the set of road segments for path k; if road segment a is on path j, then δ aj =1, otherwise 0; C n A set of paths; C n The shortest path length on the [theory / path].
[0026] Furthermore, in S3, the parameters of the generalized travel cost function and the path selection model are classified. The generalized travel cost function is calculated using different α, β, and ρ based on the number of lanes in the road segment. The path selection model uses the K-means clustering method to divide all OD pairs into a specified number of clusters according to the distance between the origin and destination and the traffic demand. Different μ1 and μ2 are used when calculating the path selection probability between ODs in different clusters.
[0027] Furthermore, in S4, mobile phone signaling data is used to estimate the parameters of the route selection model. Based on the classification results of the route selection model, the OD pairs with the highest travel demand in each cluster are extracted, and the initial values and ranges of the route selection model parameters for each cluster are obtained by combining personal mobile phone signaling data.
[0028] Based on data precision, and according to different confidence intervals, circles are drawn with the mobile signaling point as the center, representing its associated physical region DDR. This compensates for the error between mobile signaling data and actual location, allowing multiple paths to correspond to the same mobile signaling point, and calculates the probability that a traveler generates an actual mobile signaling point.
[0029]
[0030] in,
[0031]
[0032]
[0033] It is based on all relevant OD pairs obtained from the mobile signaling point. It is the probability of selecting OD pair s among all relevant OD pairs, assuming that all relevant OD pairs have an equal probability of being selected. P represents the number of relevant OD pairs. n (i|p) is a metric equation; if the DDR of mobile signaling point i intersects with road segment a, then δ ai =1, otherwise 0; I represents all mobile signaling points generated by personal travel; d(i,a) represents the perpendicular distance between mobile signaling point i and the road segment a where DDR intersects, P n (p|δ n (s); μ1, μ2) is the path selection model established by S2, δ n (s) is the path set between ODs, p is a path in the path set, and μ1 and μ2 are the parameters to be estimated in the path selection model. Based on the probability that travelers generate actual mobile signaling points, the maximum likelihood estimation method (MLE) is used to estimate the path selection model parameters μ1 and μ2.
[0034] Furthermore, S5 establishes a traffic assignment model, and trains a machine learning model based on the input parameters and the objective function value assigned by the model. The specific method is as follows:
[0035] S5-1, Establish a random user average allocation model to load traffic travel demand between different origins and destinations onto the road network, i.e.:
[0036]
[0037]
[0038]
[0039]
[0040] In the formula, t a (w) represents the average cost required to travel segment a, and S represents the average cost of traveling segment a. k θ is the correction term in the path selection model, where θ is a non-negative correction parameter that describes the stochastic characteristics of the model. Let q be the traffic flow along path k between OD pairs rs. rs For OD to meet the travel demand between rs; x a Let be the traffic flow on road segment a. If road segment a is on path k between OD pairs rs, then... Otherwise, it is 0;
[0041] S5-2: Randomly generate generalized travel cost function parameters and path selection model parameters for road segments within the given range. Determine the path cost and path selection probability distribution between ODs. Input the randomly generated parameters into the random user average allocation model established in S5-1. Based on the allocated traffic and actual traffic of the road segments, output the objective function, aiming to achieve the maximum coupling between the model allocation results and the actual results.
[0042]
[0043] in, Traffic flow is allocated on the representative road segment, y i The actual traffic flow on the road segment is represented by n, which represents the number of road segments.
[0044] S5-3 trains the machine learning model based on the input parameters and the target function value assigned by the model. The machine learning model takes the parameters obtained by the calibration algorithm iteration as input and the target function as output. Furthermore, the calibration algorithm calculates the approximate gradient of the calibration parameters based on the target function output by the machine learning model, realizing the loop between the calibration algorithm and the machine learning model.
[0045] Furthermore, S6 combines machine learning models, using improved C-SPSA-based calibration of generalized travel cost function parameters and path selection model parameters, as detailed below:
[0046] S6-1, determine the initial values of α, β and ρ in the generalized travel cost function of the road segment, and the initial values of the path selection model parameters are the parameter estimation results in S4;
[0047] S6-2, α, β, and ρ of the generalized travel cost function for the calibrated road segment, and setting the internal parameter values {a} of the improved C-SPSA algorithm based on the range of values for α, β, and ρ. l A l ,c l ,α l ,γ l}, k=0, m=0, n=0, the parameters to be calibrated for the generalized travel cost function of the road segment are as follows:
[0048]
[0049] Among them, X Li ,i={1,2,3} are α, β and ρ of the generalized travel cost function of road segments in different clusters;
[0050] S6-3, Update the gain sequence: Generate step size a k and disturbance amplitude c k This generates an n-dimensional random vector Δ, where each dimension of the vector is randomly generated by a Bernoulli ±1 distribution;
[0051] S6-4, Perturb the initial parameters. Only the parameters α, β and ρ of the generalized travel cost function of road segments in one cluster are perturbed, while the parameters in other clusters remain unchanged. Input the perturbed parameters into the machine learning model and output the objective function value.
[0052]
[0053] Δ Li Let i = {1, 2, 3} be random vectors from different clusters. Since the random vectors are randomly generated by a Bernoulli ±1 distribution, the parameters within each cluster are subject to a perturbation amplitude c. k The effects are different. It consists of the parameters of the generalized travel cost function for road segments within different clusters, plus the perturbation variable c. k Δ Li The output objective function value, It is the parameters of the generalized travel cost function for road segments within different clusters minus the disturbance variable c. k Δ Li Output the objective function value;
[0054]
[0055] This is an approximate gradient of the parameters of the generalized travel cost function for a road segment. and These are the results of the objective function output by the machine learning model, c k Δ Li Let i = {1, 2, 3} be the perturbation variables of different clusters. The final approximate gradient only affects the elements within each cluster. The next iteration point is approximated based on the approximate gradient and the initial parameter values. Input the new iteration point into the machine learning model and determine the output objective function value and the iteration point X. k Does the difference in the objective function values satisfy the convergence accuracy? |MAPE k+1 -MAPE kIf |<δ, the iteration of parameter calibration of the generalized travel cost function of the road segment ends and jumps to 6-5; if not, let k=k+1 and jump to S6-3.
[0056] S6-5, Calibrate μ1 and μ2 of the path selection model, based on μ1 and μ x The value range is set for the internal parameter values of the improved C-SPSA algorithm {a p A p ,c p ,α p ,γ p The path selection model has the following parameters to be calibrated;
[0057]
[0058] Among them, X ri ,i={1,2,3} are μ1 and μ2 of the path selection models for different clusters;
[0059] S6-6, Update the gain sequence: Generate step size a m and disturbance amplitude c m This generates an n-dimensional random vector Δ, where each dimension of the vector is randomly generated by a Bernoulli ±1 distribution.
[0060] S6-7, Perturb the initial parameters, only perturbing the path selection model parameters within one cluster, while keeping the parameters in the remaining clusters unchanged. Input the perturbed parameters into the machine learning model and output the objective function value;
[0061]
[0062] Δ ri Let i = {1, 2, 3} be random vectors from different clusters. Since the random vectors are randomly generated by a Bernoulli ±1 distribution, the parameters within each cluster are subject to a perturbation amplitude c. m The effects are different. It is the path selection model parameters within different clusters plus the perturbation variable c m Δ ri The output objective function value, It is the path selection model parameters within different clusters minus the perturbation variable c. m Δ ri Output the objective function value;
[0063]
[0064] in, Choose an approximate gradient for the model parameters for the path. and These are the results of the objective function output by the machine learning model, cm Δ ri Let i = {1, 2, 3} be the perturbation variables of different clusters. The final approximate gradient only affects the elements within each cluster. The next iteration point is approximated based on the approximate gradient and the initial parameter values. Input the new iteration point into the machine learning model and determine the output objective function value and the iteration point X. m Does the difference in the objective function values meet the convergence accuracy? in, This is the maximum allowable error value. If it is satisfied, the path selection model parameter calibration iteration ends. If it is not satisfied, let m = m + 1 and jump to S6-6.
[0065] S6-7, input the parameters of the generalized cost function of the optimal road segment and the parameters of the optimal path selection model into the machine learning model, and determine whether the difference between the output objective function value and the objective function value of the previous optimal parameters meets the convergence accuracy. |MAPE n+1 -MAPE n |<θ, where θ is the maximum allowable error value. If this condition is met, the calibration ends. If not, the optimal path selection model parameters are fixed, and the process jumps to S6-3 to recalibrate the generalized travel cost function parameters of the road segment, n=n+1.
[0066] Beneficial effects: Compared with the prior art, the technical solution of the present invention has the following beneficial effects:
[0067] (1) This invention is a parameter calibration method for traffic assignment models in large-scale road networks. It establishes a path cost function and a path selection model. The path selection model considers a correction term for path duplication, which can partially correct the IIA problem. The calibrated parameters are mainly the road segment resistance function, the cost per unit length, and the path selection model parameters. This method first classifies the parameters according to road grade, economic level between ODs, and distance, highlighting the heterogeneity and diversity of road segments in large-scale road networks and considering the heterogeneity of passenger travel behavior.
[0068] (2) This invention deeply mines residents' travel behavior through mobile phone signaling data, and estimates the path selection model parameters and their value ranges based on residents' actual path selection. The path selection model is the core of traffic assignment. This method avoids the errors brought by questionnaire data, coordinates real mobile phone signaling data and traffic network, allows multiple paths to correspond to the same observation result, and can estimate the path selection model parameters of OD in each cluster even when the data is unclear.
[0069] (3) A traffic assignment mathematical model was established based on the stochastic user equilibrium model, and the traffic assignment results can be obtained. Randomly generated parameter values and objective function pairs were used as the training set for the machine learning model. The best-performing machine learning model was used to replace the traffic assignment model and combined with the improved C-SPSA calibration algorithm, which can shorten the assignment time and improve the accuracy and speed of model calibration.
[0070] (4) This invention proposes an improved C-SPSA algorithm. Since path cost is the system utility of the path selection model, this algorithm first calibrates the generalized travel cost function of the road segment, and then calculates the path cost through the optimal road resistance function of the road segment and the unit length travel cost. Based on the calibrated path cost, the path selection model parameters of different OD clusters are calibrated. This algorithm improves upon SPSA's simultaneous perturbation of all parameters by classifying the parameters into "homogeneous" clusters. The approximate gradient of each cluster is only estimated based on the results of the perturbed cluster, which can reduce the error in gradient estimation. At the same time, the internal parameter values {a, A, c, α, γ} of the improved C-SPSA algorithm also affect the calibration effect. Because the path cost function and the path selection model parameters have different value ranges, different internal parameter values can be determined according to the value range of the parameters to be calibrated when calibrating different types of parameters, avoiding getting trapped in local optima.
[0071] (5) When performing traffic assignment on a large-scale road network, classifying the generalized travel cost function and path selection model parameters of road segments according to their attributes can effectively improve the accuracy of the model; mobile phone signaling can completely record the user's activity trajectory, reducing the error caused by questionnaires, and using mobile phone signaling data for parameter estimation can improve the accuracy of path selection model prediction; using machine learning models instead of traffic assignment models can reduce the time wasted by repeatedly calling traffic assignment during the calibration process; the improved C-SPSA divides the calibration of the generalized travel cost function parameters and path selection model parameters of road segments into two steps, and only disturbs variables within the cluster, which can reduce the bias in gradient estimation; combining the surrogate model and the improved C-SPSA calibration algorithm can reduce the gap between the assignment results and the actual traffic flow, ensure accuracy, and provide guidance for the planning of large-scale road networks. Attached Figure Description
[0072] Figure 1 This is a flowchart of the improved C-SPSA algorithm for large-scale road networks implemented in this invention;
[0073] Figure 2 A flowchart illustrating the combination of the machine learning model and the improved C-SPSA algorithm implemented in this invention;
[0074] Figure 3 This is a training accuracy map of the machine learning model in this embodiment of the invention;
[0075] Figure 4 This is a graph showing the changes in the objective function results in an embodiment of the present invention. Detailed Implementation
[0076] To make the objectives, technical solutions, and advantages of this application clearer, the following detailed description is provided in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are merely illustrative and not intended to limit the scope of this application.
[0077] This invention provides a method for calibrating traffic assignment model parameters for large-scale road networks. It categorizes path cost functions and path selection models according to the number of lanes per road segment, the economic level of origin-destination (OD) systems, and distance, resulting in greater diversity and heterogeneity. Using a machine learning model instead of traffic assignment saves time spent on assignment. Even in large-scale road networks, the combination of a surrogate model and an improved C-SPSA calibration algorithm can quickly and accurately reduce the error between assignment results and actual traffic flow, ensuring accuracy.
[0078] In this embodiment, a method for calibrating parameters of a large-scale road network traffic assignment model based on an improved C-SPSA is provided. The method includes the following steps:
[0079] S1, obtain the attributes of the road segment and the attributes of the origin and destination points;
[0080] S2, based on the characteristics of a large-scale road network, road segment attributes, and origin-destination attributes, establishes a path cost function and a path selection model;
[0081] S3, based on the number of lanes in a road segment, the distance between the origin and destination, and traffic demand, classifies the generalized travel cost function parameters and path selection model parameters for road segments;
[0082] S4. Based on the classification results of the path selection model, mobile signaling is used to estimate the initial values and range of path selection model parameters for different clusters.
[0083] S5. Establish a traffic assignment model and train a machine learning model based on the input parameters and the objective function value assigned by the model.
[0084] S6 combines machine learning models and uses improved C-SPSA-calibrated generalized travel cost function parameters and path selection model parameters.
[0085] Furthermore, the road segment attributes mentioned in S1 include the number of lanes, length, free-flow time, and road segment capacity. The origin and destination attributes include the regional centroid coordinates of the origin and destination and the traffic demand between the origin and destination.
[0086] Furthermore, the path cost mentioned in S2 is obtained by summing the segment costs, and its functional form is:
[0087]
[0088] in, For OD, the generalized travel cost of path k between rs; c a The generalized travel cost of the route segment; δ ak This represents the path association relationship between road segments. If road segment a is on path k, the value is 1; otherwise, it is 0.
[0089] The generalized travel cost of a road segment consists of the segment's impedance and the toll fee. The impedance of a road segment is uniformly represented by the BPR function:
[0090]
[0091] Among them, t a v represents the free-flow time of road segment a, in minutes; a Traffic volume allocated to road segment a, in pcu / h; C a Let be the traffic capacity of road segment a, in pcu / h; α and β are the stagnation coefficients in the BPR function, l a Let α be the length of road segment a in km, ρ be the toll cost per unit length in yuan / km, and η be the time conversion factor for monetary costs, with a value of 3.09. In the generalized travel cost of the road segment, α, β, and ρ are parameters to be calibrated.
[0092] The model expression for the path selection model is:
[0093]
[0094] In the formula, P k C represents the probability of choosing path k; k The cost of path k; K rs Let S be the set of paths on OD pairs rs; μ1 and μ2 are the parameters to be calibrated in the path selection model, and S k For correction items:
[0095]
[0096] In the formula, l a L is the length of road segment a; k Γ is the length of path k; k Let be the set of road segments for path k; if road segment a is on path j, then δ aj =1, otherwise 0; C n A set of paths; C n The shortest path length on the [theory / path].
[0097] Furthermore, in S3, the parameters of the generalized travel cost function and the path selection model are classified. The generalized travel cost function is divided into three categories according to the number of lanes in the road segment {4, 3, 2}, and different α, β and ρ are used for calculation. The path selection model uses the K-means clustering method to divide all OD pairs into a specified number of clusters according to the distance between the origin and destination and the traffic demand. Different μ1 and μ2 are used when calculating the path selection probability between ODs in different clusters.
[0098] Furthermore, in S4, mobile phone signaling data is used to estimate the parameters of the route selection model. Based on the classification results of the route selection model, the OD pairs with the highest travel demand in each cluster are extracted, and the initial values and ranges of the route selection model parameters for each cluster are obtained by combining personal mobile phone signaling data.
[0099] Based on data precision, and according to different confidence intervals, circles are drawn with the mobile signaling point as the center, representing its associated physical region DDR. This compensates for the error between mobile signaling data and actual location, allowing multiple paths to correspond to the same mobile signaling point, and calculates the probability that a traveler generates an actual mobile signaling point.
[0100]
[0101] in,
[0102]
[0103]
[0104] It is based on all relevant OD pairs obtained from the mobile signaling point. It is the probability of selecting OD pair s among all relevant OD pairs, assuming that all relevant OD pairs have an equal probability of being selected. P represents the number of relevant OD pairs. n (o|p) is a metric equation; if the DDR of mobile signaling point i intersects with road segment a, then δ ai =1, otherwise 0; I represents all mobile signaling points generated by personal travel; d(i,a) represents the perpendicular distance between mobile signaling point i and the road segment a where DDR intersects, P n (p|δ n (s); μ1, μ2) is the path selection model established by S2, δ n (s) is the path set between ODs, p is a path in the path set, and μ1 and μ2 are the parameters to be estimated in the path selection model. Based on the probability that travelers generate actual mobile signaling points, the maximum likelihood estimation method (MLE) is used to estimate the path selection model parameters μ1 and μ2.
[0105] Furthermore, S5 establishes a traffic assignment model, and trains a machine learning model based on the input parameters and the objective function value assigned by the model. The specific method is as follows:
[0106] S5-1, Establish a random user average allocation model to load traffic travel demand between different origins and destinations onto the road network, i.e.:
[0107]
[0108]
[0109]
[0110]
[0111] In the formula, t a (w) represents the average cost required to travel segment a, and S represents the average cost of traveling segment a. k θ is the correction term in the path selection model, where θ is a non-negative correction parameter that describes the stochastic characteristics of the model. Let q be the traffic flow along path k between OD pairs rs. rs For OD to meet the travel demand between rs; x a Let be the traffic flow on road segment a. If road segment a is on path k between OD pairs rs, then... Otherwise, it is 0;
[0112] S5-2: Randomly generate generalized travel cost function parameters and path selection model parameters for road segments within the given range. Determine the path cost and path selection probability distribution between ODs. Input the randomly generated parameters into the random user average allocation model established in S5-1. Based on the allocated traffic and actual traffic of the road segments, output the objective function, aiming to achieve the maximum coupling between the model allocation results and the actual results.
[0113]
[0114] in, Traffic flow is allocated on the representative road segment, y i The actual traffic flow on the road segment is represented by n, which represents the number of road segments.
[0115] S5-3 trains a machine learning model based on the input parameters and the target function value assigned by the model. The machine learning model uses the parameters obtained from the calibration algorithm iterations as input and the target function as output. The calibration algorithm calculates the approximate gradient of the calibration parameters based on the target function output by the machine learning model, thus implementing a loop between the calibration algorithm and the machine learning model. The trained models include random forest, gradient boosting regression, Gaussian, and support vector machine models. Since the Gaussian model can achieve high accuracy with limited training data, it is combined with an improved C-SPSA algorithm. The training accuracy of the machine learning model is shown in [link to documentation]. Figure 3 .
[0116] Furthermore, S6 combines machine learning models, using improved C-SPSA-based calibration of generalized travel cost function parameters and path selection model parameters, as detailed below:
[0117] S6-1, determine the initial values of α, β and ρ in the generalized travel cost function of the road segment, and the initial values of the path selection model parameters are the parameter estimation results in S4;
[0118] S6-2, α, β, and ρ of the generalized travel cost function for the calibrated road segment, and setting the internal parameter values {a} of the improved C-SPSA algorithm based on the range of values for α, β, and ρ. l A l ,c l ,a l ,γ l}, k=0, m=0, n=0, the initial parameters of the generalized travel cost function for the road segment are as follows:
[0119]
[0120] Among them, X Li ,i={1,2,3} are α, β and ρ of the generalized travel cost function of road segments in different clusters;
[0121] S6-3, Update the gain sequence: Generate step size a k and disturbance amplitude c k This generates an n-dimensional random vector Δ, where each dimension of the vector is randomly generated by a Bernoulli ±1 distribution;
[0122] S6-4, Perturb the initial parameters. Only the parameters α, β and ρ of the generalized travel cost function of road segments in one cluster are perturbed, while the parameters in other clusters remain unchanged. Input the perturbed parameters into the machine learning model and output the objective function value.
[0123]
[0124] Δ LiLet i = {1, 2, 3} be random vectors from different clusters. Since the random vectors are randomly generated by a Bernoulli ±1 distribution, the parameters within each cluster are subject to a perturbation amplitude c. k The effects are different. It consists of the parameters of the generalized travel cost function for road segments within different clusters, plus the perturbation variable c. k Δ Li The output objective function value, It is the parameters of the generalized travel cost function for road segments within different clusters minus the disturbance variable c. k Δ Li Output the objective function value;
[0125]
[0126] This is an approximate gradient of the parameters of the generalized travel cost function for a road segment. and These are the results of the objective function output by the machine learning model, c k Δ Li Let i = {1, 2, 3} be the perturbation variables of different clusters. The final approximate gradient only affects the elements within each cluster. The next iteration point is approximated based on the approximate gradient and the initial parameter values. Input the new iteration point into the machine learning model and determine the output objective function value and the iteration point X. k Does the difference in the objective function values satisfy the convergence accuracy? |MAPE k+1 -MAPE k If |<δ, the iteration of parameter calibration of the generalized travel cost function of the road segment ends and jumps to 6-5; if not, let k=k+1 and jump to S6-3.
[0127] S6-5, calibrate μ1 and μ2 of the path selection model, and set the internal parameter values {a} of the improved C-SPSA algorithm according to the value range of μ1 and μ2. p A p ,c p ,α p ,γ p The initial parameters of the path selection model are as follows;
[0128]
[0129] Among them, X ri ,i={1,2,3} are μ1 and μ2 of the path selection models for different clusters;
[0130] S6-6, Update the gain sequence: Generate step size a m and disturbance amplitude c mThis generates an n-dimensional random vector Δ, where each dimension of the vector is randomly generated by a Bernoulli ±1 distribution.
[0131] S6-7, Perturb the initial parameters, only perturbing the path selection model parameters within one cluster, while keeping the parameters in the remaining clusters unchanged. Input the perturbed parameters into the machine learning model and output the objective function value;
[0132]
[0133] Δ ri Let i = {1, 2, 3} be random vectors from different clusters. Since the random vectors are randomly generated by a Bernoulli ±1 distribution, the parameters within each cluster are subject to a perturbation amplitude c. m The effects are different. It is the path selection model parameters within different clusters plus the perturbation variable c m Δ ri The output objective function value, It is the path selection model parameters within different clusters minus the perturbation variable c. m Δ ri Output the objective function value;
[0134]
[0135] in, Choose an approximate gradient for the model parameters for the path. and These are the results of the objective function output by the machine learning model, c m Δ ri Let i = {1, 2, 3} be the perturbation variables of different clusters. The final approximate gradient only affects the elements within each cluster. The next iteration point is approximated based on the approximate gradient and the initial parameter values. Input the new iteration point into the machine learning model and determine the output objective function value and the iteration point X. m Does the difference in the objective function values meet the convergence accuracy? in, This is the maximum allowable error value. If it is satisfied, the path selection model parameter calibration iteration ends. If it is not satisfied, let m = m + 1 and jump to S6-6.
[0136] S6-7, input the parameters of the generalized cost function of the optimal road segment and the parameters of the optimal path selection model into the machine learning model, and determine whether the difference between the output objective function value and the objective function value of the previous optimal parameters meets the convergence accuracy. |MAPE n+1 -MAPE n|<θ, where θ is the maximum allowable error value. If this condition is met, the calibration ends. If not, the optimal path selection model parameters are fixed, and the process jumps to S6-3 to recalibrate the generalized travel cost function parameters for the road segment, n=n+1. The objective function result changes as follows: Figure 4 As shown.
[0137] Although the invention has been specifically shown and described in conjunction with preferred embodiments, those skilled in the art should understand that various changes in form and detail may be made to the invention without departing from the spirit and scope of the invention as defined in the appended claims, all of which shall be within the scope of protection of the invention.
Claims
1. A parameter calibration method for a large-scale road network traffic assignment model based on an improved C-SPSA, characterized in that, The method comprises the following steps: S1, obtaining attributes of a road section and attributes of start and end points; S2, establishing a path cost function and a path selection model based on large-scale road network characteristics, road section attributes and start and end point attributes; S3, classifying road section generalized travel cost function parameters and path selection model parameters based on the number of lanes of the road section, the distance between the start and end points and traffic travel demand; S4, applying mobile phone signaling to estimate initial values and value ranges of the path selection model parameters of different clusters based on the classification results of the path selection model; S5, establishing a traffic distribution model, training a machine learning model according to input parameters and objective function values of model distribution; S6, combining the machine learning model, and calibrating road section generalized travel cost function parameters and path selection model parameters based on an improved C-SPSA; The path cost is obtained by superimposing road section costs, and the function form is: wherein, is the generalized travel cost for OD pair rs on path k; c a is the generalized travel cost for link a; δ ak is the link-path incidence relation, 1 if link a is on path k, otherwise 0; The generalized travel cost of a road section is composed of the impedance and the travel cost of the road section, and the impedance of the road section is uniformly represented by a BPR function: where t a is the free-flow travel time of link a, in min; v a is the traffic volume allocated to link a, in pcu / h; C a is the capacity of link a, in pcu / h; a and β are the congestion coefficients in the BPR function, l a is the length of link a, in km, p is the unit length travel cost, in yuan / km; η is the monetary fee time conversion coefficient, and a, β, and p are the parameters to be calibrated in the generalized travel cost of the link. The model expression of the path selection model is: where P k is the probability of selecting path k; C k is the cost of path k; K rs is the set of paths on OD pair rs; μ1 and μ2 are parameters to be calibrated in the path selection model, S k is the correction term: where l a is the length of segment a; L k is the length of path k; Γ k is the set of segments of path k; δ aj = 1 if segment a is on path j, otherwise 0; C n is the set of paths; L Cn is the shortest path length on C n ; In S3, the parameters of the road section generalized travel cost function and the path selection model are classified, the road section generalized travel cost function uses different α, β and ρ for calculation according to the number of lanes of the road section, and the path selection model uses a K-means clustering method to divide all OD pairs into a specified number of clusters according to the distance between the start and end points and traffic travel demand, and different μ1 and μ2 are used for calculating the path selection probability between OD in different clusters.
2. The parameter calibration method for large-scale road network traffic assignment model based on improved C-SPSA according to claim 1, characterized in that, The road section attributes in S1 include the number of lanes, length, free-flow travel time and road section capacity of the road section, and the start and end point attributes include the regional centroid coordinates of the start and end points and the traffic travel demand between the start and end points.
3. The parameter calibration method for large-scale road network traffic assignment model based on improved C-SPSA according to claim 1, characterized in that, In S4, the path selection model parameters are estimated combined with mobile phone signaling data, the initial values and value ranges of the path selection model parameters of each cluster are extracted according to the classification results of the path selection model, and the initial values and value ranges of the path selection model parameters of each cluster are obtained combined with individual mobile phone signaling data; According to the data accuracy, different confidence intervals are used to draw circles with mobile phone signaling points as centers as their related physical regions DDR, to compensate for the error between the mobile phone signaling data and the real location, to allow multiple paths to correspond to the same mobile phone signaling point, and to calculate the probability of an traveler generating an actual mobile phone signaling point: In S5, a traffic distribution model is established, a machine learning model is trained according to input parameters and objective function values of model distribution, and the specific method is as follows: where, is the number of relevant OD pairs, is the probability of selecting OD pair s among all relevant OD pairs, assuming that the probability of selecting all relevant OD pairs is equal, is the number of relevant OD pairs, P n (i|p) is the measurement equation, δ ai = 1 if the DDR of mobile phone signaling point i intersects with link a, otherwise 0; I is the set of all mobile phone signaling points generated by an individual trip; d(i, a) represents the perpendicular distance between mobile phone signaling point i and link a that the DDR intersects with, P n (p|δ n (s); μ1, μ2) is the route choice model established by S2, δ n (s) is the set of paths between OD pairs, p is a path in the set of paths, and μ1 and μ2 are parameters in the route choice model to be estimated. According to the probability of the actual mobile phone signaling points generated by the traveler, the maximum likelihood estimation method MLE is used to estimate the route choice model parameters μ1, μ2.
4. The parameter calibration method for large-scale road network traffic assignment model based on improved C-SPSA according to claim 3, characterized in that, S5-1, a stochastic user average distribution model is established, and traffic travel demand between different OD is loaded onto a road network, namely: S5-2, road section generalized travel cost function parameters and path selection model parameters are randomly generated within the value range, path cost and path selection probability distribution between OD are determined, the randomly generated parameters are input into the stochastic user average distribution model established in S5-1, and the objective function is output according to the distribution flow and the actual flow of the road section, so as to realize the maximum coupling degree between the model distribution results and the actual results. where t a (w) is the average cost required for the travel section a, S k is the correction term in the route choice model, and θ is a non-negative correction parameter that describes the stochastic nature of the model; is the traffic flow on path k between OD pair rs, q rs is the traffic demand between OD pair rs; x a is the flow on section a, if section a is on path k between OD pair rs, then otherwise, it is 0; wherein, y represents the assigned flow on a link, n represents the number of links, i y represents the actual flow on a link, n represents the number of links; S5-3, according to the input parameters and the target function value assigned by the model, training the machine learning model, the machine learning model will take the parameters obtained by the calibration algorithm iteration as input, and the target function as output, and the calibration algorithm calculates the approximate gradient of the calibration parameters according to the target function output by the machine learning model, realizing the circulation between the calibration algorithm and the machine learning model.
5. The parameter calibration method for large-scale road network traffic assignment model based on improved C-SPSA according to claim 4, characterized in that, S6 combines the machine learning model to calibrate the link generalized travel cost function parameters and the route choice model parameters based on the improved C-SPSA, as follows: S6-1, determine the initial values of α, β and ρ in the link generalized travel cost function, and the initial values of the route choice model parameters are the parameter estimation results in S4; S6-2, calibrate the α, β, and ρ of the generalized travel cost function for the calibrated road segment, and set the internal parameter values {α} of the improved C-SPSA algorithm according to the range of values of α, β, and ρ. l A l ,c l ,α l ,γ l }, k=0, m=0, n=0, the parameters to be calibrated for the generalized travel cost function of the road segment are as follows: where X Li i = {1,2,3} are a, b and p of the link generalized travel cost function of different clusters. S6-3, update the gain sequence: Generate step a k And the disturbance amplitude c k , generate an n-dimensional random vector Δ, where each dimension of the vector is randomly generated by Bernoulli ±1 distribution; S6-4, perturb the initial parameters, only perturb the link generalized travel cost function parameters α, β and ρ in one cluster, and keep the parameters in the remaining clusters unchanged, input the perturbed parameters into the machine learning model, and output the target function value; Δ Li i = {1,2,3} are random vectors of different clusters, since Δ Li is a random vector following ±1 Bernoulli distribution, the parameters within each cluster are affected differently by the disturbance amplitude c k . is the generalized travel cost function parameter of the link within different clusters plus the disturbance variable c k Δ Li the output objective function value, is the generalized travel cost function parameter of the link within different clusters minus the disturbance variable c k Δ Li the output objective function value; wherein, is the approximate gradient of the generalized travel cost function parameters of the link, and are the objective function results output by the machine learning model, respectively, c k Δ Li , i = {1, 2, 3} are disturbance variables of different clusters, and the final approximate gradient only affects the elements within each cluster, and the next iteration point is approximated according to the approximate gradient and the initial parameter value, the new iteration point is input into the machine learning model, and it is judged whether the difference between the output objective function value and the objective function value of the iteration point X k satisfies the convergence precision |MAPE k+1 -MAPE k | < δ, if it does, the iteration of the link generalized travel cost function parameter calibration is ended, and it is jumped to 6-5, and if it does not, it is set that k = k + 1, and it is jumped to S6-3; S6-5, calibrate μ1 and μ2 of the path selection model, set the internal parameter values {a p ,A p ,c p ,α p ,γ p} of the improved C-SPSA algorithm according to the value range of μ1 and μ2, and the path selection model parameters to be calibrated are as follows; where X ri i = {1,2,3} are the path selection models of the different clusters μ1 and μ2; S6-6, update the gain sequence: Generate step a m And the disturbance amplitude c m , generate an n-dimensional random vector Δ, where each dimension of the vector is randomly generated by Bernoulli ±1 distribution; S6-7, perturb the initial parameters, only perturb the route choice model parameters in one cluster, and keep the parameters in the remaining clusters unchanged, input the perturbed parameters into the machine learning model, and output the target function value; Δ ri i = {1,2,3} are random vectors of different clusters, since Δ ri is a random vector subject to ±1 Bernoulli distribution, the parameters within each cluster are affected differently by the disturbance amplitude c m . is the path selection model parameter within different clusters plus the disturbance variable c m Δ ri the output objective function value, is the path selection model parameter within different clusters minus the disturbance variable c m Δ ri the output objective function value; wherein, is an approximate gradient of the path selection model parameters, and are objective function results of the machine learning model output, respectively, c m Δ ri , i = {1, 2, 3} are perturbation variables of different clusters, and the final approximate gradient only affects elements within each cluster, and the next iteration point is approximated according to the approximate gradient and the initial parameter value, X m+1 = X m - The new iteration point is input into the machine learning model, and it is determined whether the difference between the output objective function value and the objective function value of the iteration point X m satisfies the convergence precision, wherein, is the maximum error allowed value, if it is satisfied, the path selection model parameter calibration iteration is ended, and if it is not satisfied, m = m + 1 is allowed, and the process is jumped to S6-6. S6-7, input the optimal link generalized cost function parameters and the optimal path selection model parameters into the machine learning model, judge whether the difference between the output target function value and the target function value of the last optimal parameters satisfies the convergence precision, |MAPE n+1 -MAPE n |<θ, θ is the maximum error allowed value, if it is satisfied, end the calibration, if it is not satisfied, fix the optimal path selection model parameters, jump to S6-3, re-calibrate the link generalized travel cost function parameters, n=n+1.