
The PedSettings block specifies general parameters that affect all blocks in the Pedestrian Library and tunes the models for specific tasks in order to get maximum model performance.
This block enables user-defined social distancing between pedestrians. This can be useful when modeling pedestrian flows and service areas during a pandemic, or when modeling pedestrian flows in low-density areas.
Moving pedestrians will try to maintain the social distance between each other, unless the density of pedestrians is too high (for example, in bottleneck situations). After passing such bottlenecks, pedestrians will resume maintaining the social distance.
Moving pedestrians do not maintain social distance from pedestrians waiting in queues or waiting areas.
Group members do not maintain social distance from each other while moving, in queues, or in waiting areas.
Social distance is not maintained when pedestrians are in an elevator. However, the pedestrians waiting for an elevator will attempt to maintain social distance.
Pedestrians in service queues will maintain social distance if it is enabled. Distance is only maintained along the service line. If the curves of the serpentine queue are less than the specified social distance, each pedestrian will only maintain the distance between themselves and two other pedestrians: one in front of them and one behind them. The distance between a person inside the service (servicePoint) and the queue is not considered.
Pedestrians entering the waiting area and staying there until the waiting time is over will try to maintain social distance with each other if it is enabled. If the density of pedestrians in the waiting area becomes too high, a new pedestrian entering the area will ignore the social distance.
- Enable social distancing
- Selecting this option lets you specify a social distance between pedestrians. They will try to keep it while moving or waiting in area or queue. When moving inside an elevator, or within a group, or moving through the waiting pedestrians, social distance is not maintained.
Name: enableSocialDistancing
Type: boolean
Default value: true - Social distance
- [Visible only if Enable social distancing is enabled]
Here you can specify the distance in meters that pedestrians should keep between each other.Name: socialDistance
Type: double
Default value: 1.5 meters - Allow pedestrian selection by click
-
If selected (true), user may select/deselect a pedestrian by clicking on it.
Name: allowPedestrianSelectionByClick
Type: boolean
Default value: true
Set new value at runtime: set_allowPedestrianSelectionByClick(new value) - Time step, sec.
- [Visible only if Enable social distancing is disabled]
Synchronous model time step. The value should never be equal to 0. Setting this parameter to lower values cause pedestrians to move more precisely, however requires much more performance. Recommended value is 0.3 seconds. If social distance is enabled, model time step automatically equals 0.1 seconds. The time step cannot be modified at runtime.Name: timeStep
Type: double
Default value: 0.3 seconds - Density modifier
-
Specifies how much pedestrians try to avoid crowded areas. The higher the value, the more a pedestrian cares about the number of people around and will try to steer clear of dense spots when planning a route. However, setting this value too high can make pedestrians take unrealistic, inefficient paths that do not make sense in real life. It is not recommended to set this value higher than 20.
Name: aStarDensityModifier
Type: double
Default value: 10
Set new value at runtime: set_aStarDensityModifier(new value) - Pedestrian mass
-
Specifies how strongly pedestrians move toward their destination and whether they can push through crowds. A higher value means they are more determined to reach their destination, even if it means squeezing through dense areas. However, if the value is too high, pedestrians may overlap with each other or take unrealistic paths. It is not recommended to set this value higher than 200.
Name: sfmMass
Type: double
Default value: 120
Set new value at runtime: set_sfmMass(new value) - Routing touch tolerance
-
Specifies how closely a pedestrian will follow their planned route. In the Pedestrian library, routes include intermediate points, and a lower value means the pedestrian must get very close to each point before continuing. If the value is too high, pedestrians may stray too far from the intended path and take inefficient or unpredictable routes. A recommended range for the value of this property is between 0.25 and 3.
Name: funnelTouchTolerance
Type: double
Default value: 1.25
Set new value at runtime: set_funnelTouchTolerance(new value)
- On pedestrian selected
-
Java code executed when a pedestrian becomes selected. You can select a pedestrian by clicking on his animation shape, or programmatically using the function select(ped) of PedSettings block.
Local variable: Agent ped — the selected pedestrian
- On pedestrian deselected
-
Java code executed when a pedestrian becomes deselected. You can deselect a pedestrian by clicking anywhere in the presentation, or programmatically using the function deselect(ped) of PedSettings block.
Local variable: Agent ped — the deselected pedestrian
- On group assembled
-
Java code that is executed when a pedestrian group is assembled.
Local variable: PedGroup group — the group being assembled
- On group disassembled
-
Java code that is executed when a pedestrian group is disassembled.
Local variable: PedGroup group — the group being disassembled
- On group leader changed
-
Java code that is executed when a leader of a pedestrian group is changed.
Local variables:
Agent oldLeader — old leader of the group
Agent newLeader — new leader
PedGroup group — the group - On group formation changed
-
Java code that is executed when formation of the pedestrian group is changed.
Local variables:
GroupFormation oldFormation — old group formation
GroupFormation newFormation — new formation
PedGroup group — the group - On group member added
-
Java code that is executed when a pedestrian is added to a pedestrian group.
Local variables:
Agent ped — the pedestrian being added to group
PedGroup group — the group - On group member removed
-
Java code that is executed when a pedestrian is removed from a pedestrian group.
Local variables:
Agent ped — the pedestrian being removed from group
PedGroup group — the group
| Function | Description |
|---|---|
| int countGroups() | Returns the number of groups of pedestrians in this model. |
| int countPeds() | Returns the total number of pedestrians in the pedestrian space (it does not count the pedestrians that were temporarily removed from the space using the PedExit block). |
| void selectPed(Agent ped) | Selects the pedestrian (specified via the function argument) on the animation of the running model. |
| void deselectPed() | Deselects the currently selected pedestrian. |
| Agent getSelectedPed() | Returns the currently selected pedestrian (if some pedestrian is selected at the moment, null otherwise). |
| Set<Agent> getPeds() | Returns a non-modifiable collection of all pedestrians in the model. |
| Set<PedGroup> getGroups() | Returns a non-modifiable collection of all groups in the model. |
| double pixelsToMeters(double value) | Returns a non-modifiable collection of all groups in the model. |
| double metersToPixels(double value) | Converts the specified length in meters to the number of pixels according to the animation scale defined by this block. |
-
How can we improve this article?
-