Definition of Vehicles, Vehicle Types, and Routes


Filename extension .rou.xml
Type of content Vehicles, Vehicle Types, and Routes
Open format? Yes
SUMO specific? Yes
XML Schema routes_file.xsd

There are various applications
that can be used to define vehicular demand for SUMO. Of course it is
also possible to define the demand file manually or to edit generated
files with a text editor. Before starting, it is important to know that
a vehicle in SUMO consists of three parts:

  • a vehicle type which describes the vehicle’s physical properties,
  • a route the vehicle shall take,
  • and the vehicle itself.

Both routes and vehicle types can be shared by several vehicles. It is
not mandatory to define a vehicle type. If not given, a default type is
used. The driver of a vehicle does not have to be modelled explicitly.
For the simulation of persons which walk around or ride in vehicles, additional definitions are necessary.

Initially, we will define a vehicle with a route owned by him only:

<routes>
    <vType id="type1" accel="0.8" decel="4.5" sigma="0.5" length="5" maxSpeed="70"/>

    <vehicle id="0" type="type1" depart="0" color="1,0,0">
      <route edges="beg middle end rend"/>
    </vehicle>

</routes>

By giving such a route definition to SUMO (or
SUMO-GUI), SUMO will build a
red (color=1,0,0) vehicle of type “type1” named “0” which starts at time
0. The vehicle will drive along the streets “beg”, “middle”, “end”, and
as soon as it has approached the edge “rend” it will be removed from the
simulation.

This vehicle has its own internal route which is not shared with other
vehicles. It is also possible to define two vehicles using the same
route. In this case the route must be “externalized” – defined before
being referenced by the vehicles. Also, the route must be named by
giving it an id. The vehicles using the route refer it using the
“route”-attribute. The complete change looks like this:

<routes>
    <vType id="type1" accel="0.8" decel="4.5" sigma="0.5" length="5" maxSpeed="70"/>

    <route id="route0" color="1,1,0" edges="beg middle end rend"/>

    <vehicle id="0" type="type1" route="route0" depart="0" color="1,0,0"/>
    <vehicle id="1" type="type1" route="route0" depart="0" color="0,1,0"/>

</routes>

A vehicle may be defined using the following attributes:

Attribute Name Value Type Description
id id (string) The name of the vehicle
type id The id of the vehicle type to use for this vehicle.
route id The id of the route the vehicle shall drive along
color color This vehicle’s color
depart float (s) or one of triggered, containerTriggered The time step at which the vehicle shall enter the network; see #depart. Alternatively the vehicle departs once a person enters or a container is loaded
departLane int/string (≥0, “random”, “free”, “allowed”, “best”, “first”) The lane on which the vehicle shall be inserted; see #departLane. default: “first”
departPos float(m)/string (“random”, “free”, “random_free”, “base”, “last”, “stop”) The position at which the vehicle shall enter the net; see #departPos. default: “base”
departSpeed float(m/s)/string (≥0, “random”, “max”, “desired”, “speedLimit”) The speed with which the vehicle shall enter the network; see #departSpeed. default: 0
arrivalLane int/string (≥0,”current”) The lane at which the vehicle shall leave the