Mixed traffic flow simulation method and system based on Vissim attribute modification

By using the attribute modification function and external call programs in the Vissim simulation software, the optimization speed follow-up model and the creation of user-defined attributes are solved, and the problem of large errors and slow speeds of optimization speed follow-up model simulation in the existing technology is solved, and high-precision and efficient multi-follow model hybrid traffic flow simulation is achieved.

CN118036316BActive Publication Date: 2025-03-25SHANDONG UNIV
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410229280.7
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2024-02-29
Publication Date
2025-03-25
Estimated Expiration
2044-02-29

AI Technical Summary

Technical Problem

It is difficult for the prior art to efficiently realize the simulation of the optimized speed-like follow-up model through Vissim simulation software, especially in the scenario where networked autonomous driving vehicles and artificial driving vehicles are mixed traffic flows, traditional methods have problems such as large simulation errors and slow simulation speeds.

Method used

By using the property modification function inside the Vissim simulation software, combined with a simple external call program, the speed following model is decomposed to the optimal speed function and speed difference function, and corresponding user-defined attributes are created to realize the hybrid traffic flow simulation of large-scale high-precision multi-stalking models based on user needs.

Benefits of technology

This method significantly reduces the occupation of computer resources, increases the operating frequency, reduces simulation errors, improves simulation speed, and realizes high-precision multi-surge model hybrid traffic flow simulation.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN118036316B_ABST
    Figure CN118036316B_ABST
Patent Text Reader

Abstract

The invention discloses a mixed traffic flow simulation method and system based on Vissim attribute modification, and relates to the technical field of traffic simulation. The method comprises the following steps: modeling vehicles corresponding to an optimized speed following model to be simulated; constructing a mixed traffic flow simulation road network model based on a multi-following model according to simulation information and in combination with a newly-created vehicle model, and configuring initial vehicle flow parameters; decomposing the optimized speed following model into an optimal speed function and a speed difference function, and creating the optimal speed function, the speed difference function, the acceleration calculation value and the speed calculation value user-defined attributes; simulating the road network model with the reciprocal of the simulation step length as the operation frequency of attribute modification until the simulation is finished, and in each step length, retrieving vehicle attribute parameters, combining user-defined attributes, calculating the vehicle speed and expected speed of the next step length, overwriting through an attribute modification instruction, completing the simulation of the next step length, and realizing the simulation of mixed traffic flows of large-scale and high-precision multi-following models.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of traffic simulation, and in particular to a mixed traffic flow simulation method and system based on Vissim attribute modification. Background Art

[0002] Vissim simulation software is a traffic simulation software tool that integrates road traffic, public transportation, and pedestrian simulation. It can not only accurately simulate various traffic elements of the road network, but also output a variety of traffic data evaluations. It is a popular micro-simulation modeling software in traffic research. The built-in following model of Vissim simulation software is the Wiedemann model, which is a driver's physiological-psychological following model that reflects the following distance between two vehicles. It has a good effect when simulating manually driven vehicles. With the rapid development of autonomous driving technology and the Internet of Vehicles, the research on modeling of networked autonomous driving vehicles and mixed traffic flows of networked autonomous driving vehicles and manually driven vehicles is growing.

[0003] At present, the modeling of connected autonomous vehicles is usually carried out by expanding and deriving the optimized speed following model (OV, GF, FVD and other models). Among them, the optimized speed following model is a model that describes the following phenomenon in traffic flow by determining the optimal speed of the vehicle through parameters such as the headway, while considering factors such as the speed of the following vehicle and the speed difference between the following vehicle and the leading vehicle. Its dependent variable is the acceleration of the following vehicle. Vissim simulation software is used to simulate the mixed traffic flow of connected autonomous vehicles and manually driven vehicles. The manually driven vehicles in the traffic flow can be described by the Wiedemann model built into Vissim, while the connected autonomous vehicles can be described by the optimized speed following model.

[0004] Since the built-in Wiedemann model of the Vissim system is only applicable to describing manually driven vehicles, the simulation of the car-following of connected autonomous vehicles requires the use of a user-designed, non-system-built-in optimized speed-following model. Since the dependent variable of the optimized speed-following model is the acceleration of the car-following vehicle, and the Vissim simulation software does not allow the user to directly modify the acceleration parameters of the simulated vehicle through external calls during the simulation, it is difficult to implement the simulation of the optimized speed-following model through the traditional COM port external call method.

[0005] At present, the best solution to achieve the simulation of the optimized speed-following model through the Vissim simulation software is to use the "External Driver Interface (EDM)" service of the API module in the software, that is, through joint simulation with external software, one or more vehicles in the road network adopt the user control algorithm to achieve the simulation of the user-following model. However, this method is mostly used by car companies to simulate and test the autonomous driving control algorithms they have developed, which increases the simulation cost and operation difficulty.

[0006] If the simulation of the optimized speed-following model is realized by the traditional COM port external call method on the basis of eliminating the influence of the Wiedemann model, since the Vissim simulation software only allows users to modify the vehicle's speed and expected speed rather than the acceleration during the simulation process, users need to use the single-step simulation method. During the software simulation process, the speed, head spacing, and speed difference with the front vehicle of the vehicle using the optimized speed-following model are read at a certain frequency. Based on the read data, the acceleration of these vehicles is calculated in the external call program through the optimized speed model, and then the corresponding speed at the next moment is calculated, and the vehicle speed is modified through the COM port. The simulation of the user's following model is realized by performing the above-mentioned reading-external call program calculation-modification method in each operation cycle.

