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.6.1.tar.gz (177.0 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.6.1-cp314-cp314-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.14Windows x86-64

dsf_suite-6.6.1-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.6.1-cp314-cp314-macosx_26_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.14macOS 26.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

dsf_suite-6.6.1-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.6.1-cp313-cp313-macosx_26_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.13macOS 26.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

dsf_suite-6.6.1-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.6.1-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.6.1.tar.gz.

File metadata

  • Download URL: dsf_suite-6.6.1.tar.gz
  • Upload date:
  • Size: 177.0 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.6.1.tar.gz
Algorithm Hash digest
SHA256 a0e46dd8814f298a1d40023221295fc10df49a232e3701a3f24af867600d091c
MD5 799c66c330043630bdb3e99e8620adc2
BLAKE2b-256 b55ca55079ed38cedf93176465df09fa63a45973250fe00ac0ee92f68956e442

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.6.1-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.6.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 d95539c11097911f71250a38221f84a08ecc5994875975587fd436a2ded99dc1
MD5 116f93b40290aaba2aa9ae5b1f092e98
BLAKE2b-256 865fa8e3803004d415d0f723684f690ae329e85e86720555c976367366a06e83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.6.1-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c8208cb29970495d90ecfef0fc7a2e812818e75e5b504c0bc59c758ef5588ef3
MD5 198ded7bb9ef029e71fd53cce16a74de
BLAKE2b-256 ae3b72898794993a2e32dcef8e9f1bc1f48b2d4dea0ccbf540533b81e816c191

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.6.1-cp314-cp314-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 3f37d7e4e4a0b69cbdb8e29f09dfb61b5de1f89c7f91461a09111bbb1eec4a45
MD5 7ecdb9e711d6aac95389304242423326
BLAKE2b-256 672154de53655ddf2f8f92a439e82a5b6eeac8dd2b4ba0f3c18aa849637ca0c6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.6.1-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.6.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 070feb08f2f1a94ed6564783b523a937ed5c3e38a46e19455b138e4cae355769
MD5 1b9e035369c917b6096db7ac4c352311
BLAKE2b-256 0975cecd12f7b074a54d08e24af912a21ef38db2d85ea5c524df2f9f37917781

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.6.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b89aac534f58942c33f4280b5fb0b4cc1205d848f6d76179353f9acbc062fa6d
MD5 1d8c868d8a821fd49c9c5ecb99fd82dc
BLAKE2b-256 04fef517a5e3383e6345b3efabe8b3893c651da5f4bdb988a63e8e9f0f0bd92d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.6.1-cp313-cp313-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 4248adc0f9dd1aef1067dde5d479b50931368ab6c3d0f1993a07abbf9a5a131f
MD5 d5771021355a93f9737f851fb46ec5c7
BLAKE2b-256 cbde3c05099f4ffec69e93820557bd0f711c4da55b0a8cd126df5e09d282f690

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.6.1-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.6.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 7aa459c9de1fe5840e2b770dd818f9d446b241bd1612937a6d3aee48afe295fd
MD5 e0901c279378beb80e2a4202aa1e3066
BLAKE2b-256 31c0027778066b9347022e9d5c546e041df57f2af4abef00597d2ae7930e3b90

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.6.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9d9a47d99bce313cc84367706cc297574f36432028c4a65f47a423fb864edfcc
MD5 4bd7011a97521a706ee86bd48bfa22b0
BLAKE2b-256 0be4e8ba331f95eb8d478565ca15227271c05aa0a0fb25effa5b51fe147447e7

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.6.1-cp312-cp312-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 e340483756bf7a8da529cc3a3c852eb7ffc1d1f25f696e3e34b005527d4ad5d3
MD5 7f253ee02ed36915956441869c55dd4c
BLAKE2b-256 2328fdfed860eefda0b1cc61a827fc9dc4465b00c5796e9c95251ed74413aa7c

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