Skip to content

Storing Simulation Results

A flexible mechanism for storing simulation outputs is available. The simulation outputs (statistics and detection) can be stored in either an Automatic or a Custom database. In the Custom case, the location of the data is configurable, making it possible to store the results of different runs or replications of the same model.

The database can be defined in the Project Properties or can be defined separately for each scenario in the Scenario Editor The database format is described in detail in the Output Database Definition section.

The databases supported by Aimsun Next are:

  • Windows 32-bit: Access 32-bit, SQLite, ODBC, and Postgres 9.
  • Windows 64-bit: Access 64-bit, SQLite, and ODBC.
  • Linux: SQLite, MySQL, ODBC, and Postgres 9.
  • Mac OS X: SQLite, MySQL, ODBC, and Postgres 9.

In Windows versions, ODBC is the preferred method as it is faster than Access and SQLite. Note that an Access database can be accessed via ODBC.

Automatic Database

Automatic Databases: Aimsun Next can create two types of databases automatically, either an Access database or a SQLite database. When selecting the Automatic using Access or the Automatic using SQLite option, Aimsun Next will create a new database, if one doesn’t already exist, using the network name and stored in the network folder.

In both cases, they are intended to give support to small amount of data from simulations. We strongly not recommend to use them in large scale networks.

Custom Database

When selecting the option is selected, a list of all the available database drivers will appear. These can be:

  • Access (only available in the Windows versions): If Access is chosen, browse to search for the appropriate Access database, (file with the .mdb extension) by pressing the browse button on the right. The database, which must be previously created using Microsoft Access, can be an empty database or can contain previous data. If the database is not empty, the simulation output data having the same replication ID will be overwritten, otherwise it will be added to the existing data.

  • ODBC: Select the ODBC data source among all the data sources available in the computer in which Aimsun Next is running. In this case the Parameters button will select the host that is running the database and also a user name and password if required by the database (Access databases do not require this, Oracle usually does).

  • Postgres 8: For this kind of database; select the QPSQL driver, specify the database name and the database parameters: username, password, host, and port.

  • SQLite: For this kind of database; select the QSQLite driver and a file with the extension *.sqlite or *.db. If the file selected does not exist it will be automatically created when storing the output data.

  • MySQL: For this kind of database; select the QMySQL driver, specify the database name and the database parameters: username, password, host, and port.


Database Parameters editor

ODBC Configuration

ODBC is a standard method for accessing database systems. It requires configuration on the host computer system

Creating a Data Source

In order to store the simulation results as a database with an ODBC data source, first create a Data Source. An application named ODBC Data Sources is located in the Windows Control Panel folder or the Windows Start Screen.


ODBC Data Source Administrator

Click on the ‘Add’ button and the ‘Create New Data Source’ dialog window will appear.


Create Data Source

Select either a Microsoft Access Driver (*.mdb) or an SQL Server. If the "Microsoft Access Driver" is selected the ODBC Microsoft Access Setup dialog window is displayed when the ‘Finish’ button is clicked.


New Data Source

Type in a Data Source Name as the logical name for your database. Then click on the ‘Select’ button to browse and search for a Microsoft Access file (*.mdb) or create an empty database clicking on ‘Create’ button. Select or create a database and click on the ‘OK’ button. The new data source will then be added to the list of User Data Sources. From now on, the created data source, referenced by its logical name, can be used in Aimsun Next to store simulation results.

When selecting the Database, the choice presented will depend on the different Data Sources available in the computer. Only Data Sources that have been properly installed in the system will be shown in the option menu. If Multiple Replications are run, results corresponding to different replications are stored in the same database, using the replication identifier as the primary key. The Output Database Definition Section explains in detail the database structure and its contents.

Postgres Configuration

To manage Postgres databases, we recommend pgAdmin III is installed for the operating system in use.

Creating a Data Source

In order to store the simulation results as a database with a Postgres database, first create a Data Base. Databases in pgAdmin are visible from the main menu.


Postgres Databases

To create a new database, right click on Databases folder and select 'New Database...' option. On the 'New Database...' dialog, set the name and the owner of the database. It is essential that the owner has enough privileges to write into the database.


New Postgres Database

Once the database is already created, define the settings as follows:


Project Postgres Database

when Host is defined as localhost, it means it will look for the local computer; it is possible to set any IP address where it is a Postgres server running on it.

Troubleshooting with Access databases

To use Access databases the version of Aimsun Next must match the version of Access installed, that is:

  • if the Aimsun Next version is the Windows 32bit one, Access must also be 32bit
  • if the Aimsun Next version is the Windows 64bit one, Access must also be 64bit. In this case, the MS Access database engine 2010 must be also installed. The installer, called AccessDatabaseEngine_x64.exe, is available for installing in the Aimsun Next installation folder: extras subfolder.