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

Uploaded CPython 3.14Windows x86-64

dsf_suite-6.0.11-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.0.11-cp314-cp314-macosx_15_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

dsf_suite-6.0.11-cp313-cp313-win_amd64.whl (1.6 MB view details)

Uploaded CPython 3.13Windows x86-64

dsf_suite-6.0.11-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.0.11-cp313-cp313-macosx_15_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

dsf_suite-6.0.11-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.0.11-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.11.tar.gz.

File metadata

  • Download URL: dsf_suite-6.0.11.tar.gz
  • Upload date:
  • Size: 163.1 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.0.11.tar.gz
Algorithm Hash digest
SHA256 682dd427d5d3d992c75ab3a075ddb3e6d42251943f67e1f3fb46596ac934462b
MD5 1b23a41751e3032e4d4d4078fe0660c6
BLAKE2b-256 1f21d76f3e61cf079def2c15f6a3d374d4fff9528ae89c0bad0d5ddb896784a1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.11-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.12.13

File hashes

Hashes for dsf_suite-6.0.11-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 037efbfed0c2f193570c2ef6fedaecd77231ddb111c5b68bd38bbe5dde5853ab
MD5 20aaf73b99116f7b6f1538730f18afc1
BLAKE2b-256 f79c4215e61a3f90b90834bc23734a3c5d5ff803f4edda6072d513f5ebf2fd56

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.11-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c2257cc913e59e8987b40bdf42a123f5b3fa91906cab158da31ec2a249a7d5c6
MD5 c9540ee8e41da38e1d60f8e2381a349a
BLAKE2b-256 0fe222b7f3b345bdb74a787f741a30a060108d8ff6036246f2f0707765e2bed6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.11-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 320834f8838de830bd2f016cfff03f6cacc9c3dfb923daeda2f4d0476bbb2aba
MD5 5a738a18f1659405fe116f68b86448d2
BLAKE2b-256 84080860104cc349f74dc508b35cf1a25fa470cbf7b646412aeab6a63266b610

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.11-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.6 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.0.11-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3b1a82ca7d397f7c577d6fde6d06b776b7348070094832cb0e17529bc0932aef
MD5 1821623f8da7e1214186e3ec1cac4438
BLAKE2b-256 b958b622ccf3ca92c187373bca839b9c4751990eaecb4360a7322f9a7734528b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.11-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3b6a456eee7ca1d3c36ca16087e813da1bd238c7cffac7762ff77d98055d5daa
MD5 2dfcf6e57e80ef7ea432454d07b48654
BLAKE2b-256 014bca313083e135e14b4f2adf1eb5dced4bd99e41c806076a22aebfe7710af7

See more details on using hashes here.

File details

Details for the file dsf_suite-6.0.11-cp313-cp313-macosx_15_0_arm64.whl.

File metadata

File hashes

Hashes for dsf_suite-6.0.11-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 6ee20d455e43deb4bd90e8d3d901cbde35e5edebd31e04e68ca13c2babd05722
MD5 793db688f26c6b63a4324b607a331ad8
BLAKE2b-256 bcb0dc8a80a24e3d6476b67b52cc32dcde9b1de97e87d40c4595ac910312ce4d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.11-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.12.13

File hashes

Hashes for dsf_suite-6.0.11-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 19aca43b1a68e6a1abc61ecea128d8073870a8a0a0f7871c1d4b9ae6718e3537
MD5 237ac86a04d8a8fc34a36694cf8e81ab
BLAKE2b-256 cb6c383291d401fa6a46a5310a351e4d0321d973ad537d3cd6f19ae39d7ee4ba

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.11-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0b8cbe2f9d117008d309ac027c1bb90c670d1f55ef9f5ebb570e04ae35305a27
MD5 7ed9d91cd34ce993f571c4d41b68e281
BLAKE2b-256 2ac8bb3e51fa99b478f5942f04bf9cd2c389f9586a37a5063a1eceffe00d6be9

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.11-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 ea92451d048b8b3e16b567d52a40cf980c68a6de4aacc47d92cb820831a2fee0
MD5 3a557132c5137c456bd28d0913d92adc
BLAKE2b-256 bf0dcfc598c8f3c49c8f97cc6eff72e2afd317c986639fd9b6f4dac04b13727e

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