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

Utilities are written in python. To install their dependencies:

pip install -r ./requirements.txt

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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14Windows x86

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

Uploaded CPython 3.14macOS 15.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

Uploaded CPython 3.12Windows x86

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

File metadata

  • Download URL: dsf_suite-6.0.3.tar.gz
  • Upload date:
  • Size: 160.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.4

File hashes

Hashes for dsf_suite-6.0.3.tar.gz
Algorithm Hash digest
SHA256 936504308b6d740159ca9a0dd359e35c3baff7d98fe5c25f3401d9d7fed517ce
MD5 248073e9395479a7953ce7cb09944a76
BLAKE2b-256 8bec5a1152bd24ae3e3954a62be4c617509760b2d9797612ab4ae1ff78b6ddd6

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.3-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.4

File hashes

Hashes for dsf_suite-6.0.3-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 dafcfda10e3d55baa6650f44ab2ead16b6872ec6144ece41e588748288d4db11
MD5 6123be4c08a25f27f864c25937128249
BLAKE2b-256 7754cdb0468b39cfaafdeeb06769227c8c540aae4deb5a9864292e37a8dae35d

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.3-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.4

File hashes

Hashes for dsf_suite-6.0.3-cp314-cp314-win32.whl
Algorithm Hash digest
SHA256 90f77fedb3c2819dd3eeb8dd6b0d24ec79df5984b531a376955fbb77b5d57df5
MD5 8ec7fb97771f4ca237b7a34c5c72e976
BLAKE2b-256 accdb77fad85a6fc075de271553745dfc7118588a7f78b0eaab3809450c09619

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.3-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 a0b276e34de7db76937887f57aa054da277bef7590c5229ea03e836408f59377
MD5 5e390f10f556f8c00745f3f21ff87fb4
BLAKE2b-256 f88fdc88d418d631f0b595fef3892bbfeebdeedfa4622b4729992224bc0628f2

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.3-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 990771163b84fef9e5fe21941bd07b3428f18d8b6c36f882fd6a6d6d6632d4ce
MD5 bbaaa9b104e89cc2defabc00bc0f8ee1
BLAKE2b-256 7a244bd3639e4d54259551d7b35baa4017da9da9eb201fae5a3ba20d5c782aa9

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.3-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.4

File hashes

Hashes for dsf_suite-6.0.3-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 725e00f2caad5662a302954bb002cfc2bc08cdcf8eb7075d21013f1ef1d089be
MD5 c584e867f16ce43df5ed909d88294d57
BLAKE2b-256 8ba92fd2de715257308e1e73fc5a806018dc4fcc8c969db0905fa8975baa2a27

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.3-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.4

File hashes

Hashes for dsf_suite-6.0.3-cp312-cp312-win32.whl
Algorithm Hash digest
SHA256 d54e9e56434b06a1bb77ecca2c4d0ae6677e0882c738cfc4a9ecd444a95e482e
MD5 5bcab36d7e046abd00bc402619d0c4ef
BLAKE2b-256 08b8a063cabb861d74acc2dce3e4eca3dccb33f9f2bfbbbeef51a90cda409769

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.3-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 abb5296ff2db146c8bff1ba5210eaf7fbd1732033084670220bf985b947765cb
MD5 842b8744313f8ee3bf4b2c843bc86817
BLAKE2b-256 eed77f0291b11630e6b92d4ff5b94faeaed1b336854048c18660c994ecf15005

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.3-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 85da82fa2f02bc698f4db41b90794661edc6d6e23d6773ae439a545d2a348b93
MD5 19ec6ce533d493a369ab8da5a9ffec1f
BLAKE2b-256 e3d3e24ae76006fafbf0bf25a88f9634a77bb41822e708a91cbfee28715c43a4

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