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.

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-7.0.1.tar.gz (177.7 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-7.0.1-cp314-cp314-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.14Windows x86-64

dsf_suite-7.0.1-cp314-cp314-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

dsf_suite-7.0.1-cp314-cp314-macosx_26_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.14macOS 26.0+ ARM64

dsf_suite-7.0.1-cp313-cp313-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.13Windows x86-64

dsf_suite-7.0.1-cp313-cp313-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

dsf_suite-7.0.1-cp313-cp313-macosx_26_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.13macOS 26.0+ ARM64

dsf_suite-7.0.1-cp312-cp312-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.12Windows x86-64

dsf_suite-7.0.1-cp312-cp312-manylinux_2_28_x86_64.whl (2.2 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

dsf_suite-7.0.1-cp312-cp312-macosx_26_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.12macOS 26.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for dsf_suite-7.0.1.tar.gz
Algorithm Hash digest
SHA256 0dd34d82f3aef1feae7d60ffb971b3a25280fd771abdd536404dfa225f0ea7b0
MD5 6714e307b71e5c807506ef296a130cf3
BLAKE2b-256 dd4b82c8a260cd5766920a051666be5b22fe2512695ba8415aebe4a39a20a8b8

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for dsf_suite-7.0.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 a42fd0e2a03e1941ffa92bd309985ee07c480048a139745c0b41487413b5e09a
MD5 3ee82a8a6449692288195c977a6ceab7
BLAKE2b-256 cf8e9ca819a9cd8d460fbf1cd79b6f396bdc9ddb94529897922ad2f13fbdcda2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-7.0.1-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 20deeadf2405ad40dc09042668e3b855130dd608623405a0015e6c793e67e476
MD5 5a0414437fe39669fa25b97d5bf5b7e2
BLAKE2b-256 2b56ed447621b241efc188739df966cc25a780c6116bb8068d71b390dda8c79e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-7.0.1-cp314-cp314-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 17c8c33487501ec43a15c55ad79d1221a1b8599ddbe295dac4507bbd2287ed06
MD5 95a8a4dcd688c9af082e2f43751cad3d
BLAKE2b-256 ca0d25932a9518853390932ec8f0618522eb9337cd04ea2fc41df674cc0de0f9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for dsf_suite-7.0.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 e82dce2bce2acb501439f1e05348d2cf419003318950a771774f165b1c5dac8f
MD5 6865dd7f2eaf7e338100e178f9d9c1d2
BLAKE2b-256 82c066cf06c264cbd3f7f8068b9ca02a355f4bd419a4c3ad12a22b62a4cbd5f1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-7.0.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 e68559ef65d21834cf5a8f7d0a920f2b1e1af5b66d294b8614db4b17f3c1a8ad
MD5 c9b546b9e4d2f5af8438573ce54104ca
BLAKE2b-256 b2ddab5abccba534bbcb93ed0f674e684f0cec5e3fe7bafd4baf480e3cecd182

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-7.0.1-cp313-cp313-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 92e0cd8d4265b3369194bb7339a4b555dc4d13b37848aa569b40883c28e9d13e
MD5 dcb6d9c472ef530e41ce8969c53df991
BLAKE2b-256 c8807b2f1976540f5ac62658cdb2bb3c667efdcda0ea8cc03362dac234aab8b9

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for dsf_suite-7.0.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 c81bd16b03732c18d83f2711064acb1de610ec0dc7516c72fc226bc033e79e76
MD5 bfb40e1128fe6afbb8c6112001c45d50
BLAKE2b-256 1d29bcaa98edf8dd049eb6555ad6eba23db7b0c5b7f726cdc722b3232f733ffd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-7.0.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 44a38301a5d2a1c2e5b839868b5ebd43e9785b5f723bb2b6cd7f8e2e5e8fc614
MD5 14e4edb203200515c5639e05da5d9e83
BLAKE2b-256 31b28438eaef628af19d0ef72fe1d2bb919b836a51be7ee8642194147625ddb0

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-7.0.1-cp312-cp312-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 298e492ffd03ceeea11a16d297853c5f5e446db1b1eebcea96def9eb46a5b3f8
MD5 90cde4dc50d1c3c973bd1baa4d3a24d1
BLAKE2b-256 5d8fc79b599ab283d9b1ec8e0520c4455ab2763ab4f8b84a70ed3a113f869f5b

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