[0007] Since the above method requires a large amount of data interaction in each operation cycle when the Vissim simulation software and the external calling program are jointly simulated, the operation frequency of the external calling program cannot reach a high level due to the occupation of computer resources, and this frequency directly affects the accuracy of the simulation. For the scenario of mixed traffic flow simulation of multiple following models, the optimized speed following model simulated by this method has a large error and a slow simulation speed. Summary of the invention

[0008] In order to solve the deficiencies of the above-mentioned prior art, the present invention provides a mixed traffic flow simulation method and system based on Vissim attribute modification, which utilizes the attribute modification function within the Vissim simulation software and combines it with a simple external calling program to realize the simulation of large-scale, high-precision multi-following model mixed traffic flow based on user needs, with easy operation and low cost.

[0009] In a first aspect, the present invention provides a mixed traffic flow simulation method based on Vissim attribute modification.

[0010] A mixed traffic flow simulation method based on Vissim attribute modification, comprising:

[0011] In the Vissim simulation software, a vehicle corresponding to the optimized speed following model to be simulated is modeled;

[0012] According to the simulation information and the newly built vehicle model, a mixed traffic flow simulation road network model based on the multi-following model is constructed, and the initial traffic flow parameters are configured;

[0013] The optimized speed following model is decomposed into the optimal speed function and the speed difference function, and four user-defined attributes, namely the optimal speed function, the speed difference function, the acceleration calculation value and the speed calculation value, are created;

[0014] The reciprocal of the Vissim simulation step is used as the operation frequency of the attribute modification, and the road network model simulation within the set time period is performed until the simulation ends; wherein, at each step, the vehicle attribute parameters are queried and retrieved, and the created user-defined attributes are calculated and assigned, and the speed and expected speed of the vehicle in the next step are calculated based on the attribute parameters and the user-defined attributes, and the speed and expected speed are overwritten through the attribute modification instruction to complete the simulation of the next step.

[0015] In a second aspect, the present invention provides a hybrid traffic flow simulation system based on Vissim attribute modification.

[0016] A hybrid traffic flow simulation system based on Vissim attribute modification is implemented based on Vissim simulation software and an external calling program, wherein the Vissim simulation software includes:

[0017] A vehicle model building module is used to model the vehicle corresponding to the optimized speed following model to be simulated in the Vissim simulation software;

[0018] The road network model building module is used to build a mixed traffic flow simulation road network model based on a multi-following model according to the simulation information and the newly created vehicle model, and configure the initial vehicle flow parameters;

[0019] A user-defined attribute creation module is used to decompose the optimized speed following model into an optimal speed function and a speed difference function, and to create four user-defined attributes, namely, the optimal speed function, the speed difference function, the acceleration calculation value, and the speed calculation value;

[0020] The simulation and property modification module is used to simulate the road network model within a set time period with the inverse of the Vissim simulation step as the operation frequency of property modification until the simulation ends; wherein, at each step, the vehicle property parameters are queried and retrieved, the user-defined properties created are calculated and assigned, and the speed and expected speed of the vehicle in the next step are calculated based on the property parameters and the user-defined properties, and the speed and expected speed are overwritten through the property modification instruction to complete the simulation of the next step.

[0021] One or more of the above technical solutions have the following beneficial effects:

[0022] 1. The present invention provides a mixed traffic flow simulation method and system based on Vissim attribute modification, which utilizes the attribute modification function within the Vissim simulation software and combines a simple external calling program to realize a large-scale, high-precision, multi-following model mixed traffic flow simulation based on user needs. There is no need to use the additional API module "external driver interface", which is easy to operate and saves costs.

[0023] 2. In the present invention, when the external calling program is running, Vissim only exchanges data with the external calling program twice in a single simulation (that is, the external calling program sends a simulation start signal to Vissim and Vissim sends a simulation end signal to the external calling program), and most of the calculation operations are implemented internally by Vissim. Compared with the traditional pure Vissim-COM external calling simulation method, this method greatly reduces the occupation of computer resources, so the operation frequency can be greatly improved, and the property modification instruction is executed once at each simulation step; in addition, due to the direct influence of the operation frequency on the simulation accuracy, this method greatly reduces the simulation error and significantly improves the simulation speed, and has a good simulation effect when simulating speed optimization models. BRIEF DESCRIPTION OF THE DRAWINGS

[0024] The accompanying drawings in the specification, which constitute a part of the present invention, are used to provide a further understanding of the present invention. The exemplary embodiments of the present invention and their descriptions are used to explain the present invention and do not constitute improper limitations on the present invention.

[0025] Figure 1 It is a flow chart of the mixed traffic flow simulation method based on Vissim attribute modification according to an embodiment of the present invention;

[0026] Figure 2 It is a flowchart of modifying the internal properties of Vissim at each step length when simulating a car-following model in an embodiment of the present invention;

[0027] Figure 3 A schematic diagram of the relationship between vehicle speed and travel time in an embodiment of the present invention;

