Many modelers aren’t aware of this incredibly useful feature in Aimsun Next. In this technical note, Tessa Hayman reveals how to set different speed limits for different vehicle types in dynamic models.
In certain situations, the speed limit for each vehicle type is different. For instance, on a single-carriageway road in the UK, vehicles over 7.5 tonnes can only travel at 50 miles per hour but other vehicles can travel at 60 miles per hour. You can code this in Aimsun Next through the use of traffic management for microscopic and mesoscopic models, or within the delay functions for macroscopic models.
For microscopic and mesoscopic models, the speed for a road is set by the “Speed Limit” parameter. This can be reduced for a vehicle class through using a traffic management action called “Speed Reduction”, which you can also use to reduce turn speeds for larger vehicles.
How to add a speed reduction action to one section/turn
Step 1: Add a traffic condition by going to the Project menu > Traffic Management > New > Traffic Condition
Step 2: Double-click on the Traffic Condition to open it. Select Activation Condition: Always and Apply to Warm up.
Traffic Condition parameters
Step 3: Add a speed reduction action by right-clicking the Traffic Condition > New > Speed Reduction
Step 4: Select the speed reduction parameters.
In the speed reduction menu, you can specify which section/turn the action is applied to, what the new speed will be and choose to apply the action only to a certain vehicle class. In the example above, the Heavy class has been chosen which includes all vehicle types with vehicles over 7.5t.
The above method is valid for one section or one turn at a time; this would be an arduous task for a model with a large number of roads where HGVs have different speed limits. However, you can also choose to apply a speed change to a grouping of sections, a grouping of turns or a road type.
Applying Speed reduction for all sections in a road type with a set number of lanes using a script
However, it may be the case that you want to apply a speed reduction to a subset of sections for a road type such as single-carriageway roads with a 60-mile-per-hour speed limit without having these be a separate road type.
The following script can be used to apply a speed reduction action for a given road type while also checking the number of lanes in the section. You need to specify the Traffic Condition name, new speed, vehicle class and road type and number of lanes for which the new speed would apply. The script will then iterate over all sections in the model of the specified road type and add a speed reduction action for each one.
The pseudocode for this is:
Get/Create Traffic Condition
Get vehicle class
For all sections:
If section.roadtype==roadtype and section.numberoflanes:
Create speed reduction action
Add speed reduction to Traffic Condition