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 pybind11. 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.

Download files

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

Source Distribution

dsf_suite-6.5.6.tar.gz (176.6 kB view details)

Uploaded Source

Built Distributions

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

dsf_suite-6.5.6-cp314-cp314-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.14Windows x86-64

dsf_suite-6.5.6-cp314-cp314-manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

dsf_suite-6.5.6-cp314-cp314-macosx_26_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.14macOS 26.0+ ARM64

dsf_suite-6.5.6-cp313-cp313-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.13Windows x86-64

dsf_suite-6.5.6-cp313-cp313-manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

dsf_suite-6.5.6-cp313-cp313-macosx_26_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.13macOS 26.0+ ARM64

dsf_suite-6.5.6-cp312-cp312-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.12Windows x86-64

dsf_suite-6.5.6-cp312-cp312-manylinux_2_28_x86_64.whl (2.3 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

dsf_suite-6.5.6-cp312-cp312-macosx_26_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.12macOS 26.0+ ARM64

File details

Details for the file dsf_suite-6.5.6.tar.gz.

File metadata

  • Download URL: dsf_suite-6.5.6.tar.gz
  • Upload date:
  • Size: 176.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for dsf_suite-6.5.6.tar.gz
Algorithm Hash digest
SHA256 697d867880d1703f136177bfedef1f9aa4f6de22c3cfff29ad0ce7dcfc9ec4d0
MD5 b9120ab660896f6113633d41c7361e23
BLAKE2b-256 e3f7ede5c8d19dd14534526e05c9c121a44b9574332d9db63910db734da4ff36

See more details on using hashes here.

File details

Details for the file dsf_suite-6.5.6-cp314-cp314-win_amd64.whl.

File metadata

  • Download URL: dsf_suite-6.5.6-cp314-cp314-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.14, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for dsf_suite-6.5.6-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 4b5c47d15ee41a1a9703a8b53f9b5271fd741a7eb53b4c23e9cac28ace720545
MD5 34bfc74ab79562adcc0b4e5537e7c480
BLAKE2b-256 47e666820c0a9739db96af0ed9df0b30e9f068db74d1ec696e67d0d660fe008b

See more details on using hashes here.

File details

Details for the file dsf_suite-6.5.6-cp314-cp314-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dsf_suite-6.5.6-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 061ea1e90700e5861f2f502ee41658dc5d46030f278b6126afeb9c1698984b96
MD5 ab86f6399423b31e87be641c33c60f31
BLAKE2b-256 1371cc5202ce4c9e42654151bd5141b7bbd3e49376d0141d740151c68e88d495

See more details on using hashes here.

File details

Details for the file dsf_suite-6.5.6-cp314-cp314-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for dsf_suite-6.5.6-cp314-cp314-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 f6107da3ce4843ae55112980d1778099b643ffb1bd83b16a1c37d7f0a3890a84
MD5 5fb8b9e4cbaee4d9dc27e0c5ac564961
BLAKE2b-256 f0ac63c8caedcdd3abda571b39c5fbd24ed5a33401ec3fe64fc90c26059e4c7f

See more details on using hashes here.

File details

Details for the file dsf_suite-6.5.6-cp313-cp313-win_amd64.whl.

File metadata

  • Download URL: dsf_suite-6.5.6-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for dsf_suite-6.5.6-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 dd3a6e4b58081d72bd6eb159873d1a88c177471d01976b0021a2d5209ae4edf9
MD5 386ac4d03befd0dd383135baa4cb2269
BLAKE2b-256 179b51cd6fe00815332fb86d144dfd7032d18761b144ff5d9014a24018cfa086

See more details on using hashes here.

File details

Details for the file dsf_suite-6.5.6-cp313-cp313-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dsf_suite-6.5.6-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 18fa6fc3ef9db73a3eade867218363ade78b52a35af0b2aa1348acf6f1c718f9
MD5 3e614a41ca3718584f277ecd9d408611
BLAKE2b-256 f8b073effb1ba984e08c229e1b37415f7597ca49c139049cf65e840d3cac0447

See more details on using hashes here.

File details

Details for the file dsf_suite-6.5.6-cp313-cp313-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for dsf_suite-6.5.6-cp313-cp313-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 2e411e71cdf88fec9d49f8f1b7d33b414caab62b38ab80faa9430a3713e23d0f
MD5 bf0c1b1598c9a28a8029c530c7e55621
BLAKE2b-256 5d8da2945c202c60a52311a519d927b8f1610913476ff1358357c100c69cd153

See more details on using hashes here.

File details

Details for the file dsf_suite-6.5.6-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: dsf_suite-6.5.6-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.7 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.13

File hashes

Hashes for dsf_suite-6.5.6-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 e091ce6effb2d6328b171aecd9fed79a608a3d46fbabbf6bea315c4ec8505e36
MD5 3ee845a2d2e3ae9c4bc27d5f5fa8e187
BLAKE2b-256 454f8e2b14db87f04ecf97bb46d392c2896eeee0a415b3f16184ae455bbf267b

See more details on using hashes here.

File details

Details for the file dsf_suite-6.5.6-cp312-cp312-manylinux_2_28_x86_64.whl.

File metadata

File hashes

Hashes for dsf_suite-6.5.6-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 8db1d227ba4a6fb96593de12b3178a09753cc50835689433401a4452b8a6ca1f
MD5 329fae18ca70b47f58f9922b392cb95f
BLAKE2b-256 e9418ee22c6685d2f17ed084ec004520e4b8e2e294cb2cef4c9c19304cb2a2a8

See more details on using hashes here.

File details

Details for the file dsf_suite-6.5.6-cp312-cp312-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for dsf_suite-6.5.6-cp312-cp312-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 5087da32cada10e7748b7d49975d7923ceedca4605963785b1949f86b3d8e4e2
MD5 27c3d9dd0982665eda03f96d09e50e49
BLAKE2b-256 c6a276ba0dc65984fcf0498835bab6431b5d65d157bdae9ad7f62f95d3bcb93f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page