[0028] Figure 4 A schematic diagram of a Vissim user-defined attribute creation format in an embodiment of the present invention;

[0029] Figure 5 A schematic diagram of the Vissim attribute modification writing format in an embodiment of the present invention;

[0030] Figure 6 This is a flow chart of the joint simulation between Vissim and an external calling program when simulating a car-following model in an embodiment of the present invention. DETAILED DESCRIPTION

[0031] It should be noted that the following detailed descriptions are exemplary only, are intended to describe specific embodiments, are intended to provide further explanation of the present invention, and are not intended to limit exemplary embodiments according to the present invention. Unless otherwise specified, all technical and scientific terms used herein have the same meanings as those of ordinary skill in the art to which the present invention belongs. In addition, it should also be understood that when the terms "comprising" and / or "including" are used in this specification, it indicates the presence of features, steps, operations, devices, components and / or combinations thereof.

[0032] Embodiment 1

[0033] This embodiment provides a mixed traffic flow simulation method based on Vissim attribute modification, which utilizes the attribute modification function within the Vissim simulation software and combines a simple external call program to achieve a large-scale high-precision multi-following model simulation mixed traffic flow simulation based on user needs, without the need to use an additional API module "external driver interface", which is easy to operate and saves costs. Figure 1 As shown, the specific steps include:

[0034] In the Vissim simulation software, a vehicle corresponding to the optimized speed following model to be simulated is modeled, and corresponding basic parameters are configured for the newly created vehicle model;

[0035] According to the simulation information and the newly created vehicle model, a mixed traffic flow simulation road network model based on the multi-following model is constructed, and the initial vehicle flow parameters are configured; the vehicle corresponding to the optimized speed following model in the multi-following model is simulated using the newly created vehicle model in the Vissim simulation software;

[0036] The optimized speed following model is decomposed into an optimal speed function and a speed difference function, and four user-defined attributes, namely, the optimal speed function, the speed difference function, the acceleration calculation value, and the speed calculation value, are created to provide operation quantities for the writing of subsequent attribute modification instructions;

[0037] The reciprocal of the Vissim simulation step is used as the operation frequency of the attribute modification, and the road network model simulation within the set time period is performed until the simulation ends; wherein, at each step, the vehicle attribute parameters are queried and retrieved, and the created user-defined attributes are calculated and assigned, and the speed and expected speed of the vehicle in the next step are calculated based on the attribute parameters and the user-defined attributes, and the speed and expected speed are overwritten through the attribute modification instruction to complete the simulation of the next step.

[0038] This embodiment takes the full speed difference optimal speed following model (FVDM) in the optimized speed following model as an example, and constructs and simulates a mixed traffic flow based on the Wiedemann74 following model and the full speed difference optimal speed following model.

[0039] First, in the Vissim simulation software, the vehicle corresponding to the optimized speed following model to be simulated is modeled, and the corresponding basic parameters are configured for the newly created vehicle model, that is, the vehicle type, vehicle category, driving behavior and road section driving behavior of the vehicle model are configured. This embodiment actually constructs a model of this type of new vehicle, and controls this type of vehicle to drive according to the optimized speed following model through attribute modification instructions, thereby realizing the simulation of the optimized speed following model.

[0040] Furthermore, in the Vissim simulation software, the parameters of the vehicle model, such as vehicle type, vehicle category, driving behavior and road section driving behavior, can be set through the "Basic Data" menu.

[0041] When configuring driving behavior, in order to eliminate the influence of Vissim's built-in Wiedemann model on the car-following model to be simulated, the additional part of the safety distance and the multiple part of the safety distance in the driving behavior are both set to 0, and the stationary following distance in front of the static obstacle in the driving behavior is set equal to the minimum following distance in the user's car-following model.

[0042] Specifically, for the optimized speed following model to be simulated - FVDM following model, the corresponding vehicle model is constructed in the Vissim simulation software, and the vehicle type, vehicle category, driving behavior and road section driving behavior are created and configured. At the same time, the corresponding vehicle type, 2D3D model and color and other parameters can also be set for the vehicle model according to user needs. When configuring the vehicle driving behavior, since the built-in following model of Vissim is the Wiedemann74 model, which is a physiological-psychological following model, the following distance between the two vehicles during driving is calculated through the parameters preset before the simulation, such as the parking distance when stationary, the additional part of the safety distance and the multiple part of the safety distance. Under the Wiedemann74 following model, the following distance d between the two vehicles when the vehicles are driving is determined by the following formula:

[0043] d=ax+bx

[0044] Among them, ax is the static following distance in front of the static obstacle, bx is the safety distance, and the calculation formula is:

[0045]

[0046] Among them, bx_add is the additional part of the safety distance; bx_mult is the multiple part of the safety distance, z is a value between 0 and 1, obeying the standard normal distribution with a standard deviation of 0.15 and a mean of 0.5; v is the vehicle speed.

[0047] In order to eliminate the influence of the built-in Wiedemann74 model of Vissim on the car-following model to be simulated, the additional part bx_add of the safety distance in the driving behavior and the multiple part bx_mult of the safety distance are set to 0, and the stationary following distance ax in front of the static obstacle in the driving behavior is set equal to the minimum following distance in the user's car-following model.

