Skip to main content

DSF C++ core with Python bindings via pybind11

Project description

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.

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.

Project details


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

Uploaded CPython 3.14Windows x86-64

dsf_suite-6.0.5-cp314-cp314-win32.whl (1.6 MB view details)

Uploaded CPython 3.14Windows x86

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

Uploaded CPython 3.14manylinux: glibc 2.28+ x86-64

dsf_suite-6.0.5-cp314-cp314-macosx_15_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

dsf_suite-6.0.5-cp312-cp312-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.12Windows x86-64

dsf_suite-6.0.5-cp312-cp312-win32.whl (1.6 MB view details)

Uploaded CPython 3.12Windows x86

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

Uploaded CPython 3.12manylinux: glibc 2.28+ x86-64

dsf_suite-6.0.5-cp312-cp312-macosx_15_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

File details

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

File metadata

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

File hashes

Hashes for dsf_suite-6.0.5.tar.gz
Algorithm Hash digest
SHA256 0cb1e66097cc00b6c7bdcaa8011f6d5d2ae9d6e37187a11ef7a1d978ea350e7a
MD5 017620ce75c506ff35cea9ea1db8b0cd
BLAKE2b-256 ad204885a912b949508f756d0bbe87903a3346e6d240ec99b1640f9b72629ec6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.5-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/6.2.0 CPython/3.14.5

File hashes

Hashes for dsf_suite-6.0.5-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 54ba59f8f5876387b36025ef50ff825bf8c49d2ef014decf2b7cf51de07bcae2
MD5 9e68e98080fe04a59bf40937dbe2a454
BLAKE2b-256 c808269ed4a210b03317ca57c641a148906d8e27a7d6916bf59cc74cbef0e17e

See more details on using hashes here.

File details

Details for the file dsf_suite-6.0.5-cp314-cp314-win32.whl.

File metadata

  • Download URL: dsf_suite-6.0.5-cp314-cp314-win32.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.14, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for dsf_suite-6.0.5-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 fdc41daf2fd53f3cf2c1d746fb02aee0689cb5be537124bfd7e5ad66575c0c8e
MD5 4afac855bc3c28f03dea2e1b4b274c4b
BLAKE2b-256 f6a4e509fa61939393178e10e310178a731321459d4aa63a158ad58cefd923b1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.5-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1289d3a0b742571f0f984001c4578ab508ed092dd194628e01939c86f12f2fbf
MD5 43b7ec185990b235cf351110bfcd2de3
BLAKE2b-256 b101ec5c938475731d338a1bc61bfaf45a529d551833bc889474a5f67749e527

See more details on using hashes here.

File details

Details for the file dsf_suite-6.0.5-cp314-cp314-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for dsf_suite-6.0.5-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 1f7d11b552018b576ed7e9bd524630955cfb4dcd4daa167df4b264801ccf3fbf
MD5 e55f86d3ce09c1049275e8eaa0a90bb8
BLAKE2b-256 bbf57846e84091019ac1ea0435c9480d848965d3f0a95188e88c3d0676aa8870

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for dsf_suite-6.0.5-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 8684c9f676920c52b6f7cddb6cf2a9aec4d41b87295a13e63abb659f3bf4ff1c
MD5 a364a6dd1258be2a45fccd9a08f09010
BLAKE2b-256 98999594889cbe0aec03bb7c3e7532ee068cfb47fd3c7466447e6b5eae6e91be

See more details on using hashes here.

File details

Details for the file dsf_suite-6.0.5-cp312-cp312-win32.whl.

File metadata

  • Download URL: dsf_suite-6.0.5-cp312-cp312-win32.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.12, Windows x86
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.5

File hashes

Hashes for dsf_suite-6.0.5-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 ac10159643054ac9196745bd4bbdde823930b5d3c03258453c65db48b40b80c2
MD5 873ba60629e9342db37438a9d7c6e94e
BLAKE2b-256 c65b184f96ef45c687797a16cedf774071063ee68bbce3704e85459431abed13

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.5-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2dfe24a6df2b02846a9e0877cf54e3e536e2a380604ae97f287a1f2e8419eceb
MD5 2021aa222014a836705cfddf2b9591b1
BLAKE2b-256 51208f4ec506bab28f70fd2a6022c08e951f2bbd5473cc016806e2fc9a0268fb

See more details on using hashes here.

File details

Details for the file dsf_suite-6.0.5-cp312-cp312-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for dsf_suite-6.0.5-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 b9b52c8a8ca0775a1f644656db5a43cb83559f6639ea038c623b28f3a3ffb229
MD5 c7c433effa9ae5ff6356d3c7bd114b8b
BLAKE2b-256 1527dccb4a9528339fcf81946906572c831379030d478df76da8e9d69330a8bc

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 Pingdom Monitoring Sentry Error logging StatusPage Status page