Exporting probe data using Aimsun micro API

Technical Note #9

July 2015

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)

Setting the Aimsun API

Ensure that all necessary files are located in the same local directory:


  • Aimsun network (ANG File)
  • Aimsun AAPI file (Must be consistent with the Aimsun version currently in use. It can be retrieved from the following directory: C:\Program Files\TSS-Transport Simulation Systems\Aimsun\programming\Aimsun API\AAPIPython)
  • Aimsun API python file (exportProbeDataAPI.py)

Procedure:


1. From the Aimsun UI, create two new groupings of sections and nodes to define the probe data collection areas.



Aimsun Synthetic Probe Data API

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

filename ='ProbeData_%i.csv'%(nextCycle)


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.

More technical notes

Exporting probe data using Aimsun micro API

July 2015: Dimitris Triantafyllos discusses how this Aimsun API allows research centres to work on the understanding of the innovative uses of probe vehicle data, available applications, visualisations, performance measures, and management techniques.

Aimsun
  • 有问题吗? 请联系我们。

    我们在这里提供帮助!

  • 有问题吗? 请联系我们。

    我们在这里提供帮助!

分享

引用Aimsun Next

Aimsun Next 20

Aimsun (2021). Aimsun Next 20 User’s Manual, Aimsun Next Version 20.0.3, Barcelona, Spain. Accessed on: May. 1, 2021. [In software].
Available: qthelp://aimsun.com.aimsun.20.0/doc/UsersManual/Intro.html


Aimsun Next 8.4

Aimsun (2021). Aimsun Next 8.4 User’s Manual, Aimsun Next Version 8.4.4, Barcelona, Spain. Accessed on: May. 1, 2021. [In software]. Available: qthelp://aimsun.com.aimsun.8.4/doc/UsersManual/Intro.html

Aimsun Next 20

@manual {​​​​​​​​AimsunManual,

title = {​​​​​​​​Aimsun Next 20 User’s Manual}​​​​​​​​,

author = {​​​​​​​​Aimsun}​​​​​​​​,

edition = {​​​​​​​​​​​​​​​Aimsun Next 20.0.3}​​​​​​​​​​​​​​​,

address = {​​​​​​​​​​​​​​​Barcelona, Spain}​​​​​​​​​​​​​​​,

year = {​​​​​​​​​​​​​​​2021. [In software]}​​​​​​​​​​​​​​​,

month = {​​​​​​​​​​​​​​​Accessed on: Month, Day, Year}​​​​​​​​​​​​​​​,

url = {​​​​​​​​​​​​​​​qthelp://aimsun.com.aimsun.20.0/doc/UsersManual/Intro.html}​​​​​​​​​​​​​​​,

}​​​​​​​​​​​​​​​


Aimsun Next 8.4

@manual {​​​​​​​​AimsunManual,

title = {​​​​​​​​Aimsun Next 8.4 User’s Manual}​​​​​​​​,

author = {​​​​​​​​Aimsun}​​​​​​​​,

edition = {​​​​​​​​​​​​​​​Aimsun Next 8.4.4}​​​​​​​​​​​​​​​,

address = {​​​​​​​​​​​​​​​Barcelona, Spain}​​​​​​​​​​​​​​​,

year = {​​​​​​​​​​​​​​​2021. [In software]}​​​​​​​​​​​​​​​,

month = {​​​​​​​​​​​​​​​Accessed on: Month, Day, Year}​​​​​​​​​​​​​​​,

url = {​​​​​​​​​​​​​​​qthelp://aimsun.com.aimsun.8.4/doc/UsersManual/Intro.html}​​​​​​​​​​​​​​​,

}​​​​​​​​​​​​​​​

Aimsun Next 20

TY – COMP

T1 – Aimsun Next 20 User’s Manual

A1 – Aimsun

ET – Aimsun Next Version 20.0.3

Y1 – 2021

Y2 – Accessed on: Month, Day, Year

CY – Barcelona, Spain

PB – Aimsun

UR – [In software]. Available: qthelp://aimsun.com.aimsun.20.0/doc/UsersManual/Intro.html


Aimsun Next 8.4

TY – COMP

T1 – Aimsun Next 8.4 User’s Manual

A1 – Aimsun

ET – Aimsun Next Version 8.4.4

Y1 – 2021

Y2 – Accessed on: Month, Day, Year

CY – Barcelona, Spain

PB – Aimsun

UR – [In software]. Available: qthelp://aimsun.com.aimsun.8.4/doc/UsersManual/Intro.html