[0048] Then, according to the simulation information and the newly created vehicle model, a mixed traffic flow simulation road network model based on the multi-following model is constructed, and the initial traffic flow parameters are configured. Among them, combining the newly created vehicle model means that the vehicles corresponding to the optimized speed following model in the multi-following model are simulated using the newly created vehicle model in the Vissim simulation software. In addition, the vehicles corresponding to the Wiedemann74 following model in the multi-following model are simulated using the built-in vehicle model of Vissim. The traffic flow parameters include two parts: vehicle composition and vehicle input. The vehicle composition includes the proportion and expected speed of different vehicle types in the traffic flow, and the vehicle input includes the position and relative flow ratio of the traffic flow input.

[0049] Specifically, the road network model and vehicle path decision for mixed traffic flow simulation are constructed by Vissim simulation software, and the initial traffic flow parameters (including vehicle composition and vehicle input) are set. Since there are both vehicles simulated by the built-in Wiedemann74 following model in the mixed traffic flow of multiple following models and vehicles simulated by the full speed difference following model, the vehicle composition of the mixed traffic flow is created according to user needs in "Traffic-Vehicle Composition", and the built-in vehicle types of Vissim (used to simulate the Wiedemann74 following model) and the vehicle types created in the previous step (used to simulate the full speed difference optimal speed following model) are added to it, and the expected speed of each type of vehicle is set. At the same time, the input position of the traffic flow composed of multiple vehicles is set, and the relative flow ratio of the traffic flow input is set according to the penetration rate of the networked autonomous driving vehicle required by the simulation experiment. The relative flow ratio refers to the ratio of vehicles using the user following model (i.e., the speed optimization following model) to vehicles using the built-in Wiedemann74 following model of the software, that is, the ratio of networked autonomous driving vehicles to manually driven vehicles in the mixed traffic flow. In this embodiment, parameters such as the penetration rate of connected autonomous vehicles in mixed traffic and traffic volume can be controlled by the external call program mentioned in the subsequent steps, and automatically adjusted according to user needs after each simulation experiment.

[0050] Secondly, the speed optimization following model (i.e., user following model) is decomposed into an optimal speed function and a speed difference function, and four user-defined attributes, namely, the optimal speed function, the speed difference function, the acceleration calculation value, and the speed calculation value, are created to provide operation quantities for the subsequent writing of attribute modification instructions. In this embodiment, the full speed difference optimal speed following model FVDM is used as the user following model to construct a mixed traffic flow. Considering that the optimized speed following models (such as the OV model, the FVD model, etc.) all assume that the vehicle has an optimal speed during driving, and the optimal speed is related to the distance between the vehicle and the preceding vehicle. The optimal speed is an ideal speed and is not immediately achievable. In order to achieve this optimal speed as much as possible, the vehicle acceleration is:

[0051]

[0052] In the above formula, v n (t) represents the speed of the nth vehicle at time t, λ and a are sensitivity coefficients, Δx n (t) and Δv n Indicates the headway distance and speed difference between two adjacent vehicles.

[0053] Speed ​​difference function Δv n The expression is:

[0054] Δv n =v n-1 (t)-v n (t)

[0055] In the above formula, v n-1 (t) represents the speed of the preceding vehicle (i.e. the n-1th vehicle), v n (t) represents the speed of the vehicle (i.e. the nth vehicle).

