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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 15.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

File metadata

  • Download URL: dsf_suite-6.2.0.tar.gz
  • Upload date:
  • Size: 169.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.2.0.tar.gz
Algorithm Hash digest
SHA256 e2e295155144e5f227e8566fbcedf6fed20cdd0b453587ecc9b31f56f781f2fd
MD5 c82e4edd6f8b2f6373dd8025d0247d9b
BLAKE2b-256 adcb8d992d186b690d404b377293669fa2ffdbf1f3088a45ac9a0f35bc99d258

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.2.0-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.2.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 ebd01aabbf91ca55d92bfa1799be33307f812cd819bf4a9f8284c5c4566b40d5
MD5 ccdbcfc5016f6d1ff3fd3a17b9aa393e
BLAKE2b-256 a826e4a238276ee45437b3cac2b81034e8d8082e7fa1300ce34bcd6607c15ce5

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.2.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ceaec1dfa9baa31da5b191c18bef102c25e4b0dc5b82b3abafcf4b6658d5ce1e
MD5 0f0c2fa013c5dd32e7da4c33ccdbb198
BLAKE2b-256 876e90f9b8abf182412ca5597a95827671d1296c55d66e787ae180364a3f6375

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.2.0-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 8bf18de5f681a7098a9d828864c0786824c0f4e389f09ddcea04d8a472b2d1b5
MD5 519b3686978d97105b4ec2865c71e24f
BLAKE2b-256 b4e445d684c1a1ae4a025ad355cba79c07c3ca277b0ad10d7318343e322decad

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.2.0-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.2.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 294f7fcdea91a74397181b61d6c0afe18823aef8a9701ccc0716dab3f08ad217
MD5 4d094957e5b9f5ce028872230ddace68
BLAKE2b-256 1930b42f6493d40cc10eb5be566aa0b994717774bcb22eb9e4d62aaf11e178cb

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.2.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 2d1875175c830e4e9cedecc3db2c75b7be7778dea05381e1eeb4e3ccbd550167
MD5 64e623cfe20e0fe376724717044ab15c
BLAKE2b-256 57d811b011051f0fd0c1e893faea92cfbbe3eef6439d00daf8f4d43c8e69d7b6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.2.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 16983468a4c4822875d23163e20cde4f39bfc24f18f4d2cd82f4fd33d0c5cda0
MD5 f57883b224d4b23b5ca89a891aaa1cc7
BLAKE2b-256 5a3eecf5b851f5d13e2dd4b326bc180d9528b40566b335814ff29a0d94b49e0b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.2.0-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.2.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 72818d0c5a46257c9bb64efd01f8e08ed4e20d6fb9c8606bb174e52e0f5b40c0
MD5 3891d5a202467e2511e6f8ff7c54bf39
BLAKE2b-256 ebddd9105e0e7d713bb11c73f3ad04a25595b272fa6b76b50db8ecc50f8f89bd

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.2.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 c46be6c30e68ef3b445c0cafe6da0776863238a71efd34a368a8775f223f69f2
MD5 fff75c473e0faa0ba72735ae1a67e44d
BLAKE2b-256 c3778b8a96eb713d394d3e3d98cc1e1b11c65fbb4121eeee3f23f161708f1b83

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.2.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 f7bf2a0b0cf53a98e884dc841ba3f2790033cdbb0f8870f73bfe0c0068e6f674
MD5 7d8ec68ce0786d66cc0ebb10bd3488ea
BLAKE2b-256 ae64432feaca1fb9ea12b5ad31dc2533aabadaf6924e34f90073797ab9c265e0

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