SUMO
Simulation of Urban MObility

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

# Simulation/Output/RawDump

In the hope that every user wants to know different things and is able to write a tool that parses this information from a not aggregated output, the network dump was the first output capability that was implemented in SUMO.

## Instantiating within the Simulation

To force SUMO to build a file that contains the network dump, extend your command line (or configuration) parameter by --netstate-dump <FILE> (or --ndump <FILE> or --netstate <FILE>).

In the configuration file, add a line inside the output section, e.g.:

    <output>
       <netstate-dump value="<FILE>" />
    </output>

<FILE> is the name of the file the output will be written to. Any other file with this name will be overwritten, the destination folder must exist.

## Generated Output

The network dump is a xml-file containing for each time step every edge of the network with every lane of this edge with all vehicles on this lane. For each vehicle, its name, speed and position on its respecitve lane are written. A raw dump-file looks like this:

    <netstate>
       <timestep time="<TIME_STEP>">
          <edge id="<EDGE_ID>">
             <lane id="<LANE_ID>">
                <vehicle id="<VEHICLE_ID>" pos="<VEH_POSITION>" speed="<VEH_SPEED>"/>

                ... more vehicles if any on this lane ...

             </lane>

             ... more lanes if the edge possesses more ...

          </edge>

          ... more edges ....

       </timestep>

    ... the next timestep ...

    </netstate>

The meanings of the written values are given in the following table.

Name | Type | Description
--- | --- | ---
time | (simulation) seconds | The time step described by the values within this timestep-element
id | id | The id of the edge/lane/vehicle
pos | m | The position of the vehicle at the lane within the described time step
speed | m/s | The speed of the vehicle within the described time step

## Notes

As you may imagine, this output is very verbose. Its main disadvantage is the size of the generated file. It's very easy to generate files that are several GB large within some minutes. It is of course possible to write some nice tools that parse the file (using a SAX-parser) and generate some meaningful information, but we do not know anyone who has made this. Another problem is that the simulation's execution speed of course breaks down when such an amount of data must be written.

Normally, all lanes are written, even if there is no vehicle on them. You can change this behaviour using the boolean switch --netstate-dump.empty-edges. In this case, only those edges and lanes will be written that contain vehicles.

This page was last modified on 2 May 2013, at 11:42.