AnyLogic enables displaying car density map (showing the traffic jams currently present in the simulated road network).
Demo model: Displaying Traffic Jams Open the model page in AnyLogic Cloud. There you can run the model or download it (by clicking Model source files).You will see that the layout is gradually painted in different colors as cars move in the simulated space. The color of each road segment corresponds to the current car density on it. The density map uses colors from green to red to display different car densities. Red color is used to display road segments with critical densities (traffic jams). Green color is used to show road segments with normal traffic.
The density map is constantly repainted according to the actual values: when the density changes on some road segment, its color changes dynamically to reflect this change.
By default the car density map is not shown, but you can turn it on with just one click.
To show car density map
- If you have not added RoadNetworkDescriptor in your model yet, drag the Road Network Descriptor element from the Blocks section of the Road Traffic Library palette onto the graphical diagram where your car traffic flowchart is defined.
- In the Road network combo box, select the road network you are working with.
- Open the Density map section of Road Network Descriptor properties.
- Select the Enable density map checkbox. Now if you run your car traffic model, you will see the car density map being displayed.
To configure density map
- Open the Density map section of Road Network Descriptor properties.
- If you are not satisfied with the car density map painted over the model animation and making it hardly visible, you may increase the transparency level for the density map using the slider Map transparency (0..1) in the Road Network Descriptor properties. Choose the value from the range [0..1]. 0 means fully transparent map (the density map is not visible), 1 means fully opaque density map (the animation underneath the density map is not visible at all). The default transparency value is 0.6.
- You can customize the speed level corresponding to density map’s green color. Set your own speed in the Green speed level property. The road segment will be drawn in green if cars can move on this segment with the speed defined in this property (or quicker). By default green speed level is 60 kilometers per hour.
- You can also adjust the length of the density map segment in the Map section length property.
-
How can we improve this article?
-