Specification/Persons

From Sumo
Revision as of 13:58, 27 January 2011 by Namdre (talk | contribs) (always connect your trips. If you want to model a helicopter ride use a dummy walk)
Jump to navigation Jump to search

Persons

A person moves through the net by walking or using vehicles. It has at least one plan as child element. If it has multiple plans it chooses one at random where the probability may be given in the plan definition. If the person has exactly one plan the explicit "plan" may be omitted, e.g.

<person id="x">
    <plan>
    ...
    </plan>
</person>

is equivalent to

<person id="x">
    ...
</person>
Attribute Type Range Default Remark
id string valid XML ids -
depart float(s) ≥0 -
departpos float(m)/string ≥0(1),"random" 0
arrivalpos float(m)/string ≥0(1),"random","max" "max"
  • (1): in fact, negative positions are currently allowed, too. In this case, this value is added to the lane's length. This means, the position is counted from the end of the lane. Values lying beyond the edge borders (positive and negative) are silently moved to the closest edge border.

Plans

A plan is a sequence of trips and stops if it serves as a router input or of walks, rides and stops if it serves as simulation input.

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

Router input

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

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
Note:
It is an error for subsequent trips to be unconnected.

Simulation input

Rides

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 flow or vehicle ids - list of vehicle alternatives to take for the ride

the route to take is defined by the vehicle.

Walks

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
duration float(s) >0 -
speed float(m/s) >0 -

The "edges" are traveled in the listed order. They do not need to be joined in the net. If they are not, a shortest path calculation is done between two consecutive list members. If there is no path connecting the two edges the linear distance is taken (this does not work yet. only listed edges contribute to travel time). 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.

Stops

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.

Riding

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.

Walking

The time to reach the last edge of the walk is calculated either from speed and length of the edges or directly from the duration given. The step is finished if the person reaches the last edge of the list.

Stopping

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