Skip to main content
Pre-release

This release is a pre-release and may not be stable for production use.

Documentation License: MIT DOI

CircleCI

OpenTNSim

Open source Transport Network Simulation - Analysis of traffic behaviour on networks for different traffic scenarios and network configurations.

Documentation can be found: here

Book

You can find the opentnsim book, based on the examples in the notebooks folder on the opentnsim-book website.

Installation

Quick Start

Prerequisites:

  • Python 3.12 or higher
  • pip
  • Dependency manager: Poetry or uv (Only need one of them)

If you do not have pip installed, this Python installation guide can guide you through the process. You can read the documentation for other installation methods and a more detailed description.

It is recommended to use either Poetry or uv for as dependency manager. For help on installing, using and trouble shooting these dependencymanagers see Virtual Environments basics folder on opentnsim-book.

User

To install OpenTNSim, you can choose how to install it into your system The set of commands show the three options for pip, Poetry and uv. Choose your desired installation method and enter the corresponding commands in the terminal:

# using pip
pip install opentnsim

# using Poetry
poetry add opentnsim

# using uv
uv add opentnsim

Then also install the extra dependencies used for testing and notebook support:

# using pip
pip install opentnsim[testing]

# using Poetry
poetry add opentnsim[testing]

# using uv
uv add opentnsim[testing]

Local Development: Contributing & Notebooks

If you want to contribute or run notebooks follow the steps below:

Clone the repository Clone the repository and navigate to the location on your local machine

# Use git to clone OpenTNSim
git clone git://github.com/TUDelft-CITG/OpenTNSim
cd opentnsim

Using uv install packages.This will also automatically create your virtual environment under .venv

uv sync --extra testing

Using Poetry

poetry install --extras testing

Activate your virtual environment:

# Linux
source .venv/bin/activate

# Windows
source .venv\Scripts\activate

You can now run scripts or tests:

## run specific python script
python script.py

# run all tests
pytest

# run single tests
pytest -k test_graph

# run notebooks tests
pytest --nbmake ./notebooks --nbmake-kernel=python3 --ignore ./notebooks/cleanup --ignore ./notebooks/student_notebooks --ignore ./notebooks/broken

# run with coverage
pytest --cov=opentnsim

Working with Jupyter Notebooks

  1. Check if Jupyter extension is installed with poetry show ipykernel or uv pip show ipykernel.
  2. Open any .ipynb file
  3. Select "opentnsim" kernel. Should look something like: opentnsim-py3.13.

Examples

The benefit of OpenTNSim is the generic set-up. A number of examples are presented in in the notebooks folder on the opentnsim-book website. Additional examples can be found in the notebooks-folder in this repository.

Book

Based on the examples and docs a book can be generated using the commands make book and cleaned up using make clean-book. These commands are unix only.

Code quality

Code quality is checked using sonarcloud. You can see results on the sonarcloud website. For now we have disabled coverage and duplication checks. These can be enabled when we include coverage measurements and reduce duplication by optimizing the tests.

OpenCLSim

OpenTNSim makes use of the OpenCLSim code. Both packages are maintained by the same team of developers. You can use these packages together, and combine mixins from both packages. When you experience a problem with integrating the two packages, please let us know. We are working towards further integrating these two software packages.

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

opentnsim-2.3.3a1.tar.gz (199.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

opentnsim-2.3.3a1-py3-none-any.whl (223.7 kB view details)

Uploaded Python 3

File details

Details for the file opentnsim-2.3.3a1.tar.gz.

File metadata

  • Download URL: opentnsim-2.3.3a1.tar.gz
  • Upload date:
  • Size: 199.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for opentnsim-2.3.3a1.tar.gz
Algorithm Hash digest
SHA256 585d74f7d187498021208318f04a56353f63f310d2502a08491fecc96b1d35cd
MD5 47fb6e428e12a05ac0ac4e64f46b0de6
BLAKE2b-256 6ade58fe22209600a8cbc21d2e5052482b7c10905937db5e45fac84d01064ffd

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentnsim-2.3.3a1.tar.gz:

Publisher: python-publish.yml on TUDelft-CITG/OpenTNSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file opentnsim-2.3.3a1-py3-none-any.whl.

File metadata

  • Download URL: opentnsim-2.3.3a1-py3-none-any.whl
  • Upload date:
  • Size: 223.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/7.0.0 CPython/3.13.14

File hashes

Hashes for opentnsim-2.3.3a1-py3-none-any.whl
Algorithm Hash digest
SHA256 2ab254284b158c72154bd28cb866ced458631d58b6f16339d76d30405946b354
MD5 c48d31e224834aea6ac24fd2c3d8e995
BLAKE2b-256 789b5e4ab9193be9af00afecd5f9721dc62953941ba281321f82047cc1cb35a5

See more details on using hashes here.

Provenance

The following attestation bundles were made for opentnsim-2.3.3a1-py3-none-any.whl:

Publisher: python-publish.yml on TUDelft-CITG/OpenTNSim

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Release history Release notifications | RSS feed

This release

2.3.3a1 This release

2 files

2.2.2

2 files

2.2.1

2 files

1.3.7

2 files

1.3.6

2 files

1.3.4

2 files

1.1.2

2 files

1.0.0

1 file

0.0.1

2 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