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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 15.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

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

File metadata

  • Download URL: dsf_suite-6.1.0.tar.gz
  • Upload date:
  • Size: 165.2 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.0.tar.gz
Algorithm Hash digest
SHA256 e22396910e2532407dd40b3cef3a279e11598bb42e3b66674ed9c4b85bd93e79
MD5 7865717a2c23706235a6abb9099f86d7
BLAKE2b-256 1bf12b7049d89e7368ad3ff41bc26c98f46ed06f931c04a0078058fd291deea0

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.1.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.1.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 3672d6b032ba97f21491f4f1f2b4d2c8c7c31db78e6e22eb6d086916629447b9
MD5 84ae6e64d5af7d07b725092f4eab96f4
BLAKE2b-256 215f3a1128653764a7b6b56782fba85a2c7570ddf1c2be1330d9ec1d7e415b10

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.1.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 0794df37abff5e8b2b87c569f5bbb5bb0226d42253110a63713dda475a76b1ee
MD5 af15b3e1ac0dd208413ebafce7d6563f
BLAKE2b-256 8320d5a73cd80a93876a5b613e7e46155b05f4deea431c0e7b321aedc122780a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.1.0-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 081e7337ff5eae68907f2f9c06c2dfad112c7afd2c802e127dadec3eae6daa25
MD5 e1e2c8a811aa9dc4919f8b25611fcb6b
BLAKE2b-256 e6004190be90f737779effe6320b66e6b4a45901b9ac44ce3f44664768a9d6be

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.1.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.1.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 8b47abeffe3f206aa99da1f56369978bddf97dedf2436da82ccc74d2d2d325c8
MD5 8a87c10615127d5318ff8199b949d4af
BLAKE2b-256 c5f3e96d2c7558336aba8a0a7a34d5f4f3efe0b53611141d76270b02a8283604

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.1.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 ed9f67503e5c76cc07d82ce744444ab06d8d204dba143d120bc8fb7632f83963
MD5 7d1f80073902363be1160ba1a97afe7c
BLAKE2b-256 ee4505c33a17389f51ee2948488ea293b402d73a2915b0d692b79a9b6de0fa04

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.1.0-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 39bb54475422d39d1f0bb5f1830a0680c3c896b3ea29434b256ea4bbb479fa0a
MD5 3a50c3c07738f6299c88ac16f8e4b5fd
BLAKE2b-256 2d36399fa9d735fca485ca9a17a7cdae0e97611511fa88c46fef8fdee49e1fd4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.1.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.1.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 a1033ae4139fe1cd4d81314755c23d01862159e8dafb06e3c8766487fb44df86
MD5 5d8c23c614066c8c96f8c138ec452efe
BLAKE2b-256 7e9aa2c3fe34316a1db343c0e285bdc05fe34c276d19d4aac1ce862512252e43

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.1.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 f8113e0a9dfecdf5164cc9d0f667fb825e627049e80d8f433be1b4b1769ae94e
MD5 a4dc44ec53cd9a590710b30adbc5a648
BLAKE2b-256 378d3c9d557def0f52c244ecc2e94f0d7d6f90cb2a2d6262d86b63dc08cc4ee6

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.1.0-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 57bf00341ac3afea0c6ad96cc467aa51972caac9f6f6213623e0b3389bc13d1c
MD5 b3af8c34fe5649c4e5ff30b0da20177c
BLAKE2b-256 86731d0a67f85ca2c7f96898cf27b38ea322d5aa01cfe8bd48f345a4bb59c999

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