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
About The Project
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
-
Get the package from the Python Package Index.
pip install sumo-experiments
-
Check that the
$SUMO_HOMEenvironment 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
.bashrcfile.
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!
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - 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
- othneildrew for his useful README template.
Metadata
Release files for sumo-experiments 5.8.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| sumo_experiments-5.8.4.tar.gz | 8.5 MB | Without provenance | Details for sumo_experiments-5.8.4.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| sumo_experiments-5.8.4-py3-none-any.whl | Python 3 | none | any | Details for sumo_experiments-5.8.4-py3-none-any.whl |
Total release size: 15.3 MB
Release files / sumo_experiments-5.8.4.tar.gz
| Download URL | sumo_experiments-5.8.4.tar.gz |
|---|---|
| Size | 8.5 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
2dcbce61571c3dc1c6160bcf788a1c92d537fcb3e0bbd205ef6db1f4c2ffc4a4
|
|
BLAKE2b-256 checksum How to use checksums |
6a7b33de66d2f97481ef112595ba61e55e75dc28a225edee648775a595c6ba10
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Release files / sumo_experiments-5.8.4-py3-none-any.whl
| Download URL | sumo_experiments-5.8.4-py3-none-any.whl |
|---|---|
| Size | 6.9 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
fd20bbcec27b33577ce7605bd34682fd833e35d0cf363703a07f1b221b4ff21f
|
|
BLAKE2b-256 checksum How to use checksums |
2719ffeef1d4efee3bccfea412be95981b358a2ba9616077992a00d68773cdd3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.12.3
|
Security for sumo-experiments 5.8.4
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.