AnyLogic 9
Expand
Font size

Phase 3. Pedestrian density map

We have created the model simulating pedestrian flows inside the subway entrance building. Now we want to get some statistics on the pedestrian flow. The most powerful tool used in the pedestrian simulation is the Density map.

Add the pedestrian density map and run the model

  1. Drag the  Density map element from the Space Markup section of the  Pedestrian Library palette to the graphical editor. The element acts as the color scheme. It will show the density map legend during the runtime. The legend of the density map describes the correspondence of the colors on the density map to the density values.

  2. Click the  Play button in the toolbar to run the model.

Density map

You will see that as pedestrians enter the simulated space, the layout is gradually painted in different colors. The color of every point of the space corresponds to the current density in this particular area. The density map is constantly updated: when the density changes in some point, the color changes dynamically to reflect this change. In case of zero density the area is not painted at all.

The density map is commonly used to detect the areas with critical densities. Red color indicates the critical density (by default it is equal to 1,5 pedestrians/m2). You can change this value in the Density Map's Critical density parameter. Blue color is used for low densities. The density map is not drawn for area with zero density. The legend shown in the figure above tells us e.g. that the yellow color on the map corresponds to the density of 0,75 pedestrians/m2.

By default AnyLogic uses the logarithmic color scheme. In this case the color changes logarithmically from the "minimum" (blue) color to the "maximum" (red) color. This color scheme is frequently used when you need to pay attention only to the density values close to the critical value threshold. You can change the logarithmic color scheme to the linear scheme by choosing the Linear option in the Color scheme parameter of the Density Map. It is the simplest color scheme: color changes linearly from the “minimum” color to the “maximum” (red) color. You can even define your own color scheme by choosing the Custom option in the Color scheme parameter, and defining the correspondence between colors and density values in the Custom color parameter.

You may notice that the density map can be drawn even in the areas without pedestrians. The reason is that the density map may either display the maximum observed density values (if attenuation is turned off), or the actual density map for the recent period of time (if attenuation is turned on). By default attenuation is turned on. With the attenuation being turned on, the color for the corresponding area on the density map changes with the specified delay, and not immediately with the actual changes of the density. To turn the attenuation on, select the Enable attenuation checkbox in the Density Map properties.

If the layout below the density map becomes barely visible, you can increase the transparency level of the density map in the Transparency parameter of the Density Map properties.

Demo model: Subway Entrance Hall — Phase 3 Open the model page in AnyLogic Cloud. There you can run the model or download it (by clicking Model source files). Demo model: Subway Entrance Hall — Phase 3Open the model in your AnyLogic desktop installation.

In the next phase we will add new logic to our model.

How can we improve this article?