Skip to main content

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 nanobind. 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.

Examples

Examples in this repository are (slowly) being deprecated. You can build them by adding the cmake flag -DDSF_EXAMPLES=ON and you will find the exectuables under the examples folder. You can also find some Python examples.

New examples are being updated on dsf-examples.

GUI

If you need a visualization tool there is one available on dsf-gui. It is still in alpha stage but is already useful for some purposes.

For Developers

This project as a pre-commit configuration. To use it properly, please install:

pip install pre-commit
pre-commit install

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.

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

Uploaded CPython 3.14Windows x86-64

dsf_suite-6.8.0-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.8.0-cp314-cp314-macosx_26_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.14macOS 26.0+ ARM64

dsf_suite-6.8.0-cp313-cp313-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.13Windows x86-64

dsf_suite-6.8.0-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.8.0-cp313-cp313-macosx_26_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.13macOS 26.0+ ARM64

dsf_suite-6.8.0-cp312-cp312-win_amd64.whl (1.5 MB view details)

Uploaded CPython 3.12Windows x86-64

dsf_suite-6.8.0-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.8.0-cp312-cp312-macosx_26_0_arm64.whl (1.5 MB view details)

Uploaded CPython 3.12macOS 26.0+ ARM64

File details

Details for the file dsf_suite-6.8.0.tar.gz.

File metadata

  • Download URL: dsf_suite-6.8.0.tar.gz
  • Upload date:
  • Size: 176.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for dsf_suite-6.8.0.tar.gz
Algorithm Hash digest
SHA256 eee40378f44a2b9bcb9e87e28ca075c2915191400b61c8c25416a16dd9271ab6
MD5 ac25ba9a442b70547b4dea16bbbbc3c5
BLAKE2b-256 5916dfa1f3a0d43cacba76172ebb9bd5395573bb01ee85f662c2c9482dee8e34

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.8.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/7.0.0 CPython/3.12.13

File hashes

Hashes for dsf_suite-6.8.0-cp314-cp314-win_amd64.whl
Algorithm Hash digest
SHA256 65f1f69a4e78e258714d543b0779ed9586e6d560f8066c8a6d3fa1343f5c9035
MD5 49abaa6cdf8be0cdf889f9f7fc1335cf
BLAKE2b-256 12f0089b778a8d8585b0f653ea80e5b0de60d159144023c8940fcbe74d73e6ee

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.8.0-cp314-cp314-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 eda401e9c82ca8ab3fd31ce301fbf9474a28a3adcf51a6e4ec7982774c9645ec
MD5 7137eab260ecdb79782c5dbba8420d24
BLAKE2b-256 df0f39cc76258c09d38ab59201af93f9450ef097743213814b8f0f322dea85a7

See more details on using hashes here.

File details

Details for the file dsf_suite-6.8.0-cp314-cp314-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for dsf_suite-6.8.0-cp314-cp314-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 146c18d80d192bc8b2b6fe0da17c1e71b26eca58aea5b9251289c91bb00cbb9f
MD5 0f3983217b80adbab77418b8c7231cca
BLAKE2b-256 f0efc540c8510fa2a63725e0b8186f120d726120f9a6ebac45a60bd2c81c1141

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.8.0-cp313-cp313-win_amd64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.13, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for dsf_suite-6.8.0-cp313-cp313-win_amd64.whl
Algorithm Hash digest
SHA256 798c2cc408fba3ead4b9099c381ef5c0ad9531c4c384f17862592b89c3932d05
MD5 b135331bb8dc35ea23959653cfef985f
BLAKE2b-256 17402ccb88d76747f07660a7c107437a0c5807e8a6b6099388022d1cf371920d

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.8.0-cp313-cp313-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 437a338ab3a90aa067407c1dbda1b5ea3c0d022951a84822f87dd8d133372cd1
MD5 154033aa79289817a8508cac1b944637
BLAKE2b-256 50280d3a08649c7b974210a5304064e56617355a7f4e4e2604bf4cad926b3efb

See more details on using hashes here.

File details

Details for the file dsf_suite-6.8.0-cp313-cp313-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for dsf_suite-6.8.0-cp313-cp313-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 cdf57b4ad9642625c95e585d8918c29d9ec4a1097740427d0f9d0f18513aaa04
MD5 1ec4c7b9534b6b9ffb4c5d7e8c4d9c87
BLAKE2b-256 362004e1f28c64ae7676607e50eebd82e4c5e8d24dbc926b05b791ceb51d1e0b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: dsf_suite-6.8.0-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 1.5 MB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/7.0.0 CPython/3.12.13

File hashes

Hashes for dsf_suite-6.8.0-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 f7abd1943e03cd839dfa59cd3d126ceb08e46781eb3a0e674af928a99f8c833b
MD5 4c618c76e71c277504da1161d911af39
BLAKE2b-256 db7700c3acd2451883ca6801eb51529402c31513055d0ac8c38d07f056683d84

See more details on using hashes here.

File details

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

File metadata

File hashes

Hashes for dsf_suite-6.8.0-cp312-cp312-manylinux_2_28_x86_64.whl
Algorithm Hash digest
SHA256 5d413022b65d3b431db51e6fc1515959bc78095106c15951ee393e0b92331680
MD5 8846dc9d213408f44eb841e1a38849ba
BLAKE2b-256 f1531d93dcab7cd6dae38a98fd5785f98752b1f1a06ec19e50ee8e09c291acaf

See more details on using hashes here.

File details

Details for the file dsf_suite-6.8.0-cp312-cp312-macosx_26_0_arm64.whl.

File metadata

File hashes

Hashes for dsf_suite-6.8.0-cp312-cp312-macosx_26_0_arm64.whl
Algorithm Hash digest
SHA256 0258adde86039c9320d149e2e59a94ed56a828078327cb615f9d2618832d4af2
MD5 2ce7493f6a12300fa3fb2c88bfd59cda
BLAKE2b-256 660f94704a55849692741039453ec94f5d73b0dcc81d859795c489f4e01bfc59

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 Sentry Error logging StatusPage Status page