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.0.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.0-cp314-cp314-win_amd64.whl (1.7 MB view details)

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 26.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 26.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

dsf_suite-6.6.0-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.0-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.0.tar.gz.

File metadata

  • Download URL: dsf_suite-6.6.0.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.0.tar.gz
Algorithm Hash digest
SHA256 286f782ae77a5fc9e8ab43df8557be7ea67cb16af78ceed442f2ad53daca90d2
MD5 2e4e9fc87c5ef87585c0b2561d00c1c5
BLAKE2b-256 e0a71b9cdd10f0fde7ded1d377a3fc8d6a4272ea1cd99ce95edbadb11a6c6e4c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.6.0-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.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 96d9035e6f7fde3f28a44bb502c6ab0053bdd9457ca218894b6b868d4590d423
MD5 7301948ddbb24f368950a9aef2ecbd51
BLAKE2b-256 a9c97acd2c0693a4c293f2b1fe95097602c673b3a36e2ccdb0232c48294ad538

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.6.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 169e66f249fb20c084e083005e9e887258a717d8c3450d43b0543e8e935bcb4d
MD5 f13e18387f61e679aeb670608f4f6314
BLAKE2b-256 0f58e7d94a4aeb8666c43c87798db55c31182d62d2ec1005f8e272915949d7de

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.6.0-cp314-cp314-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 7b39c28d58bd50d397964aafa48eb910a36012b628986599cb4fb0e2a84a9e76
MD5 f1594a32cc495297de61f83cbafb0280
BLAKE2b-256 c8d8905a3982dada771ff574c246509970b61301a591900c3a1d19db6504c26d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.6.0-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.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 67c2857e24c3f41657eb6fa17d734586246acab949cf903693ace7be56c08287
MD5 d0b5e6393df200efbcb687ce1c7cbe0d
BLAKE2b-256 478dab90421f2efd4b2a0d67f896a0ef99563c8c458d415537c8ae8ba473e4d6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.6.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 9cc4dbd9ad3c812a1d3839e61a8b3f8ce01b9b2c65723dc8ecdfb47e1470147f
MD5 a930eaab41242afe54b1042df0223c42
BLAKE2b-256 3a0be2cd9b0ac6a90c7e496134afb3be6d9025c7b3fbfb4671608af7f2216713

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.6.0-cp313-cp313-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 b44746ed136dd2da6ae64b757a2018e0b91bfa14375e1d2f2e4e4b949155d3fa
MD5 012893167696a2f8b0f76b2d52ee6fc2
BLAKE2b-256 5681ed164c515ab1064dedecfea1f1b0fa443f006e0f2684ff0e8b9fd6345bd6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.6.0-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.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 1d08b6e13397f027b514e09043d1801deb4d33df4b9ad5ab694cd1d758b94a34
MD5 0659e5dcdc9a7c7d10fec6edcdfddeb2
BLAKE2b-256 c8a18b114e834c7b2522d3bfa796c9fd09f2c0058b2aa23e941b07d756b95da5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.6.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 d537f300b0a27912d9e6d98c3bb8152e59ce87cd444bc5c0b1c4e82a7ca40d94
MD5 0a1abdcca22db6781d3ebd524a8366fc
BLAKE2b-256 3f12d5e65712fd7fa50944aab78cfad923e190d70ab6103b08a81d50bf41b2d8

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.6.0-cp312-cp312-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 e439d4c9c1dd2ad2b6973531f61b7d7c34476605664a0db078eed7c324b4658d
MD5 1b59200a5906175504c33e22c4d948bf
BLAKE2b-256 4d14ae0c0f5eeb000808ec1fe852f5762709f2a2a17faf7608d3a2902dbbe9de

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