FleetPy is an open-source fleet simulation framework for modeling and controlling vehicle fleets in ride-sharing, autonomous mobility, and on-demand transport applications.
Whether you're a researcher, transportation engineer, or mobility innovator, FleetPy helps you analyze and optimize fleet operations, routing strategies, and demand-responsive services.
πΆβπ«οΈ Fleetpy for dummies π Read the Wiki | π Installation Guide | π Quickstart
β
Agent-Based Simulation β Models individual vehicles, passengers, and operators.
β
Flexible User-Operator Interaction β Supports multiple request-acceptance models.
β
Multi-Fleet Management β Simulates ride-pooling, dispatching, and EV charging.
β
Customizable Routing Algorithms β Choose between memory-efficient and fast methods.
β
Modular & Extensible Design β Easily integrate new demand models, routing strategies, or data sources.
β
Optimized for Large-Scale Scenarios β Handles thousands of vehicles and requests efficiently.
Get up and running in just a few commands!
# Clone the repository
git clone https://github.com/TUM-VT/FleetPy.git
cd FleetPy
# Set up the virtual environment
conda env create -f environment.yml
conda activate fleetpy
# Run an example simulation
python run_examples.pyβ The results will be saved in FleetPy/studies/example_study/results/
β To visualize the results, run:
python replay_pyplot.py scenario_result_directoryEnsure you have Anaconda installed.
# Fetch the latest updates
git clone https://github.com/TUM-VT/FleetPy.git
cd FleetPy
# Set up a Conda environment
conda env create -f environment.yml
conda activate fleetpyFor improved routing efficiency, compile the C++ router:
cd FleetPy/src/routing/cpp_router
python setup.py build_ext --inplaceEnsure a C++ compiler and Cython are installed.
For advanced optimization tasks, install the necessary optimizers:
To install Gurobi:
python -m pip install gurobipy==12.0.1You can acquire a free academic license from Gurobi. π
To install Google's OR-Tools:
pip install ortoolsThis is useful for combinatorial optimization and routing problems.
For now, you can inspect the data structures and files in the examples provided in GitHub:
- π
FleetPy/data - π
FleetPy/studies
More detailed descriptions of the data structure, preprocessing steps, and result data will be provided in upcoming versions. Additionally, a GUI to set up scenarios (with a choice of submodules and data) is planned for the future. π¨
In general, you can save your data and study definitions in the mentioned directories. These are included in .gitignore.
To test an example scenario:
python run_examples.pyβ The output will be stored in:
π FleetPy/studies/example_study/results/
| File Name | Description |
|---|---|
1_user_stats.csv |
User request statistics |
2_0_op-stats.csv |
Fleet vehicle task logs |
standard_eval.csv |
Aggregated evaluation results |
To analyze trends:
python FleetPy/src/evaluation/temporal.py scenario_result_directoryTo visualize a previously simulated scenario, run:
python replay_pyplot.py scenario_result_directory <sim_seconds_per_real_second>π (Optional: Specify start time as an additional argument.)
Input data and corresponding example scenario files are available for large-scale case studies of Manhattan, NY, Chicago, IL, and Munich, Germany. This data can be used as benchmark data sets to test and compare new algorithms or to set up large-scale simulations quickly. The FleetPy input data can be downloaded here and has to be copied into the FleetPy/data folder:
- Manhattan: https://doi.org/10.5281/zenodo.15187906
- Chicago: https://doi.org/10.5281/zenodo.15189440
- Munich: https://doi.org/10.5281/zenodo.15195726
We welcome contributions from the community! π
π How to contribute:
- Fork the repo & create a feature branch (
git checkout -b new-feature). - Commit your changes (
git commit -m "Added a cool feature"). - Push to your branch (
git push origin new-feature). - Make sure that the module tests are running (
\studies\module_tests\run_module_tests.py). - Open a Pull Request!
π¬ Join the discussion: GitHub Discussions
π» Contribute: Open an issue or PR!
β Support FleetPy: Give us a star β on GitHub!
π Stay updated: Follow us on Homepage & LinkedIn
β Windows 10 Pro x64
β Chrome 79.0.3945
β Python 3.10
FleetPy has been applied in various academic and applied research projects across topics like shared mobility, autonomous vehicle operations, and electrified fleets:
- CONDUCTOR β Development of an integrated ride-parcel-pooling service using automated vehicles (CCAM), evaluated via FleetPy-Aimsun coupling (multi-modal integration, AVs, cooperative routing, traffic control, simulation coupling)
- metaCCAZE β Scientific support and simulation-based evaluation of Munichβs Living Lab innovations including multimodal logistics hubs, dynamic curbside management, and connected/autonomous last-mile vehicles. FleetPy contributes to monitoring and optimizing operations (multimodal hubs, curbside management, AV logistics, LL evaluation, policy support)
- MINGA β Evaluation of AV stop concepts and passenger interactions at TUMβs test field. FleetPy is used alongside MATSim and microscopic traffic simulations to model AV and non-AV traffic, evaluate climate and system-wide impacts, and support accessibility-focused user studies (AV integration, stop concepts, MATSim coupling, KPI evaluation, accessibility research)
- STADT:up β Simulation of autonomous shuttle bus in different inter-mobility scenarios with dynamic stops (Operation, traffic evaluation)
- SUM (Seamless Shared Urban Mobility) β Simulation-based evaluation of operational strategies for automated on-demand fleets in Munich using FleetPy, including integration with public transport, pricing strategies, and transferability to future mobility hubs (on-demand AV fleets, public transport integration, pricing, living lab scalability)
-
MOIA β Implementation of algorithms to represent MOIAβs fleet control (operation, ride-pooling)
-
MCube: STEAM β Simulation of semi-flexible bus lines in Munich using FleetPy, integrated with the TUM-OSM decision support system (agent-based simulation, semi-flexible transit, DSS coupling, urban mobility, evaluation pipeline)
π§ Do you use FleetPy in your research? Let us know!
If you find this framework useful for your work or use it in your project, please consider citing: Engelhardt, R., Dandl, F., Syed, A., Zhang, Y., Fehn, F., Wolf, F., Bogenberger, K. (2022). FleetPy: A Modular Open-Source Simulation Tool for Mobility On-Demand Services. Arxiv pre-print
@misc{engelhardt2022fleetpymodularopensourcesimulation,
title={FleetPy: A Modular Open-Source Simulation Tool for Mobility On-Demand Services},
author={Roman Engelhardt and Florian Dandl and Arslan-Ali Syed and Yunfei Zhang and Fabian Fehn and Fynn Wolf and Klaus Bogenberger},
year={2022},
eprint={2207.14246},
archivePrefix={arXiv},
primaryClass={cs.MA},
url={https://arxiv.org/abs/2207.14246},
}