From Sumo
Revision as of 11:13, 25 April 2014 by Namdre (talk | contribs) (using new xml template)
Jump to navigation Jump to search


A person moves through the net by walking or using vehicles. The walking behavior is customizable by selecting a pedestrian model. A person element has child elements defining stages of its plan. The stages are a connected sequence of ride, walk and stop elements as described below. Each person must have at least one stage in its plan.

<person id="foo" depart="0">
    <walk edges="a b c"/>
    <ride ../>
    <ride ../>
    <walk ../>
    <stop ../>
Attribute Type Range Default Remark
id string valid XML ids -
depart float(s) ≥0 -
type string any decelared vType
color rgb color

When specifying a type, the set of attributes which are in effect during simulation depend on the selected pedestrian model. Attributes such as width, length, imgFile and color are always used always used for visualization.


Persons are rendered in the GUI with the configured detail-level. When assigning a type with attribute imgFile, the person may be rendered with an image. By default, the image will not be rotated (suitable for abstract icons). However, when setting the types guiShape="pedestrian" the image will be rotated according to the persons location and stage.

Simulation input


Rides define the start and end point of a movement with a single mode of transport (e.g. a car or a bus). They are child elements of plan definitions.

Attribute Type Range Default Remark
from string valid edge ids - id of the start edge
to string valid edge ids - id of the destination edge
lines list valid line or vehicle ids - list of vehicle alternatives to take for the ride

the route to take is defined by the vehicle.


Walks define a pedestrian movement. They are child elements of plan definitions.

Attribute Type Range Default Remark
edges list valid edge ids - id of the edges to walk
from string valid edge ids - id of the start edge
to string valid edge ids - id of the destination edge
duration float(s) >0 -
speed float(m/s) >0 -
departPos float(m) 0 initial position on the starting edge
arrivalPos float(m) -1 arrival position o the destination edge

You can define either a list of "edges" to travel or a "from" and a "to" edge. In the former case the "edges" are traveled in the listed order. They do not need to be joined in the net. In the latter case a shortest path calculation is performed and it is an error if there is no path connecting "from" and "to". At least one attribute of "speed" and "duration" has to be given. If both are given, the walk will last at least "duration" but it may take longer if the "speed" is low.

When given as router input input using a attributes from and to will be transformed into a walk using the attribute edges by routing along edges permissible for pedestrian (i.e. sidewalks).


Stops define a delay until the next element of a plan is started. They can be used to model activities such as working or shopping. Stops for persons follow the specification at Specification#Stops. However, only the attributes lane, duration and until are evaluated. Using these attributes it is possible to model activities with a fixed duration as well as those with a fixed end time.

Simulation behavior

A person is starting her life at her depart time on the source (resp. first) edge of the first walk, ride or stop. She tries to start the next step of her plan.


The person checks whether a vehicle with a line from the given list is stopping at the given edge. If so, it enters the vehicle and starts the ride. It does not check whether the vehicle has the aspired destination on the current route. The first time the vehicle stops (on a well defined stop) at the destination edge, the ride is finished and the person proceeds with the next step in the plan.


The walking behavior of a person depends on the selected pedestrian model. Generally, the person follows the given sequence of edges with a speed bounded by the maxSpeed attribute of the persons type. It starts either at the position from the previous stage of its plan or at the specified departPos if no previous stage exists. The walk concludes at the specified arrivalPos which defaults to the end of the final edge.


The person stops for the maximum of currentTime+duration and until.


The following is an example for a person who walks to a train station, rides the train, alights and walks for a bit, then stops for an activity and finally gets into a car and drives away.

    <person id="person0" depart="0">
        <walk from="2/3to1/3" to="1/3to0/3" departPos="80" arrivalPos="55"/>
        <ride from="1/3to0/3" to="0/4to1/4" lines="train0"/>
        <walk from="0/4to1/4" to="1/4to2/4" arrivalPos="30"/>
        <stop lane="1/4to2/4_0" duration="20" startPos="40" actType="singing"/>
        <ride from="1/4to2/4" to="3/4to4/4" lines="car0"/>

    <vehicle id="train0" depart="50">
        <route edges="1/4to1/3 1/3to0/3 0/3to0/4 0/4to1/4 1/4to1/3"/>
        <stop busStop="busStop0" until="120" duration="10"/>
        <stop busStop="busStop1" until="180" duration="10"/>

    <vehicle id="car0" depart="triggered">
        <route edges="1/4to2/4 2/4to3/4 3/4to4/4" departPos="30"/>
        <stop lane="1/4to2/4_0" duration="20" startPos="40" endPos="60"/>


Planned featues

The following features are not yet implemented.


A persons plan has the same role has a vehicles route: A person may reference a plan or a distribution of plans using the attribute plan. Likewise a person may include a plan or a distribution of plans as a child element. A plan is a sequence of stages (rides, walks and stops).

Attribute Type Range Default Remark
probability float ≥0 1 this is only evaluated if a person has multiple plans, the probability values of all plans do not have to add to 1, they are scaled accordingly before choosing


A personFlow has the same role as a flow. It allows to specify a sequence of persons with the same plan (or distribution of plans) with a single input element.

Intermodal Routing

The router input is still not completely defined. There has to be a possibility to define for the trips which vehicles / public transport lines may be used at all and for which vehicles the route can be defined / changed by the person.


Trips define the start and end point of a movement with optional changes in mode.

In definition they are identical to vehicles except for the missing route information (no route attribute and no route child is allowed). Instead they have the following attributes

Attribute Type Range Default Remark
from string valid edge ids - id of the start edge
to string valid edge ids - id of the destination edge
It is an error for subsequent trips to be unconnected.