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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14Windows x86

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

Uploaded CPython 3.14macOS 15.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13Windows x86

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

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12Windows x86

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

File metadata

  • Download URL: dsf_suite-6.0.8.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.8.tar.gz
Algorithm Hash digest
SHA256 6be4cc9f93687c2e73839e4d70a416787b980b49c3ee9c89d4cbaa9fe8dc7e49
MD5 2e67128cd46651424da4a6bdd1a623c9
BLAKE2b-256 a96ac586a81a00f3ad533d60abc9f27280235f77a04169ae7fc336c5eb493cc9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.8-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.8-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 c05ceabf89e223b3bd4302ecd1b2c3fa27db152400f154cf2125c995e32497c4
MD5 0e00a63ebe76582b2eb64c394dd6a672
BLAKE2b-256 c3498d2fef963cb2f2dd8f549d0e84882f0acd4d82f2a0543666fb70a291aa7d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.8-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.8-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 719db9bf69326ee48c9901ad26606a45edde6d7e8749570844d10d0511df5b0f
MD5 382adc0ef536a2ced071533c1f88c1e4
BLAKE2b-256 32a006df1b4fd5db5dabdfcf8cc849a8d1f4bbe95c363aace7a9337eb2b33263

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.8-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a474e0bd3ddaf8516eab71cd3aa7d5a43fe64918fa36dee2c8bb3a22734658d5
MD5 9956efd8c53c5063e373ec2c6e4928d8
BLAKE2b-256 dce7484a96cec5404ad51d0f276da469d68d4fb556e34da826f49728b58e6501

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.8-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 1452aae8c50938c71244c5e2a88cc25c5d6961c31d49ca5e52fe46b4bb9b4eea
MD5 69eef83e970325320c9cd2468713213b
BLAKE2b-256 e6d8d61b5440c6192748e611f61d88316fb8e10f8bb70ea772c8a903e9a4b7ee

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.8-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.8-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 723244a1588e21830a659735b6be512bf9ddaae81a61b34aa57e2a97be63c3de
MD5 ac5b98261b70b3b851ddf9268587180b
BLAKE2b-256 f96e5c2842516c8083b60061306d1b6133f06f287c88cfaa23c7f6435f364afa

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.8-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.8-cp313-cp313-win32.whl
Algorithm Hash digest
SHA256 8f08381295742c4495416594b44a851eb59b112cf55aecd6e467ac03f52f7601
MD5 96f445cc439e55abb43bbd0bef722a77
BLAKE2b-256 a03bc1021dd2fdae01ad5bd816fdd378be5b52e622a5f3c3d4dd67499fe5a043

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.8-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 80828ff8aba9cf3389bdbd1dcfa779e739e30998ea37f1571965cea9b1fe6add
MD5 d856602371cfbfbcd5076fd4fcae497d
BLAKE2b-256 12309107cdfa29dd28edf0388b50a1d95028dbe336e57ee77a50da66d914409c

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.8-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 d6de286988bb20a3c593bf2db9a9833df921e1a2d56dcb8b523efdee376b0c27
MD5 d28ae4cd284e000689ff4ef40358118b
BLAKE2b-256 c6a1aac8e0c1dc5beda6001ca91982a23ef190092dee222af3f243470a7d9d7d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.8-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.8-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 6cf20002d7283c25bc09bed4aa5585e566f054e07b2d0709c932911a9ea459e9
MD5 8b5c3294777ef881a9f46c0364bb5b35
BLAKE2b-256 f47042d2b82d3f4b50c2503f087f043fb5d492e35d391135814a868ca2038cf1

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.8-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.8-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 b9ab6a0a9a84123720a0ebd3f03d4c6cc1fa056c647aaf0c0a85c1bc22e1b41a
MD5 7a9a90b38ea04a5168e6512373b8d9ee
BLAKE2b-256 54f9d095097d9a8ce12cc76f0cfefa01e75ba64d94bbfee5f4c5edefdeca586e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.8-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 09d4a6c47663f04f8e4a926a04405824a7921e2eb113f822f8e6d0b7e4e6e11e
MD5 4e4d1a2f7606cefe11a36dda04255a1c
BLAKE2b-256 3f22e3a103b52b5c968205b0e2fc9e638119ff29cfffce412e7924c9e9ae0d8b

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.8-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 4de4a53f6f413051d8c30c3b5d71f8ffa825fe6b10ca9ea164245f07a21cde57
MD5 dc78dcbe5301fd2cd0428cf8d6aac6bc
BLAKE2b-256 9218100c422a1034f765d9930c116805f1def633a8f98d9862095dcdc2418db2

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