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.

Release files for dsf-suite 7.0.2

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.0.2
File Size Uploaded
dsf_suite-7.0.2.tar.gz 177.7 kB Details

Built distributions (wheels)

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

Total release size: 15.9 MB

Release files / dsf_suite-7.0.2.tar.gz

Download URL dsf_suite-7.0.2.tar.gz
Size 177.7 kB
Tags Source
SHA-256 checksum
How to use checksums
9155446eee6288f2ba189be2fab58c514719f8bd7f3f074fd1e2ab447143e416
BLAKE2b-256 checksum
How to use checksums
75b45dcc64bd7acda4b075a91df0e85490cb2edf29b3bbea3ee2fd532c6c8f6e
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.0.2-cp314-cp314-win_amd64.whl

Download URL dsf_suite-7.0.2-cp314-cp314-win_amd64.whl
Size 1.6 MB
Tags CPython 3.14 Windows x86-64
SHA-256 checksum
How to use checksums
1612a059b65de3570ba738a83262f11432397b7be1ee81ce51e3559f8ea81df0
BLAKE2b-256 checksum
How to use checksums
d0d615be7dbfe3602288c32e586a3be765483b4d0e25284fa2a11a16d771cdf0
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.0.2-cp314-cp314-manylinux_2_28_x86_64.whl

Download URL dsf_suite-7.0.2-cp314-cp314-manylinux_2_28_x86_64.whl
Size 2.2 MB
Tags CPython 3.14 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
3e52b969162930949b2a2643ec70c9851b5090ae4d409815eb8b51d2af144750
BLAKE2b-256 checksum
How to use checksums
c9b349ce28b9f0994d28410a1e6427d15be2d5fc64b1b0f0980f631295673931
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.0.2-cp314-cp314-macosx_26_0_arm64.whl

Download URL dsf_suite-7.0.2-cp314-cp314-macosx_26_0_arm64.whl
Size 1.5 MB
Tags CPython 3.14 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
2d0c871c3c9b4ea34839023922cd074070a646503a82ee6f9cf6852f45801316
BLAKE2b-256 checksum
How to use checksums
f2414b742c25689cfb730f20761e4e08a9ebce26e291059327094c08c3c83b46
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.0.2-cp313-cp313-win_amd64.whl

Download URL dsf_suite-7.0.2-cp313-cp313-win_amd64.whl
Size 1.5 MB
Tags CPython 3.13 Windows x86-64
SHA-256 checksum
How to use checksums
266040ceb6e1d25c1efab85fa66824808fa36af847f4e577a6c85390825cf2a5
BLAKE2b-256 checksum
How to use checksums
964233c3913bbd0bc6551ede60be62ea512ad763ce474d7fd20632bb2dd80aef
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.0.2-cp313-cp313-manylinux_2_28_x86_64.whl

Download URL dsf_suite-7.0.2-cp313-cp313-manylinux_2_28_x86_64.whl
Size 2.2 MB
Tags CPython 3.13 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
946b7d12e991bdb8b1fda80bd0a5b8e41ddb68332fe31bcbfcde066e039b462f
BLAKE2b-256 checksum
How to use checksums
b06da0bf36e8a49e6b1dbfa276cf9288234770569ef49f2f9337575688577b50
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.0.2-cp313-cp313-macosx_26_0_arm64.whl

Download URL dsf_suite-7.0.2-cp313-cp313-macosx_26_0_arm64.whl
Size 1.5 MB
Tags CPython 3.13 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
770c1d5cb4a764bfefcaf7d1f4cfe961e69669971b851b7f71a2ac826552f168
BLAKE2b-256 checksum
How to use checksums
03d4ddaa372cd9d1cb4f7c8f1eeb6499b08e33fc104f00fe47e3e4d2fab24ff9
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.0.2-cp312-cp312-win_amd64.whl

Download URL dsf_suite-7.0.2-cp312-cp312-win_amd64.whl
Size 1.5 MB
Tags CPython 3.12 Windows x86-64
SHA-256 checksum
How to use checksums
ab1194340d2008466999e4f1f553bbad4c83351c4c2944c3873e8b8f0f3bac08
BLAKE2b-256 checksum
How to use checksums
4a282400e6493e22f0d655598c36eeb4b2cef341d6e98aedd4b3de69c8478ee1
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.0.2-cp312-cp312-manylinux_2_28_x86_64.whl

Download URL dsf_suite-7.0.2-cp312-cp312-manylinux_2_28_x86_64.whl
Size 2.2 MB
Tags CPython 3.12 Linux glibc 2.28+ x86-64
SHA-256 checksum
How to use checksums
dc5a06f933fbc66b3aae033ca13cc97cefb04621f34495e8151d314b77521f25
BLAKE2b-256 checksum
How to use checksums
0a8ba9d8ac92ca38d5e9dec11ef1b1ce2b88a4bd7bdd5db8b7fc4271f0a8338f
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.0.2-cp312-cp312-macosx_26_0_arm64.whl

Download URL dsf_suite-7.0.2-cp312-cp312-macosx_26_0_arm64.whl
Size 1.5 MB
Tags CPython 3.12 macOS 26.0+ ARM64
SHA-256 checksum
How to use checksums
cbcdf7280944bd71d80cef84da1366420b6d92e68e1db69926f91041d7e2c97e
BLAKE2b-256 checksum
How to use checksums
7af7381f479c4827a1f876e9c7f0392c3ba923332409f9736de069dcb46373df
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.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

This release

7.0.2 This release

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