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

Uploaded CPython 3.14Windows x86-64

dsf_suite-6.1.1-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.1.1-cp314-cp314-macosx_15_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.14macOS 15.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

dsf_suite-6.1.1-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.1.1-cp313-cp313-macosx_15_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

dsf_suite-6.1.1-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.1.1-cp312-cp312-macosx_15_0_arm64.whl (1.6 MB view details)

Uploaded CPython 3.12macOS 15.0+ ARM64

File details

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

File metadata

  • Download URL: dsf_suite-6.1.1.tar.gz
  • Upload date:
  • Size: 167.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.1.1.tar.gz
Algorithm Hash digest
SHA256 04b87df0ca396658c5f4972e289a8ad626c40fecafb11a276f44c2b3e110bb55
MD5 3b4d2a85ba2a9fa8aa54ef411448507e
BLAKE2b-256 d3270bfea1230a660150b6885dea710e272e11910fb13c7aebf1b7d497c63d6b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.1.1-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.1.1-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 1a6cd6c8aecf56a71838388f11c13d876a4d9ff7ef924ec21c13136ff5e0ca30
MD5 02d96404b818deed2ff4ed29cd13881b
BLAKE2b-256 446f21ce7ca7cb2df677354e47cdf716bb98b3fe17f0a707df09fa9b8df912ec

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.1.1-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 7d8748bd7e3b0d4a83aed99b9f7b14882b064d9087fcbb45d5eb25693dce959d
MD5 7d84980bc9cc8276be3eebfd8d4d397a
BLAKE2b-256 fb3a254caaab9318c6544ed7542dfec41947e9bc44287c9e3a59efa1496d6abb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.1.1-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 bfb0e0cf1166867239fe8422898b01298f46ffc77abbdfafbed917cb20e224dd
MD5 6e4913e80714759bb06ca3903e79781b
BLAKE2b-256 bf22e98f0a1f87ea41c133f5569200cb0164eddb5b2f31a5c6c3796f904dcb10

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.1.1-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.1.1-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 3bb469e88cab193f7fc588c6b76d2946ca9f0b0adc1ebf91b90aa40cad143f62
MD5 2abe16a87dbfaa1655caca8c7cfa7eab
BLAKE2b-256 c295ce9e02adab7e53fd7b5177015c0aaba1ab2dcdf192c6366beea348529717

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.1.1-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 81b5abeea945d380892ba1888863591dd8f16243cded218a5aa3b8d3fc331210
MD5 09ed1c5f25d80b2813d9c9d08bc67a18
BLAKE2b-256 a67c66663f272db8b5205f8dc16955763cfc267dcf2239edcd1b256f943b4582

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.1.1-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 0fa63e5c5871c2689fbd0a9e0e8784e5affa516e7baa1f0d47f34beeaab2f1f9
MD5 2d582c4d0992e0e6d44826d00d1ea743
BLAKE2b-256 ff11e7529f2a2647e702e422e2895eee445a48f68bce67187ea0819a00912e8f

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.1.1-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.1.1-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 2a414f8dd17b895f1f0bbfb808df11a509d5e013ee6116c0c4449b666b52e9a0
MD5 74ba7e72691d6e6fd867540c5936d203
BLAKE2b-256 5992e78f390b73d68c13b324571fa819485add5aafbab29d1748861caa0f1540

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.1.1-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 47faaef4c97959e601846450ebbb13f4c700965d793187c048be34a2dd426e8b
MD5 62fe8a8fb8c7d1b02504ab3ed4c599b9
BLAKE2b-256 7e6ad343c97df1650288568ff43dbcffbb4f82b56b450a11c683749607520c11

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.1.1-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 edcc1adf9ee2af79d9c303eacd82cbe7937430cc188054372d9162a1700bfde6
MD5 2e9532177a6e7e4157e25e6008c3147b
BLAKE2b-256 2c0057ea95fc2ed9b6e9f982abfe47c021683b6962dad64c3eb43b3ed7072fb9

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