How to use template scripts for fast visualization of signalized nodes

Technical Note #43

January 2020
By Margarida Delgado

In this technical note, we’ll take a look at one of the scripts in the template that you can use to speed up the process of filtering and viewing signalized nodes.

Script number 10 in the template list will search through all of the nodes in the model, and then assign a node attribute, called GKNode::hasControlInfo, as being either true or false (or it creates that node attribute if it doesn’t exist).

 

When you execute Script 10, the main function will be called and a dialog will open with the following options:

 

  1. All Control Plans
  2. One Control Plan
  3. All Control Plans in a Master Control Plan

 

Drop down menu for GKNode::hasControlInfo
 

If you choose the option ‘One Control Plan’, you’ll need to provide the control plan ID number; if you choose the option ‘All Control Plans in a Master Control Plan’, you’ll need to provide the ID number of the master control plan.

 

The function getCreateNodeAttribute() checks if the attribute GKNode::hasControlInfo exists. if not, it will create it. The type of values that this attribute accepts will be Boolean (true or false). The external name will be Has Control Info?

 

 
 

 

The function isNodeInCP( cp, node ) just determines whether a particular node has info for a particular control plan; it returns 0, i.e., false or No, if there is no info; and 1, i.e., true or Yes, if there is info. The function getControlJunction() will return 0 when the node appears in the control plan as Unspecified (i.e. no info).

 

 

 

 

When looking for all control plans, the function startCalculation(column) will be executed. It iterates all nodes and, for each node, it iterates all control plans. Nodes are all GKNode-type objects and control plans are all CKControlPlan-type objects, so find them with the getCatalog().getObjectsByType(enterType) function.

 

When looking for one particular control plan, the function startCalculationCP(column, cp) will iterate all nodes of this particular control plan.

 

When looking for one particular master control plan, the function startCalculationMCP(column, mcp) iterates all nodes and all control plans inside that master control plan, whatever the timetable or zone.

 

Once the script has finished, you can visualize nodes with no info, creating a view mode:

 


 


 


 

More technical notes

Switching to Python 3

May 2021: Python 2 reached end-of-life status in January 2020. Tessa Hayman gives you some tips on getting your script Python 3-ready for optimum performance in Aimsun Next

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.

  • Got a question? Get in touch.

    We are here to help!

SHARE

Cite Aimsun Next

 

Aimsun Next 23

Aimsun (2023). Aimsun Next 23 User's Manual, Aimsun Next Version 23.0.0, Barcelona, Spain. Accessed on: July. 19, 2023. [Online].
Available: https://docs.aimsun.com/next/23.0.0/

 


 

Aimsun Next 20.0.5

Aimsun (2021). Aimsun Next 20.0.5 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 23

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

title = {​​​​​​​​Aimsun Next 23 User's Manual}​​​​​,
author = {​​​​​​​​Aimsun}​​​​​​​​,
edition =  {​​​​​​​​​​​​​​​Aimsun Next 23.0.0}​​​​​​​​​​​​​​​,
address = {​​​​​​​​​​​​​​​Barcelona, Spain}​​​​​​​​​​​​​​​,
year  = {​​​​​​​​​​​​​​​2023. [Online]}​​​​​​​​​​​​​​​,
month = {​​​​​​​​​​​​​​​Accessed on: Month, Day, Year}​​​​​​​​​​​​​​​,
url = {​​​​​​​​​​​​​​​https://docs.aimsun.com/next/23.0.0/}​​​​​​​​​​​​​​​,
}​​​​​​​​​​​​​​​


Aimsun Next 20.0.5

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

title = {​​​​​​​​Aimsun Next 20.0.5 User's Manual}​​​​​​​​,
author = {​​​​​​​​Aimsun}​​​​​​​​,
edition =  {​​​​​​​​​​​​​​​Aimsun Next 20.0.5}​​​​​​​​​​​​​​​,
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 23

TY  - COMP
T1  - Aimsun Next 23 User's Manual
A1  - Aimsun
ET - Aimsun Next Version 23.0.0
Y1  - 2023
Y2 - Accessed on: Month, Day, Year
CY  - Barcelona, Spain
PB  - Aimsun
UR  - [In software]. Available: https://docs.aimsun.com/next/23.0.0/


Aimsun Next 20.0.5

TY  - COMP
T1  - Aimsun Next 20.0.5 User's Manual
A1  - Aimsun
ET - Aimsun Next Version 20.0.5
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