Traffic flow simulation methods and systems, electronic devices, and storage media
By constructing a dynamic road network parameter set and a driver profile model, and combining the K-short circuit algorithm and a dual verification mechanism, the problems of path selection rules and driving behavior assumptions in existing traffic simulations are solved. This enables dynamic adjustment of traffic flow simulation and characterization of individual differences, thereby improving the credibility and accuracy of simulation results.
Patent Information
- Application Number
- CN202611166916.3
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2026-08-03
- Publication Date
- 2026-11-17
AI Technical Summary
Existing traffic simulation technologies rely on fixed route selection rules and uniform assumptions about driving behavior, making it difficult to reflect the real-time impact of dynamic changes in road network congestion on travelers' route decisions. They also lack characterization of individual differences, resulting in a significant deviation between simulated traffic flow and actual traffic flow, which reduces the credibility of simulation in engineering decision-making.
A basic parameter set for the road network in the target area is constructed. Combining the dynamic turning probability matrix and vehicle arrival distribution, a reasonable path library is generated using the K-short circuit algorithm. Path probability allocation is performed by combining the dynamic driver profile model. An optimized routing file is generated through double rationality verification. The turning constraint weights and path allocation probabilities are adjusted in real time until the simulated traffic fits the measured traffic.
It significantly improves the credibility of traffic flow simulation. Through the collaborative mechanism of dynamic response and closed-loop correction, it ensures that the simulation results meet the macroscopic observation constraints and restore the microscopic behavior mechanism, thereby improving the accuracy and reliability of engineering decisions.
Smart Images

