SUMO
Simulation of Urban MObility

- Home
- Download
- Documentation
- Wiki
- Trac
- Blog
- Contact
- SF-Project

# Simulation/Output/TripInfo

## Instantiating within the Simulation

The simulation is forced to generate this output using the option --tripinfo-output <FILE> or --tripinfo <FILE> on the command line/within a configuration. This output contains the information about each vehicle's departure time, the time the vehicle wanted to start at (which may be lower than the real departure time) and the time the vehicle has arrived. The information is generated for each vehicle as soon as the vehicle arrived at its destination and is removed from the network.

## Generated Output

The format is as following:

    <tripinfos>
        <tripinfo id="<VEHICLE_ID>" \
                depart="<DEPARTURE_TIME>" departLane="<DEPARTURE_LANE_ID>" \
                departPos="<DEPARTURE_POSITION>" departSpeed="<DEPARTURE_SPEED>" \
                departDelay="<DEPARTURE_DELAY>" \
                arrival="<ARRIVAL_TIME>" arrivalLane="<DEPARTURE_LANE_ID>" \
                arrivalPos="<ARRIVAL_POSITION>" arrivalSpeed="<ARRIVAL_SPEED>" \
                duration="<TRAVEL_TIME>" routeLength="<ROUTE_LENGTH>" \
                waitSteps="<STEPS_WITH_HALTS>" rerouteNo="<REROUTE_NUMBER>" \
                devices="<DEVICE_LIST>" vtype="<VEHICLE_TYPE_ID>"/>

       ... information about further vehicles ...

    </tripinfos>

Please note that, in contrary to the example above, for each time step, all those values are reported in one line. An entry is written each time a vehicle has arrived at his destination. In prior to this, the written values would not be known.

Name | Type | Description
--- | --- | ---
id | (vehicle) id | The name of the vehicle that is described by this entry
depart | (simulation) seconds | The real departure time (the time the vehicle was emitted into the network)
departLane | (lane) id | The id of the lane the vehicle started its journey
departPos | m | The position on the lane the vehicle started its journey
departSpeed | m/s | The speed with which the vehicle started its journey
departDelay | (simulation) seconds | The time the vehicle had to wait before it could start his journey
arrival | (simulation) seconds | The time the vehicle reached his destination at
arrivalLane | (lane) id | The id of the lane the vehicle was on when reaching his destination
arrivalPos | m | The position on the lane the vehicle was when reaching the destination
arrivalSpeed | m/s | The speed the vehicle had when reaching the destination
duration | (simulation) seconds | The time the vehicle needed to accomplish the route
routeLength | m | The length of the vehicle's route
waitSteps | simulation steps | The number of steps in which the vehicle speed was below 0.1m/s
rerouteNo | # | The number the vehicle has been rerouted
devices | [ID]* | List of devices the vehicle had. Each device is separated from the others by a ';'.
vtype | ID | The type of the vehicle

### Devices

Single devices may choose to add further output to the tripinfo file. This is currently the case for the HBEFA device which is instantiated using one of the options --device.hbefa.probability <FLOAT> or --device.hbefa.explicit <ID>[,<ID>]*. This adds the following line:

    <tripinfos>
        <tripinfo id="<VEHICLE_ID>" ... vtype="<VEHICLE_TYPE_ID>">
            <emissions CO_abs="..." CO2_abs="..." HC_abs="..." PMx_abs="..." NOx_abs="..." fuel_abs="..."/>
        </tripinfo>
       ... information about further vehicles ...

    </tripinfos>

with units as following

Name | Type | Description
--- | --- | ---
CO_abs | mg | The complete amount of CO emitted by the vehicle during the trip
CO2_abs | mg | The complete amount of CO2 emitted by the vehicle during the trip
HC_abs | mg | The complete amount of HC emitted by the vehicle during the trip
PMx_abs | mg | The complete amount of PMx emitted by the vehicle during the trip
NOx_abs | mg | The complete amount of NOx emitted by the vehicle during the trip
fuel_abs | ml | The complete amount of fuel the vehicle used during the trip

This page was last modified on 25 November 2011, at 12:23.