Automatic model file management

July 2022 — Technical note #71

Dimitris Triantafyllos

Senior Product Specialist

Intro

A transportation modeling project may be composed of many different files: the model document with revisions and backups, backgrounds, real data, paths, outputs, etc. Keeping track of all the files can be cumbersome in complex projects, so Aimsun Next now automatically creates, organises and maintains all the files related to a modelling project. 

Automatic model file management makes it easier to create backups, work with revisions, deliver projects and to resume work in future phases of a project.

After selecting whether to open a new network or a tutorial, select the folder where you want to create the project folder structure and save the network.

Working with the Project Structure

When you create a new Aimsun Next Project, several directories are created automatically in the path indicated in the “New Project” > “Folder” field, i.e., C:/tmp:

A new folder is created with the name given in the “Project Name” field (i.e.: test). Inside that folder, a subfolder named “Model” and the ReadMe.md file is created. The ReadMe.md file includes the “Description” regarding the project that you provided:

The “Model” folder contains another subfolder named “Resources” and the .ang file, which receives the same name as the “Folder” field (i.e.: test.ang):

The “Resources” folder is where all the other files of the project are stored. These files will be organized in different folders, which are automatically created by Aimsun Next “on-demand” while you are working on this model. To save or read a file, you’ll be offered by default another folder inside the “Resources” folder to store that specific file type. For example, if you want to create a new Initial State (i.e.: test.ais) file, then the default path offered will be the one in “/Resources/Initial States/test.ais” , however, to import a new image file, you should first copy the image file inside the “Maps” folder and then import to continue with geometry refinement.

See the complete folder structure below:

Important note: NEVER change the name of the “Resources” folder. Make sure this folder is in the same directory as the .ang file and never renamed, removed nor moved to a different directory.

Examples

If you store a Path Assignment or an OD matrix file externally, this file by default will be stored inside the Project Structure:

  1. Creating a new Path Assignment File (.apa): The default path created will be “/Project Name > Model > Resources > Path Assignments > pathAssignmentName.apa”:

     2. Creating a new OD matrix and set it manually to be stored externally (.txt): The default path created will be “/Project Name > Model > Resources > Matrices > matrixName.txt”:

If the OD matrix is set to be stored externally but in a different path than the default Project Structure folder, then the option “Copy to Project Folder” is unfrozen. The checkbox is enabled by default. If you keep the checkbox enabled and press OK to exit the dialog, the OD matrix will be copied to the Project Structure folder and the path will be updated.

The path will not be updated until you click “OK” in the window and re-open the OD matrix object; the “File” field in the dialog will look like this:

Any changes applied in the OD matrix using the Aimsun Next UI (User Interface) will be applied in the file located inside the Project Structure.

If you do not want to copy the matrix to the Project Structure folder (for example, because the matrix is created or updated by an external process), uncheck the Copy to Project Folder option when selecting the matrix file. This will leave it in its external location and any changes applied via Aimsun Next will modify that file.

Upcoming versions: In the upcoming version of Aimsun Next (22.1), script files stored externally will also have the option “Move to Project Structure” to allow the copy and usage of any script from any directory outside the Project Structure folder named “Scripts”. This option is intended to be used when you have a central scripting repository for all of your projects and you want to ensure that you are always accessing the latest version of a script that can be modified externally.

Converting old projects to work with the Project Folder Structure

The Project Structure folder feature is activated by default when creating a new project. However, old projects can also benefit from this feature. To activate the Project Structure, create the folder “Resources” manually in the same location as the .ang file. All sub-directories will be created automatically when a new object is created, or any existing object is set to be stored externally.

Other input/output files can be also moved to the corresponding folders of the Project Structure. You should also convert the paths into the corresponding objects. Below, you can find the files included in each folder of the Project Structure:

Deactivating the automatic management of the project files

You can deactivate this functionality by either renaming, moving, or deleting the “Resources” folder. Be sure to keep a back-up of all the external files used.

Saving frequent back-ups of the model

While working on an Aimsun Next project, we recommend that you keep back-ups during various states of the model. Follow this workflow to keep back-ups safely:

  1. Create a copy of the entire model folder with all its subfolders.
  2. Rename the folder, i.e., using the date as reference.
  3. Delete any unnecessary files, e.g., background images, external matrices that you have deleted in the .ang, to save space if needed; you can also compress this folder if desired.
  4. Continue working with the model in the Project Folder Structure.

More technical notes

  • Got a question? Get in touch.

    We are here to help!

SHARE