Skip to main content

Contributors Forks Stargazers Issues Status Version MIT License LinkedIn


Logo

sumo-experiments

The sumo-experiments library implements a python interface for the Simulation of Urban MObility (SUMO) software.

Examples · Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgments

About The Project

SUMO simulation


The sumo-experiments package aims to provide an ergonomic environment for creating and configuring highly reproducible SUMO simulations.

Creating a SUMO network for a simulation is very time-consuming. Infrastructure and flows have to be defined either using the netedit tool, or by manually creating all the numerous XML configuration files. This complexity also makes it difficult to reproduce experiments taken from scientific papers. The sumo-experiments package aims to solve this problem by deploying a set of tools to define SUMO networks, automatically generate configuration files and launch simulations, directly from Python.

For further information, please refer to the jupyter notebooks in the examples folder, which will guide you through the use of the package.

Getting Started

Prerequisites

This package only work with Debian distributions. Also, you must install SUMO. Please refer to the SUMO installation manual.

Installation

  1. Get the package from the Python Package Index.

    pip install sumo-experiments
    
  2. Check that the $SUMO_HOME environment variable is set. This command must return the value of $SUMO_HOME.

    printenv | grep 'SUMO_HOME'
    

    If the variable is not set, you can add it temporarily with the following command.

    export SUMO_HOME=your_path_to_sumo
    

    To set this variable permanently, write this in the .bashrc file.

Usage

This script is one of the more simple uses of the package. We first instanciate a preset network from preset_networks. This network contains only one intersection, making the junction between two two-way roads, with one lane for each way. Secondly, we instanciate an Experiment with three parameters : - The name of the experiment - A function that defines the infrastructures of the network (nodes, edges, connections, etc) from the preset network - A function that defines the flows of the simulation (vehicle types, density, etc) from the preset network Finally, we run the simulation with the SUMO GUI. We recommand you to use the clean files method to delete all configuration and data files.

from sumo_experiments import Experiment
from sumo_experiments.preset_networks import IntersectionNetwork

network = IntersectionNetwork()
exp = Experiment('Test', network.generate_infrastructures, network.generate_flows_all_directions)
exp.run(gui=True)
exp.clean_files()

For more examples, please refer to the examples folder

Contributing

Contributions are what make the open source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the LGPL-2.1 License. See LICENSE.txt for more information.

Contact

Jules Bompard - Linkedin - jules.bompard.etu@univ-lille.fr

Project Link: https://github.com/cristal-smac/sumo-experiments

Acknowledgments

Download files

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

Source Distribution

sumo_experiments-5.8.3.tar.gz (8.5 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

sumo_experiments-5.8.3-py3-none-any.whl (6.9 MB view details)

Uploaded Python 3

File details

Details for the file sumo_experiments-5.8.3.tar.gz.

File metadata

  • Download URL: sumo_experiments-5.8.3.tar.gz
  • Upload date:
  • Size: 8.5 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.3

File hashes

Hashes for sumo_experiments-5.8.3.tar.gz
Algorithm Hash digest
SHA256 c0faf34dee38c95c11a7678b19536151b2354cf9c21e7437e59d3b62a1e6697d
MD5 2f115e0053c0adbd1f1e5d33020574ea
BLAKE2b-256 917d3b3d548d315f4dd5476694c83c651458bf0a9ef67d9d71149cc66e952de7

See more details on using hashes here.

File details

Details for the file sumo_experiments-5.8.3-py3-none-any.whl.

File metadata

File hashes

Hashes for sumo_experiments-5.8.3-py3-none-any.whl
Algorithm Hash digest
SHA256 ba8a7ecd1544625d8a037e7263e71dd0b3e12e242cd09d20a570174ce55fc9cd
MD5 9abbb92bc17363557d35d4921b8b2130
BLAKE2b-256 941cc5fe7eb6b3b7f541896960094aa3678d75fe75bd3fc9b5c5130aa20e47d5

See more details on using hashes here.

Release history Release notifications | RSS feed

5.8.4

2 files

This release

5.8.3 This release

2 files

5.8.2

2 files

5.8.1

2 files

5.8.0

2 files

5.7.1

2 files

5.7.0

2 files

5.6.0

2 files

5.5.0

2 files

5.4.0

2 files

5.3.3

2 files

5.3.2

2 files

5.3.1

2 files

5.3.0

2 files

5.2.1

2 files

5.2.0

2 files

5.1.0

2 files

5.0.0

2 files

4.3.2

2 files

4.3.1

2 files

4.3.0

2 files

4.2.0

2 files

4.1.1

2 files

4.1.0

2 files

4.0.0

2 files

3.4.5

2 files

3.4.4

2 files

3.4.3

2 files

3.4.2

2 files

3.4.1

2 files

3.4.0

2 files

3.3.2

2 files

3.3.1

2 files

3.3

2 files

3.2.1

1 file

3.2.0

2 files

3.1.0

2 files

3.0.1

2 files

3.0.0

2 files

2.1.0

2 files

2.0.0

2 files

1.0.9

2 files

1.0.8

2 files

1.0.7

2 files

1.0.6

2 files

1.0.5

2 files

1.0.4

2 files

1.0.3

2 files

1.0.2

2 files

1.0.1

2 files

1.0.0

2 files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page