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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14Windows x86

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

Uploaded CPython 3.14macOS 15.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

dsf_suite-6.0.7-cp313-cp313-win32.whl (1.6 MB view details)

Uploaded CPython 3.13Windows x86

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

Uploaded CPython 3.13manylinux: glibc 2.28+ x86-64

dsf_suite-6.0.7-cp313-cp313-macosx_15_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12Windows x86

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

File metadata

  • Download URL: dsf_suite-6.0.7.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.7.tar.gz
Algorithm Hash digest
SHA256 68153db9786729558867dafe2f7ccb86d81427f52ce3ab5575e4117d4cc00413
MD5 901277bafa6227b7f1103eb3c550da61
BLAKE2b-256 a0b31403ce984914a2913322e0d633779843e87b346e9d7ca765046ab04e7c9c

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.7-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.7-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 cef99788723b1dd32fe53713623de33b6b1190ea804546bf065e58d6b6aa54bd
MD5 2c12a1d68577102bf7f32a6f30952370
BLAKE2b-256 977afe3d99d4710a4d83c5d9d2295ff54c927871f83e08a0b1680a273ee95816

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.7-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.7-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 fd85644eae11e0044326c7496e6be806f4e74f604797b34e66589f23f1dc11fa
MD5 8fd5144cee476f0e217f1f8965ee3279
BLAKE2b-256 7b58a15cbf3ebed1c59877efc7732b20d5a89be849aec4fe82b300b9a844e5bc

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.7-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2b277de78d1188beadd1c71de00dcd4a86fe10d0c26e55f4cecd647209b46005
MD5 1f247b188866cd0dfcda8b3a1345e8e9
BLAKE2b-256 e75407cd3a51e34f10d62e51571f30335bdeccea8b2647161ee37ed6507ddb98

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.7-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 c8cdd9aabdfebd8eba3dffe11190d2d49dacb0102a276479e9c607675b8f153f
MD5 ec8f451d6241263e32a882f5bab41add
BLAKE2b-256 3e3644ff6c0bdc2a6cb337a9f5b5bfa2de8d72750f38f5bd649e5313d56b4507

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.7-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.14.5

File hashes

Hashes for dsf_suite-6.0.7-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 be2fb066370dd116c72b624d4194f4d89d941cbb08bc89de783e60b3449db2f3
MD5 d361257475a1e77ecde1e1d99fef2a32
BLAKE2b-256 75a32d98147c0ed1e50210b0ca062cc45e4883e67eac3d0cb286d443f130f9cd

See more details on using hashes here.

File details

Details for the file dsf_suite-6.0.7-cp313-cp313-win32.whl.

File metadata

  • Download URL: dsf_suite-6.0.7-cp313-cp313-win32.whl
  • Upload date:
  • Size: 1.6 MB
  • Tags: CPython 3.13, 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.7-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 a388f1367112f0ab7a8304b99588be5dbf0d0f43bc211b544fd2ea65145f80f8
MD5 3fa8ee2dc1a0c720ec63f534f62a4d85
BLAKE2b-256 450ad4ec7d930ddef647a0d76eb09aac7ce5fe96c21556a0608f06e3bcb52b29

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.7-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 acc32b22c8b5bedb701a8a1ee134fc228d80903d70389d04f2d9796f347a0764
MD5 9f4b119d8d784a4341b22b02d73cb905
BLAKE2b-256 9214277e6c401f2f5c809719144445528c5c21eb11d0b0bccad2b162fc0b430d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.7-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 093b4a0574408019533388940e3d8a71e10ca0dd132bab97fb04d8c2dd3f7e11
MD5 568c1a8833f5b2d5eaae3da14cd63e57
BLAKE2b-256 6baabb24b2b62f4255c368b9bd221384affe580d76ddec8cf6fa641634ae1173

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.7-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.7-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f718a46fa96480d81f540683a5ff066e9a4f58868451fb3cbcd23d8d62385611
MD5 19b45060413b4dc5c7075d1eb451e820
BLAKE2b-256 04f3eeb91c30018291b50d6d65c516cb0027286400718db1fced404ecc4bafaf

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.7-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.7-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 de075fdb9570af5474be9b8e4c753a0ddb654e20781c881a4ba15a3c0903aa92
MD5 e9f37b9bac15a55934a11bde018d8c87
BLAKE2b-256 e331af0f79677cea70a2ac9b2b5c8b222c67a86336a5522ca0f18f4c1f6d1403

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.7-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 3402a3daf79d8a96ab3c0dc1abac5f6a9a87da8dfd58c4d5c8aa4e7632074a73
MD5 6b48299e03bb23b7615262f7e7d11a63
BLAKE2b-256 5935de0ba8e7e86b8b927038d1be3899fd0604d4610208b662d57895bbc61d33

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.7-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 8c4ca528f604b9d00bffd2695473ee9099fd636a74b08169ecd6bb059d413952
MD5 884d863e5b5eecf5e4ec51d48d018f98
BLAKE2b-256 ef3c518880d5443476206332cee0109e13eef3506b7be34cd44f6e364c3a735a

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