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.

Metadata

Release files for dsf-suite 7.3.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dsf-suite 7.3.1
File Size Uploaded
dsf_suite-7.3.1.tar.gz 187.8 kB Details

Built distributions (wheels)

Table of built distributions (wheels) for dsf-suite 7.3.1
File
dsf_suite-7.3.1-cp314-cp314-win_amd64.whl CPython 3.14 CPython 3.14 Windows x86-64 Details
dsf_suite-7.3.1-cp314-cp314-manylinux_2_28_x86_64.whl CPython 3.14 CPython 3.14 Linux glibc 2.28+ x86-64 Details
dsf_suite-7.3.1-cp314-cp314-macosx_26_0_arm64.whl CPython 3.14 CPython 3.14 macOS 26.0+ ARM64 Details
dsf_suite-7.3.1-cp313-cp313-win_amd64.whl CPython 3.13 CPython 3.13 Windows x86-64 Details
dsf_suite-7.3.1-cp313-cp313-manylinux_2_28_x86_64.whl CPython 3.13 CPython 3.13 Linux glibc 2.28+ x86-64 Details
dsf_suite-7.3.1-cp313-cp313-macosx_26_0_arm64.whl CPython 3.13 CPython 3.13 macOS 26.0+ ARM64 Details
dsf_suite-7.3.1-cp312-cp312-win_amd64.whl CPython 3.12 CPython 3.12 Windows x86-64 Details
dsf_suite-7.3.1-cp312-cp312-manylinux_2_28_x86_64.whl CPython 3.12 CPython 3.12 Linux glibc 2.28+ x86-64 Details
dsf_suite-7.3.1-cp312-cp312-macosx_26_0_arm64.whl CPython 3.12 CPython 3.12 macOS 26.0+ ARM64 Details

Total release size: 17.0 MB

Release files / dsf_suite-7.3.1.tar.gz

Download URL dsf_suite-7.3.1.tar.gz
Size 187.8 kB
Tags Source
SHA-256 checksum
How to use checksums
929ab59ac68ebd411f1a16c76e5990ec9c2c32e31b3ca313b276c921c0c8b52d
BLAKE2b-256 checksum
How to use checksums
949587c63059085c17e4dcdb702bdf597c2b8adf89efcf8d79fd21e4da0568e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / dsf_suite-7.3.1-cp314-cp314-win_amd64.whl

Download URL dsf_suite-7.3.1-cp314-cp314-win_amd64.whl
Size 1.7 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
ff78e79b3cae85aec85473a893cf1e41f330aa5520ad29fd8e2ec9c5f79045af
BLAKE2b-256 checksum
How to use checksums
f6fe200751a8bbd6a3bad77fa890393640910e5966e52b1899c810602e1610ef
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / dsf_suite-7.3.1-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL dsf_suite-7.3.1-cp314-cp314-manylinux_2_28_x86_64.whl
Size 2.3 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
211fe34cdf37b33457b8befa9c46a1611b2cb0d817c128c28c3224ceb836789e
BLAKE2b-256 checksum
How to use checksums
bbed64ef351bde4346c1f869882b71d3939bf81403a02fc26fa8758ce748b946
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / dsf_suite-7.3.1-cp314-cp314-macosx_26_0_arm64.whl

Download URL dsf_suite-7.3.1-cp314-cp314-macosx_26_0_arm64.whl
Size 1.6 MB
Tags CPython 3.14 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
8819e5f6296e33133500b0bbd15de3a7eddf6b8d1521e00e7fadd002c5eee7ad
BLAKE2b-256 checksum
How to use checksums
1550053ba0a23877e1fc5d96e5e96359407f09666e867c83b007cde3d320d579
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / dsf_suite-7.3.1-cp313-cp313-win_amd64.whl

Download URL dsf_suite-7.3.1-cp313-cp313-win_amd64.whl
Size 1.7 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
1d60978da3bdd1daeeb1e43820712f162414c52b929484d441439e1ec64f7a37
BLAKE2b-256 checksum
How to use checksums
9ef39dc2e2444ad07818ac99897cea67c1d668b535d06994a4476c52ee417060
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / dsf_suite-7.3.1-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL dsf_suite-7.3.1-cp313-cp313-manylinux_2_28_x86_64.whl
Size 2.3 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
e74b33674922f99baf97ce66ec907f0213e6bc3bf8e9bbb1cf06cc802a6d4868
BLAKE2b-256 checksum
How to use checksums
3e87f6b36ca8917fe2d43038a8a11d378c83bc6ce30135e6560b7af8ecd316ea
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / dsf_suite-7.3.1-cp313-cp313-macosx_26_0_arm64.whl

Download URL dsf_suite-7.3.1-cp313-cp313-macosx_26_0_arm64.whl
Size 1.6 MB
Tags CPython 3.13 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
564675c272a6d0b9333d155b6da4f6e92f5fbfff86add4a231d4be933c9f04c2
BLAKE2b-256 checksum
How to use checksums
06d9f341e8ee30d1bcb455e2c075771924d4b992944f108a4fa56a6222fe3e2a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / dsf_suite-7.3.1-cp312-cp312-win_amd64.whl

Download URL dsf_suite-7.3.1-cp312-cp312-win_amd64.whl
Size 1.7 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
0f8d746773b785b259fb69a4db94a321db7f6c493f0d9cdd711148d9641e74c2
BLAKE2b-256 checksum
How to use checksums
e549b77be079c9fe9d5b35ee770bee7dc366c768c876fcf1bb59a2bbbd2c5023
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / dsf_suite-7.3.1-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL dsf_suite-7.3.1-cp312-cp312-manylinux_2_28_x86_64.whl
Size 2.3 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
c821d730e5f3fd7e8a07cfc724772f0e830fb2b7ecec1dd14eb0cb6c60bcd078
BLAKE2b-256 checksum
How to use checksums
ebed2a31b64f6057508e097020c250355221b048833f897ecc6ed3773875729e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release files / dsf_suite-7.3.1-cp312-cp312-macosx_26_0_arm64.whl

Download URL dsf_suite-7.3.1-cp312-cp312-macosx_26_0_arm64.whl
Size 1.6 MB
Tags CPython 3.12 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
ecf2923b2f8dca1d528baf3c037bd14712b5ab09e49c842bd282b485c030e043
BLAKE2b-256 checksum
How to use checksums
9b7cfde409f4f0467b955041c44bdf9a1e3a9c4d39a3340df8207a2fa3f68caf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Release history Release notifications | RSS feed

7.3.2

10 release files

This release

7.3.1 This release

10 release files

7.3.0

10 release files

7.2.9

10 release files

7.2.8

10 release files

7.2.7

10 release files

7.2.6

10 release files

7.2.5

10 release files

7.2.4

10 release files

7.2.3

10 release files

7.2.2

10 release files

7.2.1

10 release files

7.2.0

10 release files

7.1.0

10 release files

7.0.4

10 release files

7.0.3

10 release files

7.0.2

10 release files

7.0.1

10 release files

6.7.0

10 release files

6.6.3

10 release files

6.6.2

10 release files

6.6.1

10 release files

6.6.0

10 release files

6.5.7

10 release files

6.5.6

10 release files

6.5.5

10 release files

6.5.4

10 release files

6.3.2

10 release files

6.3.1

10 release files

6.2.5

10 release files

6.2.4

10 release files

6.2.3

10 release files

6.2.2

10 release files

6.2.1

10 release files

6.2.0

10 release files

6.0.9

10 release files

6.0.8

13 release files

6.0.7

13 release files

6.0.5

9 release files

6.0.4

9 release files

6.0.3

9 release files

6.0.2

9 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page