Skip to main content

DynamicalSystemFramework

Latest Release PyPI version DOI

Standard TBB SPDLOG CSV JSON SQLite codecov

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.

Metadata

Release files for dsf-suite 7.2.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dsf-suite 7.2.7
File Size Uploaded
dsf_suite-7.2.7.tar.gz 186.9 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for dsf-suite 7.2.7
File
dsf_suite-7.2.7-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
dsf_suite-7.2.7-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details
dsf_suite-7.2.7-cp314-cp314-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64 Details
dsf_suite-7.2.7-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
dsf_suite-7.2.7-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
dsf_suite-7.2.7-cp313-cp313-macosx_26_0_arm64.whl CPython 3.13 CPython 3.13 macOS 26.0+ ARM64 Details
dsf_suite-7.2.7-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
dsf_suite-7.2.7-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
dsf_suite-7.2.7-cp312-cp312-macosx_26_0_arm64.whl CPython 3.12 CPython 3.12 macOS 26.0+ ARM64 Details

Total release size: 16.4 MB

Release files / dsf_suite-7.2.7.tar.gz

Download URL dsf_suite-7.2.7.tar.gz
Size 186.9 kB
Tags Source
SHA-256 checksum
How to use checksums
c956732c45d4613663db7c31ff53f1332681af508b32fb86ce7027ed4ad2c1b0
BLAKE2b-256 checksum
How to use checksums
abb32089fbad7c5027abb7af15b00bc71b14db94a75497a3575d17f939da84f6
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.2.7-cp314-cp314-win_amd64.whl

Download URL dsf_suite-7.2.7-cp314-cp314-win_amd64.whl
Size 1.6 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
2db03e0be648a45ba436d3dc33abaf3cb64d150e4c1f9b0793bbe5f2c4bb6a78
BLAKE2b-256 checksum
How to use checksums
630f04e3ce30b3135eb902d482b041e4679c2914d4842e5b811f1c7f0cae2ff8
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.2.7-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL dsf_suite-7.2.7-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
01465e4b1289d213f5ad0e65ed3c5b62c31a3611d44b390b0e48f142b0eea6ce
BLAKE2b-256 checksum
How to use checksums
56f0c13406c778ec4d78ea51c6706ba77f8ca2c230baa97396ec23f4d7fb5ddc
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.2.7-cp314-cp314-macosx_26_0_arm64.whl

Download URL dsf_suite-7.2.7-cp314-cp314-macosx_26_0_arm64.whl
Size 1.6 MB
Tags CPython 3.14 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
9042accd306f7d28ed6f6db7e190da23ff8796f1dbaa82f77397bf216072a43d
BLAKE2b-256 checksum
How to use checksums
e3c6aa75035225cf41f178646385e4235255621d769b9538c4bf98e9540796ec
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.2.7-cp313-cp313-win_amd64.whl

Download URL dsf_suite-7.2.7-cp313-cp313-win_amd64.whl
Size 1.6 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
b6ad04b7a791327db99a63529867cdc184c4c004174398a378e1569d9b0b6d24
BLAKE2b-256 checksum
How to use checksums
ffa1419dc2d4b7615ada1c551da259c64533f7eb851806af06e5f3809b52d616
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.2.7-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL dsf_suite-7.2.7-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
fadb451e1d0fed63d9a0b4555c81b143d1cfe0e95f3a3ca76942fdd58fc2b06a
BLAKE2b-256 checksum
How to use checksums
694ec45c297db4a351c7566ea978f788a87296e059a65b55f90d19fff373d400
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.2.7-cp313-cp313-macosx_26_0_arm64.whl

Download URL dsf_suite-7.2.7-cp313-cp313-macosx_26_0_arm64.whl
Size 1.6 MB
Tags CPython 3.13 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
bcff082513f04eca358d9def35c4b93d2072b5256f7fc46e86ffd629bd26856b
BLAKE2b-256 checksum
How to use checksums
f2cdcad39e9a97277690a0394d4c86ed39f3b2f6e9e6848d2dbaccda14d6c1e7
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.2.7-cp312-cp312-win_amd64.whl

Download URL dsf_suite-7.2.7-cp312-cp312-win_amd64.whl
Size 1.6 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
24b93ff776f3e2779cefcd5d6a85e35655af0f0e76b9a362e0e1188f359e2079
BLAKE2b-256 checksum
How to use checksums
3e1f9b2d8094c9b147ca1a1dc106c2b0b88f3592bdcc27223b5101d0bfc14ec8
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.2.7-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL dsf_suite-7.2.7-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
88f96dede241c48fc57d4b448e695a1856949957d34a5893a7a691463001880c
BLAKE2b-256 checksum
How to use checksums
4a0f5193f2a297300b0ed60d382cd2d8934e2c1fe4310978038eb0ef294a52f8
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.2.7-cp312-cp312-macosx_26_0_arm64.whl

Download URL dsf_suite-7.2.7-cp312-cp312-macosx_26_0_arm64.whl
Size 1.6 MB
Tags CPython 3.12 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
08841862496f52f6150717c92070a7c37b518a445aa39899bb35069ada5a4289
BLAKE2b-256 checksum
How to use checksums
e6f31d4d9db489cbd3fddcfa80323f685ccc2c8e8aadfef676475de582819953
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

7.3.2

10 release files

7.3.1

10 release files

7.3.0

10 release files

7.2.9

10 release files

7.2.8

10 release files

This release

7.2.7 This release

10 release files

7.2.6

10 release files

7.2.5

10 release files

7.2.4

10 release files

7.2.3

10 release files

7.2.2

10 release files

7.2.1

10 release files

7.2.0

10 release files

7.1.0

10 release files

7.0.4

10 release files

7.0.3

10 release files

7.0.2

10 release files

7.0.1

10 release files

6.7.0

10 release files

6.6.3

10 release files

6.6.2

10 release files

6.6.1

10 release files

6.6.0

10 release files

6.5.7

10 release files

6.5.6

10 release files

6.5.5

10 release files

6.5.4

10 release files

6.3.2

10 release files

6.3.1

10 release files

6.2.5

10 release files

6.2.4

10 release files

6.2.3

10 release files

6.2.2

10 release files

6.2.1

10 release files

6.2.0

10 release files

6.0.9

10 release files

6.0.8

13 release files

6.0.7

13 release files

6.0.5

9 release files

6.0.4

9 release files

6.0.3

9 release files

6.0.2

9 release 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