By Dimitris Triantafyllos
An essential step toward solving traffic congestion is the deployment of more accurate and reliable traffic monitoring systems. Traditionally, traffic monitoring systems are mostly limited to highways and rely soley on data feeds from sensors installed in the infrastructure, such as loop detectors, radars or cameras. However, this is not really sufficient, particularly on arterials. Probe-vehicle data are the only significant data source available today that have the potential for global coverage in the future; sources include smartphones, fleet vehicles periodically reporting their location, aftermarket devices or radio-frequency identification tags.
This Aimsun Application Programming Interface (API) enables researchers to increase their understanding of the use of probe vehicle data, available applications, visualisations, performance measures and management techniques.
This API can export synthetic probe data by running an Aimsun micro simulation with a frequency defined by the user e.g., every 30 seconds.
The study area from which you want to export Probe Data can be restricted by defining two different groupings:
1. Section grouping
2. Node grouping
The data exported using this API are Vehicle_ID,time,x,y,z,speed(m/sec).
The complete code is available here (Python script file format)
Ensure that all necessary files are located in the same local directory:
1. From the Aimsun UI, create two new groupings of sections and nodes to define the probe data collection areas.
Click to enlarge: Defining the probe data collection areas
2. Open the exportProbeDataAPI.py file. Set the frequency in the next Cycle variable and place the objects’ grouping IDs into the grouping list variable
nextCycle = 30.0 groupinglist = [10005971,10005972]
3. Set a file to export every specified frequency
4. Load the Aimsun API on the desired Dynamic Scenario. Double-click on the Dynamic Scenario, go to the Aimsun API tab folder, click Add and select “ExportProbeDataAPI.py”
5. Execute the Replication
6. Hereafter, “ProbeData_XX.csv” files will be generated
For more detailed info about setting groupings and finding their IDs, please refer to the manuals.