[0056] Optimal speed function V(Δx n The expression of (t) is:

[0057] V(Δx n (t)) = V max (tanh(Δx-L)+tanh(L))

[0058] In the above formula, V max is the maximum driving speed, Δx is the headway between the following vehicle and the vehicle in front, and L is the minimum safe distance.

[0059] Specifically, the optimal speed V(Δx n (t)), and the speed difference Δv is calculated by the speed difference function n , and then the optimal speed V(Δx n (t)), speed difference Δv nWith the vehicle's current speed v n (t) is substituted into the full speed difference optimal speed following model FVDM to calculate the acceleration, and then the relationship between acceleration and speed, that is, v n (t+Δt)=v n (t)+aΔt, calculate the speed of the next step, where Δt is the time of one simulation step.

[0060] By decomposing the car-following model into two parts, the optimal speed function and the speed difference function, corresponding user-defined attributes are created in Vissim for the optimal speed function and the speed difference function. The format of creating user-defined attributes in Vissim simulation software is as follows: Figure 4 As shown, at the same time, corresponding user-defined attributes are created in Vissim for the acceleration calculation value derived from the car-following model and the speed calculation value derived from the acceleration calculation value and the simulation step length, and the object type to which the attribute belongs is set to vehicle, and the data type is set to floating point number, providing operation quantities for the subsequent writing of attribute modification instructions. Among them, the user-defined attributes are shown in Table 1 below, and the names of the attributes can be changed as needed.

[0061] Table 1 User-defined attributes

[0062]

[0063] Finally, the reciprocal of the Vissim simulation step is used as the operation frequency of the attribute modification, and the road network model simulation within the set time period is performed until the simulation ends; wherein, at each step, the vehicle attribute parameters are queried and retrieved, and the created user-defined attributes are calculated and assigned, and the speed and expected speed of the vehicle in the next step are calculated based on the attribute parameters and the user-defined attributes, and the speed and expected speed are overwritten through the attribute modification instruction to complete the simulation of the next step.

[0064] First of all, it should be made clear that the simulation step size is the reciprocal of the refresh frequency of the Vissim software during simulation; the operation cycle is the reciprocal of the operation frequency, and the operation frequency is the frequency of reading, calculating and modifying vehicle parameters.

[0065] The existing method for simulating the user-following model is to perform the above-mentioned reading-external call program calculation-modification method in each operation cycle. This method actually simulates the change of acceleration by changing the vehicle speed according to a certain operation frequency. In order to further reduce the error, it is often necessary to modify the expected speed of the target vehicle in Vissim by the same speed, so that its acceleration in the Vissim simulation is close to 0. At this time, the relationship between vehicle speed and driving time is as follows: Figure 3 As shown, Δt is the inverse of the operating frequency, that is, one operating cycle.

[0066] According to the relationship between displacement, acceleration and time, if the speed of vehicle n at time t is V n (t), the acceleration calculated by optimizing the velocity model is a n (t), then the theoretical displacement after an operation cycle Δt should be:

[0067]

[0068] The actual displacement obtained by this method is:

[0069] S n (Δt)=V n (t)×Δt

[0070] The error is It can be seen that the simulation error is related to the square of the operation cycle, and the operation frequency affects the simulation accuracy. Generally, one operation cycle of the traditional COM port external call method is equal to several Vissim simulation steps, and its simulation accuracy is poor; while in the property modification method proposed in this embodiment, one operation cycle is equal to one simulation step, the frequency is faster, and the simulation accuracy is higher.

[0071] Secondly, in this embodiment, the attribute parameters of the vehicle using the user following model are queried and retrieved, and the attribute parameters include the attribute parameters corresponding to the independent variables in the optimized speed following model (such as vehicle speed, headway, etc.), the attribute parameters expected to be modified (vehicle speed, expected vehicle speed, etc.), and the relevant attribute parameters required to index to the specific vehicle (such as vehicle number, vehicle type, number of the road section where the vehicle is located, number of the lane where the vehicle is located, number of the vehicle in front of the vehicle, minimum vehicle number in the lane where the vehicle is located, etc.), and some of the attribute parameters are shown in Table 2 below.

[0072] Table 2 Internal properties of Vissim road network model objects

[0073] property illustrate Object type Data Types [VEHTYPE] Vehicle Type vehicle text [SPACING] Headroom vehicle Floating point numbers [LANE_LINK_NO] The number of the road section where the vehicle is located vehicle Integer [LANE_INDEX] The index of the lane the vehicle is in vehicle Integer [SPEED] speed vehicle Floating point numbers [DESSPEED] Expected speed vehicle Floating point numbers [LEADTARGNO] Front car number vehicle Integer [LANE_MIN:VEHS_NO] Minimum vehicle number on the lane Lane Integer

[0074] Furthermore, when the attribute modification instruction is executed, it is executed at a frequency of once per simulation step.

[0075] The attribute modification instructions executed at each step include:

[0076] According to the attribute parameters, the values ​​of the optimal speed function and the speed difference function are calculated and assigned to the corresponding user-defined attributes;

[0077] Based on the two user-defined properties of the optimal speed function and the speed difference function, the optimized speed simulation model (i.e., the full speed difference optimal speed following model FVDM) is substituted to obtain the acceleration calculation value, and the speed calculation value of the next step length is obtained by using the relationship between speed and acceleration;

[0078] Based on the speed calculation value of the next step length, the two attribute parameters of the vehicle speed of the next step length and the vehicle expected speed of the vehicle using the user following model are overwritten.

[0079] Specifically, Figure 2 As shown in FIG. 1 , in each step, for each vehicle in the road network that adopts the user-following model, its attribute parameters are queried and retrieved, and the attribute modification instructions are executed according to the created user-defined attributes and Vissim internal attribute parameters (the attribute modification instructions are written before the simulation and can be executed according to the operation frequency during the simulation); during the execution process, the vehicle number and the number of the lane where the vehicle is located are first read, and the minimum vehicle number in the lane where the vehicle is located is determined based on the number of the lane where the vehicle is located, and the vehicle number and the minimum vehicle number in the lane where the vehicle is located are compared; if the vehicle number is not greater than the minimum vehicle number in the lane where the vehicle is located, it means that the vehicle is the head vehicle in the lane and is not in the following state, and no execution is performed. The row attribute is modified; otherwise, if the vehicle number is greater than the minimum vehicle number on the lane where the vehicle is located, the head distance is read and the head distance is compared with the maximum following distance; if the head distance is greater than the maximum following distance, it means that the vehicle is not in a following state and the attribute modification is not performed; otherwise, the number of the vehicle in front of the vehicle, the vehicle speed and the vehicle speed of the vehicle in front of the vehicle are read, and the values ​​of the optimal speed function and the speed difference function are calculated and assigned to the corresponding user-defined attributes, and then the acceleration calculation value and the next step length speed calculation value are calculated in turn, and assigned to the corresponding user-defined attributes, overwriting the two attribute parameters of the vehicle speed and expected speed to make them equal to the next step length speed calculation value, and completing the attribute modification. The writing format of the attribute modification instruction is as follows: Figure 5 As shown, in order to make the vehicle drive according to the car-following model throughout the simulation process, the instruction start time is set to 0, the end time is set to MAX, and the interval is set to 1 step length to ensure that the simulation accuracy of the car-following model is maximized.

[0080] Furthermore, in the road network model, node detectors, data collection point detectors and queue counters are set, and the evaluation time interval and start and end time are set. Based on the Vissim simulation software, node evaluation, data collection evaluation and queue count evaluation are performed on the mixed traffic flow simulation, and the evaluation results are written into the evaluation file. After the simulation is completed, the generated evaluation file is output.

[0081] Further, the script language of the external calling program is selected, and the VissimCOM service interface of the Vissim simulation software is registered at the same time, and the Vissim COM interface and loading file are created in the script language of the selected external calling program. Among them, the script language of the external calling program is an external calling language supported by the Vissim COM interface, including Python, Java, Visual Basic, C++, C# and Matlab, etc., which can be selected according to user needs.

[0082] On this basis, the above method is combined with external script calling program to carry out joint simulation of mixed traffic flow, such as Figure 6 As shown, write an external call script program, including:

[0083] (1) Initialization script: used to call and load the road network file, and set basic simulation parameters, including simulation time, simulation accuracy, number of runs, etc. Due to the advantage of the method proposed in this embodiment that it occupies less computer resources, the simulation accuracy can be set to 10 time steps / simulation second or more, that is, it takes 0.1 second or less to run each simulation step.

[0084] (2) Vissim simulation program running script: used to run the Vissim simulation program. Due to the characteristics of property modification, the above method can directly make Vissim perform continuous simulation instead of the single-step simulation used by the traditional Vissim-COM method, which can greatly improve the speed and accuracy of the simulation.

[0085] (3) Traffic flow parameter adjustment script: This script is used to modify the parameters of traffic flow in the road network according to the user's simulation requirements after Vissim completes a simulation task, such as modifying the penetration rate of vehicles using the external following model in the traffic flow. After the traffic flow parameters are adjusted, the continuous simulation command is run again to achieve batch simulation job requirements.

[0086] (4) Data processing script for evaluation files: After all simulations are completed, the evaluation files are read and the simulation results are processed and output.

[0087] That is, the external calling program connects to the simulation software through the Vissim COM service interface and sets the road network simulation parameters; then, the external calling program sends a simulation start signal to the Vissim simulation software, allowing the Vissim simulation software to continuously simulate the mixed traffic flow road network; finally, the external calling program receives the simulation end signal from the Vissim simulation software through the Vissim COM interface, and determines whether all simulation experiments with different traffic flow parameters are completed. If not, the traffic flow parameters are modified and the simulation is performed again; if so, the evaluation file is read, data processing is performed and the simulation results are output.

[0088] The above judgment whether all simulation experiments with different traffic flow parameters have been completed is set according to specific needs. For example, if the various traffic parameters of mixed traffic flow are tested when the penetration rate of connected autonomous driving vehicles (that is, the proportion in mixed traffic flow) is 0.1, 0.2, 0.3...0.8, and 0.9, nine experiments are required. Through the external call program, the traffic penetration rate is adjusted once each experiment is conducted, and then the next experiment is conducted until all traffic flows with all penetration rates are tested, that is, all simulations are completed. In fact, the role of the external call program is to automatically complete batch simulation tasks according to user needs.

[0089] The mixed traffic flow simulation method based on Vissim attribute modification proposed in this embodiment utilizes the attribute modification function inside the Vissim simulation software and combines a simple external call program to realize a large-scale high-precision multi-following model simulation mixed traffic flow simulation based on user needs, without the need to use the API module "external driver interface" additionally, which is easy to operate and saves costs. When the program is running, Vissim only exchanges data with the external call program twice in a single simulation, and most of the calculation operations are implemented by Vissim internally. Compared with the traditional pure Vissim-COM external call simulation method, this method greatly reduces the occupation of computer resources, so the operation frequency can be greatly improved, and the attribute modification instruction is run once at each simulation step; in addition, due to the direct influence of the operation frequency on the simulation accuracy, this method greatly reduces the simulation error and significantly improves the simulation speed, and has a good simulation effect when optimizing the simulation of speed models.

[0090] Embodiment 2

[0091] This embodiment provides a hybrid traffic flow simulation system based on Vissim attribute modification, which is implemented based on Vissim simulation software and an external calling program. The Vissim simulation software includes:

[0092] A vehicle model building module is used to model the vehicle corresponding to the optimized speed following model to be simulated in the Vissim simulation software;

[0093] The road network model building module is used to build a mixed traffic flow simulation road network model based on a multi-following model according to the simulation information and the newly created vehicle model, and configure the initial vehicle flow parameters;

[0094] A user-defined attribute creation module is used to decompose the optimized speed following model into an optimal speed function and a speed difference function, and to create four user-defined attributes, namely, the optimal speed function, the speed difference function, the acceleration calculation value, and the speed calculation value;

[0095] The simulation and property modification module is used to simulate the road network model within a set time period with the inverse of the Vissim simulation step as the operation frequency of property modification until the simulation ends; wherein, at each step, the vehicle property parameters are queried and retrieved, the user-defined properties created are calculated and assigned, and the speed and expected speed of the vehicle in the next step are calculated based on the property parameters and the user-defined properties, and the speed and expected speed are overwritten through the property modification instruction to complete the simulation of the next step.

[0096] Furthermore, the above-mentioned external calling program is used to retrieve the actual mixed traffic flow network information, set simulation parameters, and generate simulation information of the actual mixed traffic flow network. The Vissim COM service interface of the Vissim simulation software is connected to the external calling program, receives the simulation information of the actual mixed traffic flow network and performs simulation until the simulation ends; in addition, the external calling program receives the simulation end signal of the Vissim simulation software through the Vissim COM interface, and determines whether all simulation experiments of different traffic flow parameters are completed. If not, the traffic flow parameters are modified and the simulation is performed again; if so, the evaluation file is read, data processing is performed and the simulation results are output.

[0097] The steps involved in the above embodiment 2 correspond to those in the method embodiment 1. For the specific implementation method, please refer to the relevant description part of the embodiment 1.

[0098] Those skilled in the art should understand that the modules or steps of the present invention described above can be implemented by a general-purpose computer device, or alternatively, they can be implemented by a program code executable by a computing device, so that they can be stored in a storage device and executed by the computing device, or they can be made into individual integrated circuit modules, or multiple modules or steps therein can be made into a single integrated circuit module for implementation. The present invention is not limited to any specific combination of hardware and software.

[0099] The above description is only a preferred embodiment of the present invention. Although the specific implementation mode of the present invention is described in conjunction with the accompanying drawings, it is not intended to limit the scope of protection of the present invention. Those skilled in the art should understand that on the basis of the technical solution of the present invention, various modifications or variations that can be made by those skilled in the art without creative work are still within the scope of protection of the present invention.

Claims

1. A mixed traffic flow simulation method based on Vissim attribute modification, characterized in that: include: In the Vissim simulation software, a vehicle corresponding to the optimized speed following model to be simulated is modeled; According to the simulation information and the newly built vehicle model, a mixed traffic flow simulation road network model based on the multi-following model is constructed, and the initial traffic flow parameters are configured; The optimized speed following model is decomposed into the optimal speed function and the speed difference function, and four user-defined attributes, namely the optimal speed function, the speed difference function, the acceleration calculation value and the speed calculation value, are created; The reciprocal of the Vissim simulation step is used as the operation frequency of the attribute modification, and the road network model simulation within the set time period is performed until the simulation ends; wherein, at each step, the vehicle attribute parameters are queried and retrieved, and the created user-defined attributes are calculated and assigned, and the speed and expected speed of the vehicle in the next step are calculated based on the attribute parameters and the user-defined attributes, and the speed and expected speed are overwritten through the attribute modification instruction to complete the simulation of the next step; The attribute modification instruction includes: According to the attribute parameters, the values ​​of the optimal speed function and the speed difference function are calculated and assigned to the corresponding user-defined attributes; based on the two user-defined attributes of the optimal speed function and the speed difference function, they are substituted into the optimized speed simulation model to obtain the acceleration calculation value, and the relationship between the speed and the acceleration is used to obtain the speed calculation value of the next step length; based on the speed calculation value of the next step length, the two attribute parameters of the vehicle speed and the vehicle expected speed of the next step length of the vehicle using the user following model are overwritten. The specific process is: in each step length, the attribute parameters of the vehicle using the user following model are queried and retrieved, firstly the vehicle number and the number of the lane where the vehicle is located are read, the minimum vehicle number in the lane where the vehicle is located is determined based on the number of the lane where the vehicle is located, and the vehicle number and the minimum vehicle number in the lane where the vehicle is located are compared; If the vehicle number is not greater than the minimum vehicle number in the lane where the vehicle is located, the attribute modification is not performed; on the contrary, if the vehicle number is greater than the minimum vehicle number in the lane where the vehicle is located, the headway is read and compared with the maximum following distance; If the head-to-head distance is greater than the maximum following distance, the attribute modification is not performed; otherwise, the number and speed of the vehicle in front of the vehicle and the speed of the vehicle in front of the vehicle are read, the values ​​of the optimal speed function and the speed difference function are calculated and assigned to the corresponding user-defined attributes, and then the acceleration calculation value and the next step length speed calculation value are calculated in turn and assigned to the corresponding user-defined attributes, overwriting the vehicle's speed and expected speed so that these two attribute parameters are equal to the next step length speed calculation value, and the attribute modification is completed.

2. The hybrid traffic flow simulation method based on Vissim attribute modification as claimed in claim 1 is characterized in that: When modeling the vehicle corresponding to the optimized speed following model to be simulated, the corresponding basic parameters are configured for the newly created vehicle model, including the vehicle type, vehicle category, driving behavior and road section driving behavior of the vehicle model; The driving behavior of the configuration model includes: setting the additional part of the safety distance in the driving behavior and the multiple part of the safety distance to 0, and setting the stationary following distance in front of the static obstacle in the driving behavior to be equal to the minimum following distance in the user's following model.

3. The hybrid traffic flow simulation method based on Vissim attribute modification as claimed in claim 1 is characterized in that: Combined with the newly created vehicle model, a mixed traffic flow simulation road network model based on the multi-following model is constructed, which is: the vehicles corresponding to the optimized speed following model in the multi-following model are simulated using the newly created vehicle model in the Vissim simulation software, and the vehicles corresponding to the Wiedemann74 following model in the multi-following model are simulated using the built-in vehicle model in Vissim; The initial traffic flow parameters include two parts: vehicle composition and vehicle input. The vehicle composition includes the proportion and expected speed of different vehicle types in the traffic flow, and the vehicle input includes the position and relative flow ratio of the traffic flow input.

4. The hybrid traffic flow simulation method based on Vissim attribute modification as claimed in claim 1 is characterized in that: The attribute parameters of the vehicle using the user following model include vehicle number, vehicle type, head-to-head distance, the number of the road section where the vehicle is located, the number of the lane where the vehicle is located, vehicle speed, vehicle expected speed, the number of the vehicle in front of the vehicle and the minimum vehicle number in the lane where the vehicle is located.

5. The hybrid traffic flow simulation method based on Vissim attribute modification as claimed in claim 1 is characterized in that: In the road network model, node detectors, data collection point detectors and queue counters are set, and the evaluation time interval and start and end time are set. Based on the Vissim simulation software, node evaluation, data collection evaluation and queue counting evaluation are performed on the mixed traffic flow simulation, and the evaluation results are written into the evaluation file. After the simulation is completed, the generated evaluation file is output.

6. The hybrid traffic flow simulation method based on Vissim attribute modification as claimed in claim 1, characterized in that: Select the script language of the external calling program, register the Vissim COM service interface of the Vissim simulation software at the same time, and create the Vissim COM interface and load file in the selected script language of the external calling program; the script language of the external calling program is an external calling language supported by the Vissim COM interface, including Python, Java, Visual Basic, C++, C# and Matlab.

7. The hybrid traffic flow simulation method based on Vissim attribute modification as claimed in claim 6, characterized in that: The external calling program connects to the simulation software through the Vissim COM service interface to set the road network simulation parameters; The external calling program sends a simulation start signal to the Vissim simulation software, so that the Vissim simulation software continuously simulates the mixed traffic flow network; The external calling program receives the simulation end signal of the Vissim simulation software through the Vissim COM interface, and determines whether all simulation experiments with different traffic flow parameters are completed. If not, the traffic flow parameters are modified and the simulation is performed again; if so, the evaluation file is read, data is processed and the simulation results are output.

8. A hybrid traffic flow simulation system based on Vissim attribute modification, characterized in that: Based on Vissim simulation software and external calling program implementation, the Vissim simulation software includes: A vehicle model building module is used to model the vehicle corresponding to the optimized speed following model to be simulated in the Vissim simulation software; The road network model building module is used to build a mixed traffic flow simulation road network model based on a multi-following model according to the simulation information and the newly created vehicle model, and configure the initial vehicle flow parameters; A user-defined attribute creation module is used to decompose the optimized speed following model into an optimal speed function and a speed difference function, and to create four user-defined attributes, namely, the optimal speed function, the speed difference function, the acceleration calculation value, and the speed calculation value; The simulation and attribute modification module is used to use the inverse of the Vissim simulation step length as the operation frequency of attribute modification, and to simulate the road network model within a set time period until the simulation ends; wherein, at each step length, the vehicle attribute parameters are queried and retrieved, and the created user-defined attributes are calculated and assigned, and the speed and expected speed of the vehicle in the next step length are calculated based on the attribute parameters and the user-defined attributes, and the speed and expected speed are overwritten through the attribute modification instruction to complete the simulation of the next step length; The attribute modification instruction includes: According to the attribute parameters, the values ​​of the optimal speed function and the speed difference function are calculated and assigned to the corresponding user-defined attributes; based on the two user-defined attributes of the optimal speed function and the speed difference function, they are substituted into the optimized speed simulation model to obtain the acceleration calculation value, and the relationship between the speed and the acceleration is used to obtain the speed calculation value of the next step length; based on the speed calculation value of the next step length, the two attribute parameters of the vehicle speed and the vehicle expected speed of the next step length of the vehicle using the user following model are overwritten. The specific process is: in each step length, the attribute parameters of the vehicle using the user following model are queried and retrieved, firstly the vehicle number and the number of the lane where the vehicle is located are read, the minimum vehicle number in the lane where the vehicle is located is determined based on the number of the lane where the vehicle is located, and the vehicle number and the minimum vehicle number in the lane where the vehicle is located are compared; If the vehicle number is not greater than the minimum vehicle number in the lane where the vehicle is located, the attribute modification is not performed; on the contrary, if the vehicle number is greater than the minimum vehicle number in the lane where the vehicle is located, the headway is read and compared with the maximum following distance; If the head-to-head distance is greater than the maximum following distance, the attribute modification is not performed; otherwise, the number and speed of the vehicle in front of the vehicle and the speed of the vehicle in front of the vehicle are read, the values ​​of the optimal speed function and the speed difference function are calculated and assigned to the corresponding user-defined attributes, and then the acceleration calculation value and the next step length speed calculation value are calculated in turn and assigned to the corresponding user-defined attributes, overwriting the vehicle's speed and expected speed so that these two attribute parameters are equal to the next step length speed calculation value, and the attribute modification is completed.