Skip to main content

Simple Python interface for a traffic simulator: SUMO

Project description

sumo-tasks-pipeline


Run SUMO simulators as easy as possible!

The package sumo-tasks-pipeline enables you to run a traffic simulator SUMO efficiently and to interact with Python easily.

Example

Just three lines to run a SUMO simulation.

from sumo_tasks_pipeline import LocalSumoController, SumoConfigObject
from pathlib import Path

path_config = Path().cwd().joinpath('tests/resources/config_complete')
sumo_controller = LocalSumoController(sumo_command='/usr/local/bin/sumo')
sumo_config = SumoConfigObject(scenario_name='example', path_config_dir=path_config, config_name='grid.sumo.cfg')
sumo_result_obj = sumo_controller.start_job(sumo_config)

See examples directory to know more.

Features

  • Possible to resume your tasks. The feature is useful when you run simulators on Google Colab.
  • Possible to save SUMO simulation result to Google Cloud Storage (GCS). No worries even when your local storage is small.
  • Possible to run SUMO simulations with multiple machines if you use GCS as the storage backend.

Requirement

  • python > 3.5
  • docker
  • docker-compose

Install

Pull the image (or build of a docker image with SUMO)

The existing image is on the Dockerhub.

docker pull kensukemi/sumo-ubuntu18

If you prefer to build with yourself, you run the following command.

docker-compose build 

Install a python package

make install

For developer

pytest tests

license and credit

The source code is licensed MIT. The website content is licensed CC BY 4.0.

@misc{sumo-docker-pipeline,
  author = {Kensuke Mitsuzawa},
  title = {sumo-tasks-pipeline},
  year = {2021},
  publisher = {GitHub},
  journal = {GitHub repository},
  howpublished = {\url{https://github.com/Kensuke-Mitsuzawa/sumo_docker_pipeline}},
}

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-tasks-pipeline-4.0.tar.gz (15.1 kB view hashes)

Uploaded Source

Built Distribution

sumo_tasks_pipeline-4.0-py3-none-any.whl (21.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