DynamicalSystemFramework
The aim of this project is to rework the original Traffic Flow Dynamics Model. This rework consists of a full code rewriting, in order to implement more features (like intersections) and get advantage from the latest C++ updates.
Table of Contents
Installation
The library is available on PyPI:
pip install dsf-suite
To check the installation you can simply run
import dsf
print(dsf.__version__)
Installation (from source)
Requirements
The project requires C++20 or greater, cmake, tbb simdjson, spdlog, csv-parser and SQLiteCpp.
To install requirements on Ubuntu:
sudo apt install cmake libtbb-dev
To install requirements on macOS:
brew install cmake tbb
Installation (C++)
The library can be installed using CMake. To build and install the project in the default folder run:
cmake -B build -DCMAKE_BUILD_TYPE=Release && cmake --build build -j$(nproc)
sudo cmake --install build
Otherwise, it is possible to customize the installation path:
cmake -B build -DCMAKE_INSTALL_PREFIX=/path/to/install
then building and installing it (eventually in sudo mode) with:
cmake --build build
cmake --install build
Installation (Python)
If you want to use the library from Python, you can build the Python bindings using nanobind. Make sure you have tbb installed:
sudo apt install libtbb-dev
Then, the installation is automatic via uv:
uv build
or you can just use the classic pip:
pip install .
After installation, you should be able to import the module in Python:
import dsf
print(dsf.__version__)
If you encounter issues, ensure that the installation path is in your PYTHONPATH environment variable.
Examples
Examples in this repository are (slowly) being deprecated. You can build them by adding the cmake flag -DDSF_EXAMPLES=ON and you will find the exectuables under the examples folder. You can also find some Python examples.
New examples are being updated on dsf-examples.
GUI
If you need a visualization tool there is one available on dsf-gui. It is still in alpha stage but is already useful for some purposes.
For Developers
This project as a pre-commit configuration.
To use it properly, please install:
pip install pre-commit
pre-commit install
Testing
This project uses Doctest for testing.
If the project is compiled in Debug or Coverage mode, tests are always built.
Otherwise, you can add the -DDSF_TESTS=ON flag to enable test build.
cmake -B build -DDSF_TESTS=ON
cmake --build build -j$(nproc)
To run the tests use the command:
ctest --test-dir build -j$(nproc) --output-on-failure
Benchmarking
Some functionalities of the library have been benchmarked in order to assess their efficiency.
The benchmarks are performed using Google Benchmarks.
To build the benchmarks add the flag -DDSF_BENCHMARKS=ON :
cmake -B build -DDSF_BENCHMARKS=ON
cmake --build build -j$(nproc)
To run all the benchmarks together use the command:
cd benchmark
for f in ./*.out ; do ./$f ; done
Citing
@software{berselli_2026_18745492,
author = {Berselli, Gregorio},
title = {DynamicalSystemFramework},
month = mar,
year = 2026,
publisher = {Zenodo},
doi = {10.5281/zenodo.18745492},
url = {https://doi.org/10.5281/zenodo.18745492},
}
Bibliography
- Mungai, Veronica (2024) Studio dell'ottimizzazione di una rete semaforica. University of Bologna, Bachelor's Degree in Physics [L-DM270]. Link to Thesis.
- Berselli, Gregorio (2024) Advanced queuing traffic model for accurate congestion forecasting and management. University of Bologna, Master's Degree in Physics [LM-DM270]. Link to Thesis.
- Berselli, Gregorio (2022) Modelli di traffico per la formazione della congestione su una rete stradale. University of Bologna, Bachelor's Degree in Physics [L-DM270]. Link to Thesis.
Release files for dsf-suite 7.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| dsf_suite-7.1.0.tar.gz | 180.7 kB | Details |
Built distributions (wheels)
| File | Reset | |||
|---|---|---|---|---|
| dsf_suite-7.1.0-cp314-cp314-win_amd64.whl | CPython 3.14 | CPython 3.14 | Windows x86-64 | Details |
| dsf_suite-7.1.0-cp314-cp314-manylinux_2_28_x86_64.whl | CPython 3.14 | CPython 3.14 | Linux glibc 2.28+ x86-64 | Details |
| dsf_suite-7.1.0-cp314-cp314-macosx_26_0_arm64.whl | CPython 3.14 | CPython 3.14 | macOS 26.0+ ARM64 | Details |
| dsf_suite-7.1.0-cp313-cp313-win_amd64.whl | CPython 3.13 | CPython 3.13 | Windows x86-64 | Details |
| dsf_suite-7.1.0-cp313-cp313-manylinux_2_28_x86_64.whl | CPython 3.13 | CPython 3.13 | Linux glibc 2.28+ x86-64 | Details |
| dsf_suite-7.1.0-cp313-cp313-macosx_26_0_arm64.whl | CPython 3.13 | CPython 3.13 | macOS 26.0+ ARM64 | Details |
| dsf_suite-7.1.0-cp312-cp312-win_amd64.whl | CPython 3.12 | CPython 3.12 | Windows x86-64 | Details |
| dsf_suite-7.1.0-cp312-cp312-manylinux_2_28_x86_64.whl | CPython 3.12 | CPython 3.12 | Linux glibc 2.28+ x86-64 | Details |
| dsf_suite-7.1.0-cp312-cp312-macosx_26_0_arm64.whl | CPython 3.12 | CPython 3.12 | macOS 26.0+ ARM64 | Details |
Total release size: 16.0 MB
Release files / dsf_suite-7.1.0.tar.gz
| Download URL | dsf_suite-7.1.0.tar.gz |
|---|---|
| Size | 180.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b27c44342fa9c49b75b19773d37cdc5d06b414ad58aef62fb6a4f233f5e64256
|
|
BLAKE2b-256 checksum How to use checksums |
33e9929c280b62dd197b3a9d7e0a2e591c7417eb2918a03f31c4fa841dcefc9d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / dsf_suite-7.1.0-cp314-cp314-win_amd64.whl
| Download URL | dsf_suite-7.1.0-cp314-cp314-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.14 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
da34a74af6b85f0ccd4324bf2b5e02e3df2313c7fc65bb0576e4d3556a181175
|
|
BLAKE2b-256 checksum How to use checksums |
3cbca0985d46611682b065e8fe34fca5353a349295de17208860a82084181099
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / dsf_suite-7.1.0-cp314-cp314-manylinux_2_28_x86_64.whl
| Download URL | dsf_suite-7.1.0-cp314-cp314-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.14 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
0a12cea11862dc70d9657de57350467fd9f94c88d6f94f36d5f43a76be5af039
|
|
BLAKE2b-256 checksum How to use checksums |
17bc1714726babd2bd3090e030083ba1865ae67f3af16f8859b2a843705bbe87
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / dsf_suite-7.1.0-cp314-cp314-macosx_26_0_arm64.whl
| Download URL | dsf_suite-7.1.0-cp314-cp314-macosx_26_0_arm64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.14 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
78ed71c3020ba874e573a19db5aab4a34e64178ad042d289268487a951756139
|
|
BLAKE2b-256 checksum How to use checksums |
b219ea7ee3f533b7a24a748f6d3c0036875803a1427bd55f91afa455e24e27d6
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / dsf_suite-7.1.0-cp313-cp313-win_amd64.whl
| Download URL | dsf_suite-7.1.0-cp313-cp313-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.13 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
7d9024eb40faa6af1f2e8aca1740e9bae738651045e88b9a94a6d0a0289fda03
|
|
BLAKE2b-256 checksum How to use checksums |
a92a414a7b1fb8ae3c1d503f26c100d44065f133bd6e2324566ce99aa70301ed
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / dsf_suite-7.1.0-cp313-cp313-manylinux_2_28_x86_64.whl
| Download URL | dsf_suite-7.1.0-cp313-cp313-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.13 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
a425dc2d3e6c703eb1733922963b5e7d8de69cf2a107a50a0896a11d554f2692
|
|
BLAKE2b-256 checksum How to use checksums |
a17f5e870dc0792ac78981acd128bcb06f0febe7cc581ba348d5dfbca493c60c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / dsf_suite-7.1.0-cp313-cp313-macosx_26_0_arm64.whl
| Download URL | dsf_suite-7.1.0-cp313-cp313-macosx_26_0_arm64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.13 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
7b81831757017c7cecda1e5fe6c21dbbcdf9aaf7fb00aa2569171674fce46150
|
|
BLAKE2b-256 checksum How to use checksums |
8527dbcf66b9bfd8a6aa682aa6ed15d4c4fc698376e5b7742a1e6280b81b9c72
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / dsf_suite-7.1.0-cp312-cp312-win_amd64.whl
| Download URL | dsf_suite-7.1.0-cp312-cp312-win_amd64.whl |
|---|---|
| Size | 1.6 MB |
| Tags | CPython 3.12 Windows x86-64 |
|
SHA-256 checksum How to use checksums |
67afc0aeb01514eddd5c0efc132018bd2fccfd21461adfbfc4f81da671c91146
|
|
BLAKE2b-256 checksum How to use checksums |
b201d7d8853303f6bf6300add36058d5a37792e3b24399a01579cd59aaafe52c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / dsf_suite-7.1.0-cp312-cp312-manylinux_2_28_x86_64.whl
| Download URL | dsf_suite-7.1.0-cp312-cp312-manylinux_2_28_x86_64.whl |
|---|---|
| Size | 2.2 MB |
| Tags | CPython 3.12 Linux glibc 2.28+ x86-64 |
|
SHA-256 checksum How to use checksums |
d62b2e95b7a19eee8710b9ec76ad992f623a11c828e37c6fb38b4aaf2ce7efad
|
|
BLAKE2b-256 checksum How to use checksums |
1b0c53b95e80038fc381909300e674a538c96874de7209a785f70bfdd70b4817
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|
Release files / dsf_suite-7.1.0-cp312-cp312-macosx_26_0_arm64.whl
| Download URL | dsf_suite-7.1.0-cp312-cp312-macosx_26_0_arm64.whl |
|---|---|
| Size | 1.5 MB |
| Tags | CPython 3.12 macOS 26.0+ ARM64 |
|
SHA-256 checksum How to use checksums |
3db790990beb36bb4fda4f6c4848516b76f5d30e558bc9c64e6f76af1863da29
|
|
BLAKE2b-256 checksum How to use checksums |
f295d603cdc6e524b58b5a8c43c7b5abc4b5d420d5283f5355e9228c03cd9684
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.12.14
|