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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 26.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 26.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

dsf_suite-6.5.4-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.4-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.4.tar.gz.

File metadata

  • Download URL: dsf_suite-6.5.4.tar.gz
  • Upload date:
  • Size: 176.3 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.4.tar.gz
Algorithm Hash digest
SHA256 994036ac75e8a16d956a5e43611ae599a8a68a107868952690d02e1768debfe8
MD5 b4cb0fa0ccb039facb243bca0b9bf865
BLAKE2b-256 3678a9175a359edc37d5a72c8e1da1b319620c5ea856039ed1835244f4df32f3

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.5.4-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.4-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 3d4162c24f9ce3fe8bc0b52bccc9f18835491bf1bcd510ce540f51c88ec2dbfe
MD5 549f8b1cda7ef4cd9cd85b1f3cca7089
BLAKE2b-256 e86fffa78614060121738a1168b822678fae67c4200edd1c16feccb861a9dd2b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.5.4-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 dfed09ad97d76943e2d49703a4c4a02b9ebe8053b0d8bb76f8e1d2b8612c12b7
MD5 9808e08c230fd9bdad7bd0ae78d200e9
BLAKE2b-256 7982ff2d799d37103e16cdf382b30d3e6922a165d72abe012e371401759c2182

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.5.4-cp314-cp314-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 c15f127e616d8e8c4e17d2d84704643b10385805cf514457ed8a34b381e047f2
MD5 0cb18958872bbe043a70c5a94b856e6d
BLAKE2b-256 41edc19f48125739ed6ae5fbde8f9347b3de650636892943fba963aa1ab326b0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.5.4-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.4-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 417254613bbfa6bca235e6f5b409baff699d8a0455520a251ecb3a6fc6fe0868
MD5 be5dfddd8c66671ca1b81d02d186d159
BLAKE2b-256 3d1fd1f9130aa92282541d660e16a98594e0fdd8f3462368e57eefa39ddca5df

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.5.4-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 6980bec563b4ed33dadfd08612e370a00c69a21a8e6f48c704d1ecd93771aefe
MD5 6f4292d87989d02333286957881c9926
BLAKE2b-256 e2bb77ffeaa93744cc4e856ca31e0e1c3ac53cf3d5b26b7f017530291eb89514

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.5.4-cp313-cp313-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 02c64fb71cf46303d723abc0aed6c9c62c79045eeed09dcc08e37ae2ec86aabd
MD5 3722df910349b3de79b9e8062ae841b9
BLAKE2b-256 037d0d9f49dc5c6a1eb13bf986fb49ef655e3a151aa7626c39216e46c9d1f75c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.5.4-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.4-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 3e6a9e454cecfea276a794a86c11fd1de0192d9cdc08c0ddaf3c62871804c04e
MD5 6306e6e1e79d465eedb8c3568a8c7a2f
BLAKE2b-256 74c94db31135acc2a4246093b46803ba21c014eadb011d257d1b7f9562023626

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.5.4-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 88d3b282bb1867a87858e5256ae2925be3b04e27ce2d71cdf82d80be52ba67c8
MD5 3fd87831319b1abd325bad5c9d3f662e
BLAKE2b-256 1d18bce8e67f370b755dfef1c040bc256475b8083887469cda2e4ad88fd752a6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.5.4-cp312-cp312-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 0c2c4944324ca91baa2e7e69a8df5ef61463e29334c9794951269d4f53b0c903
MD5 d45fa11e1106cccd16dbd25ed829a2bd
BLAKE2b-256 06cc52876a2fbaa3eb2f341ad6b8035150eb5599a274fa47ca353b5944dec423

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