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

Uploaded CPython 3.14Windows x86-64

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

Uploaded CPython 3.14macOS 15.0+ ARM64

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

Uploaded CPython 3.13Windows x86-64

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

Uploaded CPython 3.13macOS 15.0+ ARM64

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

Uploaded CPython 3.12Windows x86-64

dsf_suite-6.0.13-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.0.13-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.13.tar.gz.

File metadata

  • Download URL: dsf_suite-6.0.13.tar.gz
  • Upload date:
  • Size: 163.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.0.13.tar.gz
Algorithm Hash digest
SHA256 133afb1339dc2457d98684d566c3225fafca9b4370ef3358b3e21a2b5be19115
MD5 5a4dce96b82187c7f15dc3d848a3506c
BLAKE2b-256 0e05b107732a21761f065205dd45801728b4b94aac4ef9baf268b03be0b623c4

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.13-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.0.13-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 05c90401f6e7578d94a33e9c6a921689af057f028f5bef535523503dfce67c80
MD5 a3b2b2150c030207d8b163ed782aee1b
BLAKE2b-256 925111c4afd51858b75b9f638c6d71741b0d0ced8a52bbee4e3d56c5199708d3

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.13-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1f357bc2523a4a6a8069c9dbf602fbc3e5c2b632b314166dc80a9ad4ac44e3d0
MD5 fcdee802db72524a6f99d4b474b4ebe8
BLAKE2b-256 dd0b4d036f1f991f95a00e9ed63a7991f89cb5ba8d5a6bc9e7269c7d7c5756d1

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.13-cp314-cp314-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 341f3d5527e10609ea411a7b7d5aa32bc57fb6a93acad6332f5d39ecca775bc5
MD5 17fecfcdfacfbc872652088f75d96c23
BLAKE2b-256 1b7e8b84c00d5ae87cf1e1b36aeac19980968e30ab00f1bb0c13693be9e20090

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.13-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.0.13-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 4beeab5a3e1067b588c054d41d5d3e5bc92cda6084fc9be98e533b29827d6085
MD5 79166fe764c00414e2cfbde383139485
BLAKE2b-256 7498d4dc6865dd26ef2a22e440f60e9ae41d8d8fedc352955c237364ab53bc9a

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.13-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 b72b879197cbee92a16cb8a49a925e2f622af0358c2c0404ad7d3f7f761b6b9d
MD5 bd6f439e5bcd1a46d13f6c03d52393ac
BLAKE2b-256 816a6de95050f38338eef3f6e2d293a491e6aab64f571aa30d0826855d155251

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.13-cp313-cp313-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 74046504ec0a851c83bf88c5d2bedbdc2094ae0d49a2cf3384d40163828c892f
MD5 7bbca52f076c8042f0373f4f93f9dc3e
BLAKE2b-256 3729b9417b3d7997d39c4543a216c0042e72cbe176ee79005a2fea8991e14838

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.0.13-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.0.13-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 99c71c056ff2ee4043e23da3e9ac2b0d0d84978b68b92e3790b644f6b81cb756
MD5 e8be8afa305887d3fdabc4a10c29eb95
BLAKE2b-256 ea8092400d9df9835126eb105c3f95dfbe0337ae143daa00f4de78c9ff54a755

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.13-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 1728fe6826ea4667d053ad1772efb060e7d5389740b0d415f61be22e0eb8ab4f
MD5 804a05165383fd2491849d76f1229651
BLAKE2b-256 99a402034e0434760cd3330edda3ebd8578fbf8b7c591b0e3b67cbd106f4267e

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.0.13-cp312-cp312-macosx_15_0_arm64.whl
Algorithm Hash digest
SHA256 85dc6879dd874c30a226ada15f048e9f4e7d805dc1c3b32ea430f68955e4afd0
MD5 433566ff324ae898edc2afe63fe3dc6c
BLAKE2b-256 896cbdffc0e0ddc4baeee49efac24bebb1171bac578612a06188407fa75d3745

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