Skip to main content

Fast and lightweight file parsers for SUMO(traffic simulator) output

Project description

What's this?

Fast and lightweight file parsers for Eclipse SUMO(traffic simulator) output.

The SUMO outputs are huge in size and hard to handle.

SUMO team provides scripts to convert from xml into CSV, however, the procedure is troublesome (downloading XSD, executing python script...)

Also, machine learning users take care of matrix data format.

This package provides an easy-to-call python interface to obtain matrix form from SUMO xml files.

Contributions

  • easy-to-call python interfaces to obtain matrix form from SUMO xml files
  • easy-to-call python interfaces to visualize SUMO simulations

Gallery

You can generate a traffic animation by fcd output xml.

Example of animation

You can visualize where a detector locates in a network.

Visualization example of detector position

You can visualize a transition of vehicle by vehrout.xml.

Visualization example of traffic route

Install

pip install sumo-output-parsers

Some submodules are not ready to use by default for which we avoid errors relating Proproj or Cartopy.

If you'd like to depict car flows or detector positions, install with

pip install "sumo-output-parsers[full]"

Sample

See sample.py and visualization_example.ipynb

Test

pytest tests/

If your package-dependency is complete including packages for visualization, then pytest tests/ --visualization

For developers

Build with poetry.

Install Guide

When you encounter any dependency issues, I recommend to use conda. cartopy and proj cause the dependency issue frequently. Conda helps you to install the compiled binaries. See Proj documentation.

License

@misc{sumo-output-parsers,
  author = {Kensuke Mitsuzawa},
  title = {sumo_output_parsers},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{}},
}

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

sumo_output_parsers-0.61.tar.gz (18.2 kB view hashes)

Uploaded Source

Built Distribution

sumo_output_parsers-0.61-py3-none-any.whl (24.1 kB view hashes)

Uploaded Python 3

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page