- 1 Pedestrian Simulation
- 2 Building a network for pedestrian simulation
- 3 Generating pedestrian demand
- 4 Pedestrian Models
- 5 Interaction between pedestrians and other modes
This page describes simulations of pedestrians in SUMO. Pedestrians are persons that walk. To build an intermodal simulation scenario with proper interactions between road vehicles and pedestrians, additional steps have to be take in comparison to a plain vehicular simulation.
Building a network for pedestrian simulation
When walking along an edge, pedestrians use sidewalks where available. A sidewalks is a lane which allows only the sumo vClass pedestrian. When crossing a road at an intersection, pedestrians use special lanes of type crossing. The area that connects sidewalks with crossings is modeled by special lanes of the type walkingarea. In the following, we describe how to build a simulation network that contains sidewalks, crossings and walkingareas.
When performing pedestrian routing, the router distinguishes between networks that contain walkingareas and those which do not. In the former, pedestrians may only cross a street whenever there is a pedestrian crossing. In the latter they may "jump" between any two edges which allow pedestrians at an intersection.
Generating a network with sidewalks
A sidewalk is a lane which only permits the vClass pedestrian. There are various different options for generating a network with sidewalks which are explained below. All of these options recognize the presence of an existing sidewalk and will not add another lane in that case.
Explicit specification of additional lanes
Sidewalks may be defined explicitly in plain XML input when describing edges (plain.edg.xml). This is done by defining an additional lane which only permits the vClass “pedestrian” and setting the appropriate width. In this case it is important to disallow pedestrians on all other lanes. Also, any pre-exisiting connection definitions must be modified to account for the new sidewalk lane.
Explicit specification of sidewalks
Alternatively to the above method, the <edge> -attribute sidewalkWidth may be used. It will cause a sidewalk of the specified width to be added to that edge, connections to be remapped and pedestrian permissions to be removed from all other lanes.
When importing edges with defined types, it is also possible to declare that certain types should receive a sidewalk. This can be used to automatically generate sidewalks for residential streets while omitting them for motorways when importing OSM data. An example type file can be found in <SUMO_HOME>/data/typemap/osmNetconverPedestrians.typ.xml.
<types> <type id="highway.motorway" numLanes="3" speed="44.44" priority="13" oneway="true" disallow="pedestrian bicycle"/> <type id="highway.unclassified" numLanes="1" speed="13.89" priority="5" sidewalkWidth="2" disallow="pedestrian"/> <type id="highway.residential" numLanes="1" speed="13.89" priority="4" sidewalkWidth="2" disallow="pedestrian"/> <type id="highway.living_street" numLanes="1" speed="2.78" priority="3"/> <type id="highway.service" numLanes="1" speed="5.56" priority="2" allow="delivery pedestrian"/> ... </types>
A third option which can be used if no edge types are available is a heuristic based on edge speed. It adds a sidewalk for all edges within a given speed range. This is controlled by using the following options:
|--sidewalks.guess <BOOL>||Guess pedestrian sidewalks based on edge speed|
|--sidewalks.guess.max-speed <FLOAT>||Add sidewalks for edges with a speed equal or below the given limit default:13.89|
|--sidewalks.guess.min-speed <FLOAT>||Add sidewalks for edges with a speed above the given limit default:5.8|
|--sidewalks.guess.exclude <ID>[,<ID>]*||Specify a list of edges that shall not receive a sidewalk|
Option --sidewalks.guess.from-permissons <BOOL> is suitable for networks which specify their edge permissions (such as DlrNavteq). It adds a sidewalk for all edges which allow pedestrians on any of their lanes. The option --sidewalks.guess.exclude <ID>[,<ID>]* applies here as well.
Adding sidewalks with NETEDIT
To add sidewalks to a set of edges in NETEDIT select these and right click on them. From the context-menu select 'add special lanes'->Sidewalks.
Generating a network with crossings
Crossings may be defined explicitly in plain XML input when describing connections (plain.con.xml) using the XML element crossings.
The second available method adding crossing information to a network is with the option --crossings.guess <BOOL>. This enables a heuristic which adds crossings wherever sidewalks with similar angle are separated by lanes which forbid pedestrians. If the edges to be crossed have sufficient distance between them or vary a by a sufficient angle, two crossings with an intermediate walking area are generated. To use this option sidewalks should be defined for the network.
Generating pedestrian demand
Pedestrian demand may be specified explicitly as described at Specification/Persons#Walks or it may be generated. The tool Tools/Trip#randomTrips.py supports generating random pedestrian demand using the option --pedestrians. The option --max-dist <FLOAT> may be used to limit the maximum air distance of pedestrian walks.
The pedestrian model to use can be selected by using the simulation option --pedestrian.model <STRING> with the available paramters being nonInteracting and striping (default is striping). The interface between the pedestrian model and the rest of the simulation was designed with the aim of having a high degree of freedom when implementing new models. It is planned to implement models with a higher level of interaction detail in the future.
This is a very basic walking model. Pedestrians walk bidirectionally along normal edges and “jump” across intersections. They maybe either be configured to complete a walk in a fixed amount of time or to move along the edges with a fixed speed. No interaction between pedestrians and vehicles or other pedestrians takes place. This model has a very high execution speed and may be useful if the pedestrian dynamics are not important.
This model assigns 2D-coordinates within a lane (of type sidewalk, walkingarea or crossing) to each pedestrian. These coordinates which are defined relative to the leftmost side of the start of the lane are updated in every simulation step. This is in contrast to the coordinates of vehicles, which (generally) only have 1D-coordinates within their respective lane. Pedestrians advance along a lane towards the next node which may either correspond to the natural direction of the lane (forward movement) or it may opposite to the natural direction (backward movement). Thus, the x coordinate monotonically increase or decreases while on a lane. Once the end of a lane has been reached, the pedestrian is placed on the next lane (which may either be unique or determined dynamically with a routing algorithm).
The most important feature of pedestrian interactions is collision avoidance. To achieve this, the “striping”-model divides the lateral width of a lane into discrete stripes of fixed width. This width is user configurable using the option --pedestrian.striping.stripe-width <FLOAT> and defaults to 0.65 m. These stripes are similar to lanes of a multi-lane road. Collision avoidance is thus reduced to maintaining sufficient distance within the same stripe. Whenever a pedestrian comes too close to another pedestrian within the same stripe it moves in the y-direction (laterally) as well as in the x-direction to change to a different stripe. The y-coordinate changes continuously which leads to situations in which a pedestrian temporarily occupies two stripes and thus needs to ensure sufficient distances in both. The algorithm for selecting the preferred stripe is based on the direction of movement (preferring evasion to the right for oncoming pedestrians) and the expected distance the pedestrian will be able to walk in that stripe without a collision.
During every simulation step, each pedestrian advances as fast as possible while still avoiding collisions. The updates happen in a single pass for each walking direction with the pedestrian in the front being updated first and then its followers sorted by their x-coordinate. The speed in the x-direction may be reduced by a random amount with the maximum amount defined as a fraction of the maximum speed, using the global option --pedestrian.striping.dawdling <FLOAT> (defaulting to 0.2). As a consequence of the above movement rules, pedestrians tend to walk side by side on sidewalks of sufficient width. They wait in front of crossings in a wide queue and they form a jam if the inflow into a lane is larger than its outflow.
More complicated movement rules apply when moving on a walkingarea. Here, pedestrians paths cross in multiple directions. The actual path taken across the walkingarea consists of 1-3 linear segments and is unique for each pair of adjacent sidewalks or crossings. The pedestrians on each path of these paths compute their movements as if they were on a sidewalk. However, all other pedestrians are mapped into the coordinate system of that path in order achieve collision avoidance.
Interaction between pedestrians and other modes
A pedestrian wishing to cross the street at an uncontrolled intersection can only do so if its expected time slot for using the intersection does not interfere with that of an approaching vehicle. It should be noted that the dynamics at unprioritized crossings are conservative in estimating the time required gap. In the simulation, pedestrians will only use such a crossing if the whole length of the crossing is free of vehicles for the whole time needed to cross. At priority crossings, pedestrians cross without regard for vehicles.
Vehicles are prevented from driving across a pedestrian crossing which is occupied by pedestrians. If a pedestrian is found which is not yet past the intersection point (between the crossing and the vehicles trajectory) but within a threshold distance to that point (currently hardcoded as 10m) the crossing is considered to be blocked.