Figure CN123116557A_ABST
Abstract
Description
Technical Field
[0001] This application belongs to the field of data simulation technology, and more specifically, relates to a traffic flow simulation method and system, electronic equipment, and storage medium. Background Technology
[0002] Traffic flow simulation refers to the technology of dynamically simulating the movement patterns of vehicles, driving behavior, road network structure, and control strategies in a real traffic system within a virtual digital environment. It uses microscopic (such as car-following lane changes), mesoscopic, or macroscopic models to present changes in traffic flow over time and space in a data-driven or visualized manner, thus reproducing complex traffic phenomena such as congestion, queuing, and signal timing without the need for actual construction or road closures.
[0003] The importance of traffic flow simulation lies in its ability to simulate real-world traffic conditions in the digital world with minimal trial-and-error costs, providing a scientific basis for urban traffic planning and management. It not only assists transportation departments in accurately diagnosing road network bottlenecks and optimizing traffic light timing schemes to significantly reduce vehicle delays, but also assesses the impact of new road construction or closures on the surrounding road network during the design phase. Simulation allows us to safely test emergency evacuation and control plans under severe weather, major accidents, or sudden surges in passenger flow, thereby improving daily traffic efficiency, reducing fuel waste and carbon emissions, and greatly enhancing the resilience and safety of urban transportation systems in the face of emergencies.
[0004] Existing traffic simulation technologies often rely on fixed route selection rules and uniform assumptions about driving behavior, making it difficult to reflect the real-time impact of dynamic changes in road network congestion on travelers' route decisions. At the same time, they lack effective characterization of individual differences, resulting in a large deviation between simulated traffic flow and actual traffic flow, which reduces the credibility of simulation in engineering decision-making. Summary of the Invention
[0005] The purpose of this application is to provide a traffic flow simulation method and system, electronic device, and storage medium to solve the problem that existing traffic simulation technologies often rely on fixed route selection rules and uniform driving behavior assumptions, making it difficult to reflect the real-time impact of dynamic changes in road network congestion on travelers' route decisions. At the same time, they lack effective characterization of individual differences, resulting in a large deviation between simulated traffic flow and actual traffic flow, which reduces the credibility of simulation in engineering decision-making.
[0006] A first aspect of this application provides a traffic flow simulation method, including: Construct a basic parameter set for the road network in the target area, which includes the dynamic turning probability matrix of intersections and the vehicle arrival distribution of each approach lane of the road network in the target area. The dynamic path length threshold is determined based on the real-time road network congestion level. The K-shortest-circuit algorithm is used to search for the effective path set of each origin-endpoint OD pair. The effective path set is then pruned according to the dynamic path length threshold to form a reasonable path library. By combining a dynamic driver profile model with a dynamic steering probability matrix, a reasonable path library, and vehicle arrival distribution, path probability allocation is performed under the condition of satisfying real-time steering ratio constraints, and a preliminary vehicle routing file is generated. The initial vehicle routing file undergoes dual rationality checks, including path length checks based on dynamic path length thresholds and path connectivity checks. Paths that fail the checks are iteratively removed and reallocated until an optimized routing file is generated. Output simulated traffic based on the optimized routing file, and calculate the GEH statistics between simulated traffic and measured traffic; Determine if the GEH statistic is greater than the preset GEH statistic. If so, adjust the turning constraint weights and path assignment probabilities, and return to the step of constructing the basic parameter set of the target road network. Otherwise, output the simulated traffic flow as the traffic flow simulation result.
[0007] A second aspect of this application provides a traffic flow simulation system, comprising: The construction module is used to construct the basic parameter set of the road network in the target area. The basic parameter set includes the dynamic turning probability matrix of the intersection and the vehicle arrival distribution of each approach lane of the road network in the target area. The determination module is used to determine the dynamic path length threshold based on the real-time road network congestion level, use the K-short circuit algorithm to search for the effective path set of each origin-endpoint OD pair, and prune the effective path set according to the dynamic path length threshold to form a reasonable path library. The generation module is used to combine the dynamic driver profile model with the dynamic steering probability matrix, the reasonable path library and the vehicle arrival distribution, and to perform path probability allocation under the condition of satisfying the real-time steering ratio constraint, and generate a preliminary vehicle routing file. The verification module is used to perform dual rationality verification on the initial vehicle routing file. The dual rationality verification includes path length verification based on dynamic path length threshold and path connectivity verification. Paths that fail the verification are iteratively eliminated and reallocated until an optimized routing file is generated. The calculation module is used to output simulated traffic based on the optimized routing file and to calculate the GEH statistics between the simulated traffic and the measured traffic. The judgment module is used to determine whether the GEH statistic is greater than the preset GEH statistic. If it is, the turning constraint weight and path assignment probability are adjusted, and the construction module is called. Otherwise, the simulated traffic flow is output as the traffic flow simulation result.
[0008] A third aspect of this application provides an electronic device, including a memory, a processor, and a computer program stored in the memory and running on the processor, wherein the processor executes the computer program to implement the steps of the traffic flow simulation method described above.
[0009] A fourth aspect of this application provides a computer-readable storage medium storing a computer program that, when executed by a processor, implements the steps of the traffic flow simulation method described above.
[0010] The beneficial effects of the traffic flow simulation method and system, electronic device, and storage medium provided in this application embodiment are as follows: In this embodiment, a simulation process combining dynamic response and closed-loop correction is constructed: First, the path search threshold is dynamically adjusted based on real-time congestion levels, and an adaptive reasonable path library is generated by combining K-short-circuit pruning; then, a driver profile model is incorporated to differentiate the allocation of steering ratios and path preferences to generate an initial route. Subsequently, the route undergoes dual iterative verification of connectivity and length, eliminating abnormal paths and reallocating traffic to ensure spatial continuity and path economy. Finally, the simulation output is compared with the measured traffic flow using GEH statistics. If the deviation exceeds the limit, the steering weights and allocation probabilities are adjusted in reverse, and the parameters are iterated again until they approximate the real flow state. This mechanism, due to its dynamic threshold mapping of the time-varying road network, its profile characterizing individual heterogeneity, and its closed-loop feedback for continuous self-calibration, ensures that the simulation conforms to both macroscopic observation constraints and restores microscopic behavioral mechanisms, significantly improving the credibility of engineering decisions. Attached Figure Description
[0011] To more clearly illustrate the technical solutions in the embodiments of this application, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0012] Figure 1 A flowchart illustrating a traffic flow simulation method provided in one embodiment of this application; Figure 2 A flowchart illustrating an overall process for a traffic simulation-based flow optimization method based on multi-path assignment and turning ratio constraints, provided as an embodiment of this application. Figure 3 A schematic diagram illustrating the coupling relationship between intersection turning constraints and path search, provided as an embodiment of this application; Figure 4 A software system architecture diagram provided in one embodiment of this application; Figure 5 A comparison chart of flow fitting curves in an example provided in an embodiment of this application; Figure 6 A structural block diagram of a traffic flow simulation system provided in one embodiment of this application; Figure 7 This is a schematic block diagram of an electronic device provided in an embodiment of this application. Detailed Implementation
[0013] In the following description, specific details such as particular system architectures and techniques are set forth for illustrative purposes and not for limitation, in order to provide a thorough understanding of the embodiments of this application. However, those skilled in the art will understand that this application may also be implemented in other embodiments without these specific details. In other instances, detailed descriptions of well-known systems, apparatuses, circuits, and methods have been omitted so as not to obscure the description of this application with unnecessary detail.
[0014] It is understood that in the embodiments of this application, data such as user information are involved. When the embodiments of this application are applied to specific products or technologies, user permission or consent is required, and the collection, use and processing of related data must comply with relevant laws, regulations and standards.
[0015] It should be noted that the terms "first," "second," etc., used in the specification, claims, and drawings of this application are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such use of data can be interchanged where appropriate so that the embodiments of this application described herein can be implemented in sequences other than those illustrated or described herein.
[0016] Before providing a further detailed description of the embodiments of this application, the nouns and terms involved in the embodiments of this application will be explained, and the nouns and terms involved in the embodiments of this application shall be interpreted as follows.
[0017] To make the objectives, technical solutions, and advantages of this application clearer, the following description will be provided in conjunction with the accompanying drawings and specific embodiments.
[0018] Reference manual attached Figure 1 The diagram shows a flowchart of a traffic flow simulation method provided in an embodiment of this application.
[0019] Reference manual attached Figure 2 The diagram shows an overall flowchart of a traffic simulation flow optimization method based on multi-path allocation and turning ratio constraints provided in an embodiment of this application.
[0020] Figure 2This paper presents the overall workflow of a traffic simulation-based flow optimization method based on multi-path assignment and turning ratio constraints. The process includes acquiring basic traffic data and preprocessing the road network, statistical analysis of entrances / exits and origin-destination (OD) information, path generation based on turning ratio constraints, K-shortest path calculation, route file generation, multi-path time constraint judgment, traffic simulation operation, and comparison and verification of simulation results with measured data. The model parameters and path planning rules are iteratively optimized until the accuracy requirements are met, ultimately completing model construction and flow analysis. Figure 2 As can be seen, this scheme constructs a closed-loop process for multi-path allocation, turning ratio constraints, traffic simulation, and feedback optimization. This not only fully reflects the vehicle path selection and intersection turning characteristics in complex traffic networks and improves the consistency between traffic flow allocation results and actual operating conditions, but also continuously corrects model errors through simulation verification, significantly improving the accuracy, stability, and engineering application value of the allocation results.
[0021] Reference manual attached Figure 3 The diagram illustrates the coupling relationship between intersection turning constraints and path search according to an embodiment of this application.
[0022] Figure 3 This paper illustrates the coupling relationship between intersection turning constraints and path search. First, a multi-OD path allocation model is established based on the road network topology. Then, turning ratio constraints (left turn, straight, right turn, etc.) are introduced for each approach lane at the intersection. During the K-shortest path search process, each candidate path undergoes a turning constraint compliance check, and only valid paths that meet the turning ratio requirements of each intersection are retained for traffic flow allocation. Figure 3 As can be seen, this scheme directly integrates intersection turning behavior into the path search process, realizing the integrated coupling of path generation and traffic flow constraints. This not only effectively avoids the shortcomings of traditional path search that ignores the actual traffic characteristics of intersections and improves the consistency between the generated path and the actual traffic operation pattern, but also enhances the authenticity, rationality and simulation accuracy of traffic flow allocation results.
[0023] Reference manual attached Figure 4 The diagram illustrates a software system architecture provided in one embodiment of this application.
[0024] Figure 4This paper illustrates the software system architecture of this solution and the collaborative relationships between its modules, including three core components: a Python script parameter integration and logic control module, a JTRRouter path allocation engine, and a SUMO traffic simulation engine. The Python script integrates parameters such as steering ratio, OD path library, and vehicle information, and calls JTRRouter to generate a routing file that meets the constraints. The generated routing file is then input into SUMO for traffic simulation, outputting traffic flow results for error analysis. Simultaneously, parameters are continuously adjusted and the model is iteratively optimized based on simulation feedback, forming a closed-loop processing flow of parameter configuration—path generation—traffic simulation—result feedback—parameter optimization. Figure 4 As can be seen, this solution deeply integrates path generation, traffic simulation, and model calibration through the collaboration of multiple software modules and automated data interaction. This not only reduces errors caused by manual intervention and data conversion and improves the efficiency of traffic flow modeling, but also enables continuous optimization of model parameters through feedback iteration, significantly improving the accuracy, stability, and engineering application capabilities of traffic flow assignment results.
[0025] Reference manual attached Figure 5 The diagram shows a comparison of flow fitting curves in an example provided by an embodiment of this application.
[0026] Figure 5 The figure shows a comparison of the fitting results between simulated and measured traffic flow in an example. With measured traffic flow as the x-axis and simulated traffic flow as the y-axis, the accuracy of the traffic flow allocation model is evaluated through scatter plot distribution, the ideal fitting line, and the ±15% error range. Simultaneously, the GEH statistic is used to quantitatively analyze the fitting quality of each detection point. As can be seen from the figure, most scatter plots are distributed near the ideal fitting line and within the ±15% error band, and the overall GEH statistic is relatively small, indicating that the traffic flow generated by this scheme has a high degree of consistency with the actual traffic flow. This result demonstrates that this scheme, through multi-path allocation, turning ratio constraints, and simulation feedback iterative optimization, can effectively improve the fitting accuracy, stability, and reliability of the traffic flow allocation model, providing more accurate and reliable simulation analysis results for traffic planning and traffic organization optimization.
[0027] The traffic flow simulation method provided in this application embodiment can be executed by an electronic device. The method may include: S1: Construct the basic parameter set of the road network in the target area, which includes the dynamic turning probability matrix of the intersection and the vehicle arrival distribution of each entrance lane of the road network in the target area.
[0028] In one possible implementation, the intersection is the intersection within the target area road network for which turning ratio survey data has been obtained. A dynamic turning probability matrix is used to characterize the real-time turning ratio constraints for each flow direction at the intersection. These real-time turning ratio constraints include the intersection's left-turn ratio, straight-ahead ratio, right-turn ratio, and U-turn ratio. S1 specifically includes: S101: Set up the entrance and exit ramps of the target area road network, and mark all entrance ramp IDs, exit ramp IDs and road segment IDs.
[0029] S102: Obtain the dynamic turning ratio of the intersection and establish the dynamic turning probability matrix of the intersection based on the dynamic turning ratio.
[0030] Methods for obtaining the dynamic turning ratio of an intersection include: calling a preset traffic information application interface to obtain intersection traffic flow data; using a pre-trained convolutional neural network / long short-term memory network model to automatically analyze the monitoring video stream to generate real-time turning data; or, when direct observation data is lacking, based on the inflow of each approach lane at the intersection. The total outflow is estimated using a pre-defined entropy maximization model to estimate the most likely turning ratio. The dynamic turning probability matrix of the intersection is pre-established with multiple sets of benchmarks based on different time periods, weather conditions, and regional congestion indices, and is adaptively adjusted according to real-time conditions during operation.
[0031] S103: Determine the vehicle arrival distribution, which includes the departure frequency and vehicle arrival time interval distribution of each entrance lane.
[0032] Specifically, the process first digitizes the road network topology, clearly identifying all entrance lanes, exit lanes, and road segments. Subsequently, the generation of the dynamic turning probability matrix does not rely on a single fixed survey, but rather integrates real-time traffic flow from external interfaces, automatic identification of video streams based on deep learning, and, in the case of missing data, uses an entropy maximization model to infer the most likely turning ratio from the total inflow and outflow volume. This acquisition method ensures reliable turning constraints under any data conditions. Simultaneously, the matrix pre-establishes multiple benchmark tables according to different time periods, weather conditions, and congestion indices. During runtime, it adaptively matches these tables based on current conditions, allowing the turning ratio to evolve in real-time with traffic conditions, rather than remaining statically unchanged. Based on this, the departure frequency and arrival interval distribution of each entrance lane are combined to characterize the temporal randomness of vehicle entry into the road network. This ensures accuracy when data is abundant and stability when data is sparse. The adaptive benchmark tables allow turning behavior to dynamically adjust with the external environment, transforming the basic parameter set from a static input into an active perception feedback system. This provides realistic, reliable initial conditions that are updated synchronously with traffic conditions for subsequent route allocation and traffic flow simulation.
[0033] S2: Determine the dynamic path length threshold based on the real-time road network congestion level, use the K-short circuit algorithm to search for the effective path set of each origin-endpoint OD pair, and prune the effective path set according to the dynamic path length threshold to form a reasonable path library.
[0034] In one possible implementation, S2 specifically includes: S201: Export all road segment IDs and corresponding road segment lengths in the target area road network, and construct the adjacency matrix of the target area road network based on the road segment lengths and the topological relationship of the target area road network.
[0035] S202: Use the K-short-circuit algorithm to search for the set of valid paths for the origin-endpoint (OD) pairs. The specific process for searching the set of valid paths is as follows: Step S202 1. Construct a generalized cost model for road segments based on queuing theory and generate a candidate path set. This involves assigning each directed road segment in the road network... Treat them as independent M / M / 1 queues. Define road segments. Real-time congestion level ,in Real-time traffic flow for the road segment For the traffic capacity of the road section, and According to the Pollazzek equation describing the mean and variance of dwell time within a queue in queuing theory. Khinchine formula, generalized cost of road segment It is given by the following formula: .
[0036] In the formula: —section The static physical length (unit: meter). —The first congestion penalty factor is used to control the impact of average additional queuing time. —The second congestion penalty coefficient is used to control the impact of queuing time volatility. and —Dimensionless quantities derived from the average queue length and the variance of queue length of queues M / M / 1, respectively. The first congestion penalty coefficient and the second congestion penalty coefficient can be set by the user.
[0037] The above formula shows that when When the value approaches 1, the generalized cost increases sharply due to waiting time and its uncertainty, thus naturally leading to avoidance of extremely congested road sections.
[0038] Next, in the space of all acyclic paths from O to D, paths are defined according to the canonical ensemble in statistical mechanics. The unnormalized probability weights are:
[0039] in, The preset temperature parameter is used to control the concentration of the weight distribution. The smaller the value, the more concentrated the weights are on the path with the lowest generalized cost. Using this weight, a biased random walk is used to generate... Paths as candidate set ( much greater than integers, for example In specific sampling, a forward sampling method is used. The backward algorithm calculates the occupancy probability of each edge. Starting from O each time, the probability of choosing the next edge is proportional to the occupancy probability of that edge, until D is reached, thus avoiding invalid walks.
[0040] Step S202 2: Construct a deterministic point process kernel matrix to integrate path quality and diversity.
[0041] To the candidate set Select those that have both high weights and significant differences in topological space. The process involves considering multiple paths and introducing a determinant-based point method. First, each path in the candidate set is calculated. Path length (number of road segments) and any two paths and Number of overlapping road segments Define path topological overlap. Construct a positive semi-definite kernel matrix. Its elements are: .
[0042] In the formula, —From step S202 1. Calculation path The unnormalized probability weights. — Represents the quality of the path. -path and The normalized overlap is equivalent to the inner product of the edge characteristic vectors corresponding to the two paths in the reproducing kernel Hilbert space.
[0043] The property of a determinant-based point process is that, for any subset of paths... The probability of it being selected is proportional to The determinant value is equal to the product of the selected path quality term and the square of the volume of the multidimensional parallel volume formed by the path eigenvectors. The larger the volume, the greater the topological difference between paths and the lower the redundancy.
[0044] Step S202 3: Based on the Schur complement-based determinant incremental greedy selection, output the set of valid paths. This needs to be done from the candidate set. The selected size is subset of Make Maximize. Utilizing the submodularity of the determinant function, a greedy strategy is employed: starting from the empty set... Initially, one path is selected in each iteration. Maximize the increment of the logarithmic determinant until the selected... A path.
[0045] Using the Schur complement formula for a block matrix, when given a selected set... Add path At that time, the analytical expression for this increment is: .
[0046] In the formula: —The set of currently selected paths. —Kernel Matrix Limited to Submatrices on. -Depend on Each path and candidate path A vector composed of kernel elements. — The inverse matrix. -path Its own quality items.
[0047] Increment Equal to path The logarithm of the residual norm of the eigenvectors in the orthogonal complement space of the subspace spanned by the selected path set is the largest value of which indicates that the path provides more additional independent information on the basis of the selected path set (i.e., the smaller the topological overlap with the set and the higher its own weight).
[0048] Repeatedly execute the greedy choice of the incremental parsing expression until... The final set of paths This is the set of valid paths output in this step. This set fully considers the queuing effect of real-time congestion and contains K fundamentally different low-generalized-cost paths, providing high-quality input for subsequent dynamic threshold pruning.
[0049] S203: Calculate the shortest path length of the origin-endpoint OD pair based on the adjacency matrix.
[0050] S204: Determine the dynamic extension coefficient based on the real-time road network congestion level, wherein the dynamic extension coefficient is positively correlated with the real-time road network congestion level.
[0051] The real-time road network congestion level is characterized by the ratio of real-time traffic flow to road segment capacity. The dynamic extension coefficient α(c) is an increasing function of the real-time road network congestion level c, and satisfies 1.1≤α(c)≤2.0.
[0052] S205: Determine the dynamic path length threshold based on the dynamic stretching coefficient, wherein the dynamic path length threshold is specifically the product of the shortest path length and the dynamic stretching coefficient.
[0053] S206: Retain paths in the valid path set that meet the dynamic path length threshold to obtain a reasonable path library.
[0054] It's important to note that this step generates multiple candidate paths for each origin-destination pair by constructing a road network topology adjacency matrix and running the K-shortest-circuit algorithm. Crucially, it doesn't use a fixed length upper limit. Instead, it dynamically calculates an extension coefficient based on real-time road network congestion levels. This coefficient increases as congestion worsens, adaptively widening or tightening the path length threshold according to traffic conditions. Only paths with lengths within this dynamic threshold are retained, thus forming a reasonable path library. This mechanism accurately simulates real-world travel behavior: when the road network is clear, travelers tend to choose the shortest or near-shortest path, and the threshold tightens to filter out redundant detours. Conversely, when congestion worsens, drivers accept longer detours to avoid congestion, and the threshold expands to accommodate more feasible alternative routes. The positive correlation between dynamic thresholds and real-time congestion ensures that the path selection set always matches the current road conditions, avoiding the drawbacks of static thresholds that may miss necessary detours during congestion or retain too many unreasonable long paths during smooth traffic. This achieves the best balance between computational efficiency and behavioral realism, providing a reasonable path space for subsequent path allocation that conforms to physical constraints and reflects the driver's actual perception.
[0055] S3: Combining the dynamic driver profile model, integrating the dynamic steering probability matrix, reasonable path library, and vehicle arrival distribution, path probability allocation is performed under the condition of satisfying real-time steering ratio constraints to generate preliminary vehicle routing files.
[0056] In one possible implementation, S3 specifically includes: S301: Establish a dynamic driver profile model, which classifies drivers into multiple driving behavior types and pre-sets corresponding route selection parameters for each driving behavior type and vehicle. The route selection parameters include route selection preference weights and dynamic extension coefficient adjustment factors.
[0057] S302: Input the dynamic steering probability matrix, reasonable path library, vehicle arrival distribution and path selection parameters into the route generation engine to perform path probability allocation for each vehicle.
[0058] During the path probability allocation process, when a vehicle is at the end node of the current road segment, the next road segment is randomly determined based on the dynamic turning probability matrix, and the cumulative path length is simultaneously checked to see if it exceeds the corresponding dynamic path length threshold. If it does not exceed the threshold, the search continues until the destination road segment is reached or the dynamic path length threshold is exceeded, at which point a preliminary vehicle routing file is generated.
[0059] The route generation engine can be an improved version of the jttrouter tool, which defines the turning probability of each road segment in the input stream file to implement behavioral constraints on vehicle route selection behavior.
[0060] It should be noted that this process integrates driver heterogeneity, real-time intersection turning constraints, and path rationality verification into the route generation engine. Specifically, the process is as follows: First, a dynamic driver profile model is established, classifying drivers into multiple behavior types and pre-setting differentiated path selection preference weights and extension coefficient adjustment factors for each type, significantly distinguishing between risk-taking and conservative drivers in terms of detour tendencies and path length tolerance. Then, the dynamic turning probability matrix, the rational path library, vehicle arrival distribution, and these individualized parameters are input into the route generation engine to assign path probabilities to each vehicle. During segment-by-segment route construction, each time a vehicle reaches the end of a segment, it randomly selects the next segment based on the real-time turning probability matrix of the current intersection. Simultaneously, the already traveled path length is continuously accumulated and compared with a dynamic path length threshold. If the threshold is not exceeded, the vehicle continues until it reaches its destination or exceeds the threshold, at which point the generation process terminates. Driver profiles allow different individuals to have different path acceptance and selection logic, dynamic turning probabilities ensure that each decision follows the actual traffic flow distribution observed at the intersection, and segment length verification ensures that the generated path is always within an economically reasonable range. The collaboration of these three elements enables the routing file to satisfy both macro-level turning ratio constraints and restore the randomness and personalization of micro-level driving decisions, thereby generating initial vehicle trajectories that are closer to the real traffic flow distribution.
[0061] S4: Perform dual validity checks on the initial vehicle routing file. The dual validity checks include path length checks based on dynamic path length thresholds and path connectivity checks. Paths that fail the checks are iteratively removed and reallocated until an optimized routing file is generated.
[0062] In one possible implementation, S4 specifically includes: S401: Perform path length verification and path connectivity verification.
[0063] Specifically, the path length verification involves checking whether the length of each path in the preliminary vehicle routing file meets the dynamic path length threshold of the corresponding origin-endpoint (OD) pair. If it does, the path length verification is considered successful; otherwise, the path length verification is considered unsuccessful.
[0064] Specifically, path connectivity verification is a path connectivity verification based on SUMO road network topology.
[0065] Optionally, when validating the route, a prediction of queue overflow at downstream intersections can be added. If the predicted queue length exceeds the physical capacity, the turning ratio in that direction is automatically limited, simulating the behavior of vehicles being forced to change lanes.
[0066] S402: Remove paths that fail any verification, and re-trigger path probability allocation and double rationality verification based on the reasonable path library of the origin-endpoint OD pairs corresponding to the removed paths, until the maximum number of iterations is reached, and output the optimized routing file.
[0067] Specifically, this process verifies, on the one hand, whether the cumulative length of each path is still within the allowable range of the dynamic threshold, and on the other hand, checks the spatial continuity of the paths based on the road network topology to ensure that there are no breaks or unreachable jumps. Paths that fail any verification are removed, and probability allocation and verification are retried from the reasonable path library corresponding to that origin and destination. This mechanism essentially acts as a quality filter for the simulation process, intercepting abnormal trajectories that may arise during probability allocation before the formal simulation. Crucially, it adds a forward-looking judgment on queue overflow at downstream intersections. When the predicted queue length approaches the physical capacity, it actively restricts the steering allocation in that direction, simulating the risk-avoidance behavior of detouring in real driving when encountering congestion. This closed-loop iteration is effective because the dual constraints of path length and connectivity exclude unreasonable trajectories from both economic rationality and spatial feasibility dimensions, while the queue overflow prediction further integrates the dynamic capacity constraints of the road network, preventing vehicles from blindly flooding into saturated road sections during the simulation. By repeatedly eliminating and redistributing until all routes pass, the physical consistency of the final routing file is ensured, and the risk of abnormal congestion or empty trajectories in subsequent simulations is significantly reduced, making the simulation output more stable and reliable in engineering applications.
[0068] S5: Output simulated traffic based on the optimized routing file, and calculate the GEH statistics between simulated traffic and measured traffic.
[0069] In one possible implementation, S5 specifically includes: S501: Import the optimized routing file into the micro traffic simulation engine and output the simulated traffic flow, which includes the turning flow of each approach lane at the intersection and the cross-sectional flow of the road segments associated with the intersection.
[0070] Optionally, the micro-traffic simulation engine can be the SUMO engine.
[0071] S502: Obtain the actual survey traffic flow or historical data corresponding to the intersection and the road segments associated with the intersection, as the measured traffic flow.
[0072] S503: Calculate the GEH statistic for the turning flow direction of each approach lane at the intersection to quantify the fitting deviation between the simulated flow and the measured flow. The specific calculation process of the GEH statistic is as follows: calculate the square of the difference between the simulated flow and the measured flow, multiply the square value by two, divide it by the sum of the simulated flow and the measured flow, and finally take the square root to obtain the GEH statistic.
[0073] The specific formula for calculating the GEH statistic is as follows: .in, This represents the GEH statistic. M and C These represent simulated flow rate and measured flow rate, respectively.
[0074] It's important to note that this step involves inputting the optimized routing file, which has undergone multiple validations, into the microscopic simulation engine to simulate the actual operation of vehicles within the road network, outputting key indicators such as intersection turning flow and road segment cross-sectional flow. Subsequently, the GEH statistic is introduced to quantitatively compare the simulation output with field surveys or historical measured flow rates direction-by-direction. GEH, as a goodness-of-fit index with adaptive characteristics to flow rate magnitude, effectively distinguishes the practical significance of absolute deviations at different flow levels. The same difference represents drastically different levels of credibility in low-flow and high-flow road segments, and this statistic uses its inherent nonlinear structure to reasonably scale this. The deeper value of this step lies in the fact that it doesn't simply present the simulation results and end there; it ensures that the model output goes beyond qualitative reasonableness, possessing a statistical basis that can be rigorously compared with real observation data, providing a clear, objective, and industry-recognized benchmark for subsequent closed-loop feedback adjustments.
[0075] S6: Determine whether the GEH statistic is greater than the preset GEH statistic. If so, adjust the turning constraint weight and path assignment probability, and return to step S1. Otherwise, output the simulated traffic flow as the traffic flow simulation result.
[0076] Among them, the steering constraint weight is a coefficient used to adjust the strength of each steering ratio constraint in the dynamic steering probability matrix.
[0077] It should be noted that those skilled in the art can set the size of the preset GEH statistic according to actual needs, and this invention does not limit this.
[0078] In one possible implementation, adjusting the steering constraint weights and path assignment probabilities in S6 specifically includes: With the goal of minimizing the GEH statistic, a genetic algorithm is used to adjust the turning constraint weights and path assignment probabilities.
[0079] Specifically, the adjustment process involves: first, establishing a deterministic coupled chromosome representation to eliminate independent probability variables. The genetic algorithm no longer treats path assignment probabilities as independent genes, but instead has each individual encode only the turning constraint weights. (from the road section) to section of road (The turning penalty value). By converting it into a transition probability. Construct a matrix The path allocation probability is calculated directly from the weights according to formula (1), thereby compressing the search space and ensuring the inherent compatibility between the turning constraints and the path probabilities.
[0080] Formula (1): ,in, :OD to the second The probability of path assignment. : The transition matrix, whose elements For the section to section of road The turning probability is determined by the turning constraint weights. pass definition( This is a discrete parameter that plays a crucial adjusting role in the calculation of steering probability, determining the sensitivity of vehicle selection behavior to changes in steering weight. When this parameter is large, the probability distribution will be highly concentrated on the steering with the smallest weight, making the path selection approach deterministic optimality; while when the value is small, the distribution becomes more uniform, significantly enhancing the randomness and exploratory nature of the selection, thus enabling a nuanced simulation of the differentiated tolerance to detour costs for different driving styles, from aggressive driving to conservative following (this parameter can be set manually). The set of feasible simple paths between the OD pairs. :from Remove path The required submatrix is obtained after all rows and columns have been rotated. :and Identity matrices of the same order The determinant is a matrix. Then, a combined queue truncation is introduced, replacing GEH with a combined queue GEH as the fitness measure. The original GEH statistic did not consider the flow truncation caused by bottleneck queue overflow; this step corrects it to the combined queue GEH. By using a binomial combination to truncate the expected calculation model through traffic flow, the optimization objective can be made closer to the real capacity-constrained road network.
[0081] Formula (2): .in, .in, Road section The combined queue GEH value (total fitness is the sum of all road segments). Road section The observed flow rate Road section The set of paths :path The ideal allocation of traffic, of which For OD needs, As given by formula (1), :path The combined cutoff pass rate, :path Queue capacity (maximum number of vehicles that can be accommodated) at bottleneck turns. The independent choice probability of bottleneck shift is determined by... The aggregation yields (i.e., the sum of the probabilities of the corresponding paths for that turn). Combinations , representing the number of combinations of selecting k elements from n elements. Then, a determinant-combination hybrid mutation operator is designed to guide the genetic algorithm for efficient search. In addition to the standard crossover operation, the mutation operator shown in formula (3) is introduced. The mutation amount is determined by the elements of the inverse matrix of the transition matrix (derived from the determinant derivative). The product of the overflow probability and the combined overflow probability constitutes the following: when the overflow probability of a certain direction's queue is high (i.e., the binomial cumulative probability is low), the variation amplitude is automatically amplified. The direction is controlled by the elements of the inverse matrix, which promotes the improvement of the overall network connectivity.
[0082] Formula (3): .in, : Applying weights to steering constraints The increment of variation on, The variable learning rate (or step size) controls the adjustment magnitude of the turning constraint weights in each iteration of a genetic algorithm. It determines the step size of the weight parameter updates: too large a step size may cause severe oscillations in the optimization process or even skip the optimal solution, while too small a step size will result in extremely slow convergence and a tendency to get trapped in local suboptimal solutions. Therefore, its role is to balance convergence accuracy and convergence speed in the parameter space. By adjusting the scale of each mutation, it guides the optimization process to smoothly and efficiently approach the globally optimal parameter configuration that minimizes the simulation and experimental errors. This step size can be customized. : Fundamental matrix The Line 1 Column elements reflect the road segment to section of road Global path dependency strength The derivative of the transition probability with respect to the weights can be expressed as: The Logit form is explicitly calculated. The expected number of vehicles to reach this turn per unit time. To correspond to the queue capacity, : Binomial cumulative distribution value, i.e., the probability of turning without overflowing. The entire set of parentheses represents the overflow probability, used to adjust the intensity of variation. Combinations .
[0083] It should be noted that this process compares the GEH statistic with a preset threshold. If the deviation exceeds the limit, the genetic algorithm automatically adjusts the steering constraint weights and path assignment probabilities with the goal of minimizing the statistic. Then, it returns to the initial steps and re-executes the complete parameter construction, path generation, and verification process. If the deviation is within an acceptable range, the current simulated traffic flow is output as the final result. By continuously adjusting the strength of the steering constraints and the probability distribution of path selection, the simulation output gradually converges to the measured data until the accuracy requirements are met. This ensures that the simulation model not only structurally reproduces traffic logic but also withstands the test of real data numerically, improving the efficiency and objectivity of simulation calibration.
[0084] In practical applications, the entire traffic flow simulation process first constructs a basic parameter system that reflects real traffic conditions, using road network topology, vehicle arrival patterns, and dynamic turning constraints at intersections as the basic inputs for the simulation. Then, candidate paths are generated based on real-time traffic conditions, balancing toll costs and route diversity. A dynamic path selection mechanism retains a set of reasonable paths that conform to actual driving behavior characteristics. On this basis, driver behavior differences, turning constraints, and path selection probabilities are coupled and modeled to generate vehicle routes that conform to actual traffic patterns. These routes undergo multiple checks for path rationality, spatial connectivity, and traffic operation constraints, continuously eliminating abnormal paths and redistributing traffic flow. Finally, the optimized routes are input into the traffic simulation model for fitting analysis with measured traffic flow. Based on the fitting results, turning constraints and path allocation strategies are continuously adjusted, forming a closed-loop optimization mechanism encompassing parameter updates, path optimization, traffic simulation, result evaluation, and feedback correction. This scheme integrates real-time traffic conditions, intersection turning behavior, driver travel preferences, and simulation feedback to ensure that path generation always conforms to actual traffic operation patterns. Vehicle flow direction can be dynamically adjusted according to traffic conditions. At the same time, the feedback mechanism continuously corrects model errors, making the simulation results gradually approach the real traffic flow distribution. This can effectively reduce path allocation deviations and traffic loss phenomena, and significantly improve the realism, stability, fitting accuracy, and environmental adaptability of traffic flow simulation.
[0085] In this embodiment, a simulation process combining dynamic response and closed-loop correction is constructed: First, the path search threshold is dynamically adjusted based on real-time congestion levels, and an adaptive reasonable path library is generated by combining K-short-circuit pruning. Then, a driver profile model is incorporated to differentiate the allocation of steering ratios and path preferences, generating an initial route. Subsequently, the route undergoes dual iterative verification of connectivity and length, eliminating abnormal paths and reallocating traffic to ensure spatial continuity and path economy. Finally, the simulation output is compared with the measured traffic flow using GEH statistics. If the deviation exceeds the limit, the steering weights and allocation probabilities are adjusted in reverse, and the parameters are iterated again until they approximate the real flow state. This mechanism, due to its dynamic threshold mapping of the time-varying road network, its profile characterizing individual heterogeneity, and its closed-loop feedback for continuous self-calibration, ensures that the simulation conforms to both macroscopic observation constraints and restores microscopic behavioral mechanisms, significantly improving the credibility of engineering decisions.
[0086] Based on the same inventive concept, this application also provides a traffic flow simulation system for implementing the traffic flow simulation method described above. The solution provided by this device is similar to the implementation described in the above method; therefore, the specific limitations of the one or more traffic flow simulation system embodiments provided below can be found in the limitations of the traffic flow simulation method described above, and will not be repeated here.
[0087] This application provides a traffic flow simulation system, such as... Figure 6 As shown, the traffic flow simulation system 20 includes: Module 201 is used to construct the basic parameter set of the road network in the target area. The basic parameter set includes the dynamic turning probability matrix of the intersection and the vehicle arrival distribution of each approach lane of the road network in the target area. The determination module 202 is used to determine the dynamic path length threshold based on the real-time road network congestion level, use the K-short circuit algorithm to search for the effective path set of each origin-endpoint OD pair, and prune the effective path set according to the dynamic path length threshold to form a reasonable path library. The generation module 203 is used to combine the dynamic driver profile model with the dynamic steering probability matrix, the reasonable path library and the vehicle arrival distribution, and to perform path probability allocation under the condition of satisfying the real-time steering ratio constraint, and generate a preliminary vehicle routing file. The verification module 204 is used to perform dual rationality verification on the preliminary vehicle routing file. The dual rationality verification includes path length verification based on dynamic path length threshold and path connectivity verification. Paths that fail the verification are iteratively eliminated and reallocated until an optimized routing file is generated. The calculation module 205 is used to output simulated traffic based on the optimized routing file and calculate the GEH statistics between the simulated traffic and the measured traffic. The judgment module 206 is used to determine whether the GEH statistic is greater than the preset GEH statistic. If so, the turning constraint weight and path assignment probability are adjusted, and the construction module 201 is called. Otherwise, the simulated traffic flow is output as the traffic flow simulation result.
[0088] See Figure 7 , Figure 7 This is a schematic block diagram of an electronic device provided according to an embodiment of this application. Figure 7 The electronic device 300 in this embodiment may include one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The processors 301, input devices 302, output devices 303, and memories 304 communicate with each other via a communication bus 305. The memories 304 store computer programs, including program instructions. The processors 301 execute the program instructions stored in the memories 304. Specifically, the processors 301 are configured to invoke the program instructions to perform the functions of each module / unit in the above-described device embodiments, for example... Figure 6 The module shown comprises: 201, 202, 203, 204, 205, and 206.
[0089] It should be understood that, in the embodiments of this application, the processor 301 may be a central processing unit (CPU), but it may also be other general-purpose processors, digital signal processors (DSPs), application-specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor.
[0090] Input device 302 may include a touchpad, a fingerprint sensor (for collecting the user's fingerprint information and fingerprint orientation information), a microphone, etc., and output device 303 may include a display (LCD, etc.), a speaker, etc.
[0091] The memory 304 may include read-only memory and random access memory, and provides instructions and data to the processor 301. A portion of the memory 304 may also include non-volatile random access memory. For example, the memory 304 may also store device type information.
[0092] In specific implementations, the processor 301, input device 302, and output device 303 described in the embodiments of this application can execute the implementation method described in the traffic flow simulation method provided in the embodiments of this application, or they can execute the implementation method of the device described in the embodiments of this application, which will not be repeated here.
[0093] In another embodiment of this application, a computer-readable storage medium is provided. This computer-readable storage medium stores a computer program, which includes program instructions. When executed by a processor, the program instructions implement all or part of the processes in the methods described above. Alternatively, the computer program can instruct related hardware to implement these processes. The computer program can be stored in a computer-readable storage medium, and when executed by a processor, it can implement the steps of the various method embodiments described above. The computer program includes computer program code, which can be in the form of source code, object code, executable files, or certain intermediate forms. The computer-readable medium can include any entity or device capable of carrying computer program code, a recording medium, a USB flash drive, a portable hard drive, a magnetic disk, an optical disk, a computer memory, a read-only memory (ROM), a random access memory (RAM), an electrical carrier signal, a telecommunication signal, and a software distribution medium, etc.
[0094] The computer-readable storage medium can be an internal storage unit of the device in any of the foregoing embodiments, such as the device's hard drive or memory. The computer-readable storage medium can also be an external storage device of the device, such as a plug-in hard drive, Smart Media Card (SMC), Secure Digital (SD) card, Flash Card, etc., provided on the device. Furthermore, the computer-readable storage medium can include both internal and external storage units of the device. The computer-readable storage medium is used to store computer programs and other programs and data required by the device. The computer-readable storage medium can also be used to temporarily store data that has been output or will be output.
[0095] Those skilled in the art will recognize that the modules / units and algorithm steps of the various examples described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of the various examples have been generally described in terms of functionality in the foregoing description. Whether these functions are implemented in hardware or software depends on the specific application and design constraints of the technical solution. Those skilled in the art can use different methods to implement the described functions for each specific application, but such implementations should not be considered beyond the scope of this application.
[0096] Those skilled in the art will clearly understand that, for the sake of convenience and brevity, the specific working process of the devices and units described above can be referred to the corresponding process in the foregoing method embodiments, and will not be repeated here.
[0097] In the embodiments provided in this application, it should be understood that the disclosed devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For instance, the division of modules / units is only a logical functional division, and in actual implementation, there may be other division methods. For example, multiple modules, units, or components may be combined or integrated into another system, or some features may be ignored or not executed. In addition, the mutual coupling or direct coupling or communication connection shown or discussed may be indirect coupling or communication connection through some interfaces or modules / units, or it may be an electrical, mechanical, or other form of connection.
[0098] The modules / units described as separate components may or may not be physically separate. Similarly, the components shown as modules / units may or may not be physical modules / units; they may be located in one place or distributed across multiple network modules / units. Some or all of the modules / units can be selected to achieve the purpose of the embodiments of this application, depending on actual needs.
[0099] Furthermore, the functional modules / units in the various embodiments of this application can be integrated into one processing module / unit, or each module / unit can exist physically separately, or two or more modules / units can be integrated into one module / unit. The integrated modules / units described above can be implemented in hardware or in the form of software functional modules / units.
[0100] The above are merely specific embodiments of this application, but the scope of protection of this application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in this application, and these modifications or substitutions should all be covered within the scope of protection of this application. Therefore, the scope of protection of this application should be determined by the scope of the claims.
Claims
1. A traffic flow simulation method, characterized in that, The methods include: Construct a basic parameter set for the road network of the target area, wherein the basic parameter set includes the dynamic turning probability matrix of the intersection and the vehicle arrival distribution of each entrance lane of the road network of the target area; The dynamic path length threshold is determined based on the real-time road network congestion level. The K-shortest-circuit algorithm is used to search for the effective path set of each origin-endpoint (OD) pair. The effective path set is then pruned according to the dynamic path length threshold to form a reasonable path library. By combining the dynamic driver profile model with the dynamic steering probability matrix, the reasonable path library, and the vehicle arrival distribution, path probability allocation is performed under the condition of satisfying the real-time steering ratio constraint to generate a preliminary vehicle routing file. The preliminary vehicle routing file is subjected to dual rationality checks, including path length checks based on the dynamic path length threshold and path connectivity checks. Paths that fail the checks are iteratively eliminated and reallocated until an optimized routing file is generated. The simulated traffic is output based on the optimized routing file, and the GEH statistics between the simulated traffic and the measured traffic are calculated. Determine whether the GEH statistic is greater than the preset GEH statistic. If so, adjust the turning constraint weight and path assignment probability, and return to the step of constructing the basic parameter set of the target road network. Otherwise, output the simulated traffic flow as the traffic flow simulation result.
2. The traffic flow simulation method as described in claim 1, characterized in that, The intersection is the intersection within the target area road network for which turning ratio survey data has been obtained; the dynamic turning probability matrix is used to characterize the real-time turning ratio constraints for each flow direction at the intersection; wherein, the real-time turning ratio constraints include the intersection's left-turn ratio, intersection's straight-ahead ratio, intersection's right-turn ratio, and intersection's U-turn ratio; the basic parameter set for constructing the target area road network includes the dynamic turning probability matrix of the intersection and the vehicle arrival distribution of each approach lane of the target area road network, specifically including: Set up the entrance and exit access roads of the road network in the target area, and mark all entrance road IDs, exit road IDs and road segment IDs; Obtain the dynamic turning ratio of the intersection, and establish the dynamic turning probability matrix of the intersection based on the dynamic turning ratio; The vehicle arrival distribution is determined, which includes the departure frequency and vehicle arrival time interval distribution of each entrance lane.
3. The traffic flow simulation method as described in claim 2, characterized in that, The process involves determining a dynamic path length threshold based on real-time road network congestion, using the K-shortest-circuit algorithm to search for effective path sets for each origin-destination (OD) pair, and pruning these effective path sets according to the dynamic path length threshold to form a reasonable path library. Specifically, this includes: Export all road segment IDs and corresponding road segment lengths in the target area road network, and construct the adjacency matrix of the target area road network based on the road segment lengths and the topological relationship of the target area road network; The K-short-circuit algorithm is used to search for the set of valid paths for the origin-endpoint OD pair; Calculate the shortest path length of the origin-endpoint OD pair based on the adjacency matrix; Based on the real-time road network congestion level, a dynamic extension coefficient is determined, wherein the dynamic extension coefficient is positively correlated with the real-time road network congestion level; The dynamic path length threshold is determined based on the dynamic stretching coefficient, wherein the dynamic path length threshold is specifically the product of the shortest path length and the dynamic stretching coefficient; The paths in the set of valid paths that are less than the dynamic path length threshold are retained to obtain the reasonable path library.
4. The traffic flow simulation method as described in claim 1, characterized in that, The process of combining the dynamic driver profile model with the dynamic steering probability matrix, the reasonable path library, and the vehicle arrival distribution, and allocating path probabilities under the condition of satisfying the real-time steering ratio constraint, generates a preliminary vehicle routing file, specifically including: The dynamic driver profile model is established, and the driver is divided into multiple driving behavior types through the dynamic driver profile model. Corresponding path selection parameters are pre-set for the vehicle to which each driving behavior type belongs. The path selection parameters include path selection preference weight and dynamic stretch coefficient adjustment factor. The dynamic steering probability matrix, the reasonable path library, the vehicle arrival distribution, and the path selection parameters are input into the route generation engine to perform path probability allocation for each vehicle. During the path probability allocation process, when a vehicle is located at the end node of the current road segment, the next road segment is randomly determined according to the dynamic turning probability matrix, and the cumulative path length is simultaneously checked to see if it exceeds the corresponding dynamic path length threshold. If it does not exceed the threshold, the search continues until the destination road segment is reached or the dynamic path length threshold is exceeded, and the preliminary vehicle routing file is generated.
5. The traffic flow simulation method as described in claim 1, characterized in that, The preliminary vehicle routing file undergoes dual validity checks, including path length checks based on the dynamic path length threshold and path connectivity checks. Paths that fail the checks are iteratively removed and reallocated until an optimized routing file is generated. Specifically, this includes: Perform the path length check and the path connectivity check; Specifically, the path length verification involves checking whether the length of each path in the preliminary vehicle routing file meets the dynamic path length threshold of the corresponding origin-endpoint (OD) pair. If it does, the path length verification is determined to be successful; otherwise, the path length verification is determined to be unsuccessful. Specifically, the path connectivity verification is a path connectivity verification based on the SUMO road network topology. Paths that fail any verification are removed, and path probability allocation and double rationality verification are retried based on the reasonable path library of the origin-endpoint OD pairs corresponding to the removed paths, until the maximum number of iterations is reached, and the optimized routing file is output.
6. The traffic flow simulation method as described in claim 1, characterized in that, The step of outputting simulated traffic based on the optimized routing file and calculating the GEH statistics between the simulated traffic and the measured traffic specifically includes: The optimized routing file is imported into the micro traffic simulation engine, and the simulated traffic flow is output. The simulated traffic flow includes the turning flow of each approach lane of the intersection and the cross-sectional flow of the road segments associated with the intersection. Obtain the actual survey traffic flow or historical data corresponding to the intersection and the road segment associated with the intersection, and use it as the measured traffic flow; The GEH statistic for the turning flow direction of each approach lane at the intersection is calculated to quantify the fitting deviation between the simulated flow rate and the measured flow rate. Specifically, the calculation process of the GEH statistic is as follows: calculate the square of the difference between the simulated flow rate and the measured flow rate, multiply the square value by two, divide it by the sum of the simulated flow rate and the measured flow rate, and finally take the square root to obtain the GEH statistic.
7. The traffic flow simulation method as described in claim 1, characterized in that, The step of determining whether the GEH statistic is greater than the preset GEH statistic, and if so, adjusting the turning constraint weights and path assignment probabilities, and returning to the step of constructing the basic parameter set of the target road network; otherwise, using the simulated traffic flow as the adjusted turning constraint weights and path assignment probabilities in the traffic flow simulation result output, specifically includes: With the goal of minimizing the GEH statistic, a genetic algorithm is used to adjust the steering constraint weights and the path assignment probabilities.
8. A traffic flow simulation system, characterized in that, include: The construction module is used to construct a basic parameter set of the road network in the target area, wherein the basic parameter set includes the dynamic turning probability matrix of the intersection and the vehicle arrival distribution of each entrance lane of the road network in the target area; The determination module is used to determine the dynamic path length threshold based on the real-time road network congestion level, use the K-short circuit algorithm to search for the effective path set of each origin-endpoint OD pair, and prune the effective path set according to the dynamic path length threshold to form a reasonable path library. The generation module is used to combine the dynamic driver profile model with the dynamic steering probability matrix, the reasonable path library and the vehicle arrival distribution, and perform path probability allocation under the condition of satisfying the real-time steering ratio constraint to generate a preliminary vehicle routing file. The verification module is used to perform dual rationality verification on the preliminary vehicle routing file. The dual rationality verification includes path length verification based on the dynamic path length threshold and path connectivity verification. Paths that fail the verification are iteratively eliminated and reallocated until an optimized routing file is generated. The calculation module is used to output simulated traffic based on the optimized routing file and calculate the GEH statistics between the simulated traffic and the measured traffic. The judgment module is used to determine whether the GEH statistic is greater than the preset GEH statistic. If so, the turning constraint weight and path assignment probability are adjusted, and the process returns to step S1. Otherwise, the simulated traffic flow is output as the traffic flow simulation result.
9. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that, When the processor executes the computer program, it implements the steps of the method as described in any one of claims 1 to 7.
10. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it implements the steps of the method as described in any one of claims 1 to 7.
