The OpenTNSim package aims to facilitate the analysis of network performance for different network configurations, fleet compositions and traffic rules.
Open source Transport Network Simulation - Analysis of traffic behaviour on networks for different traffic scenarios and network configurations.
Documentation can be found: here
You can find the opentnsim book, based on the examples in the
notebooks folder on the opentnsim-book website.
To install OpenTNSim, run this command in your terminal:
pip install opentnsim
To also install the extra dependencies used for testing you can use:
pip install opentnsim[testing]
This is the preferred method to install OpenTNSim, as it will always install the most recent stable release.
You can read the documentation for other installation methods.
You can run the unit tests
Or you can run the notebook tests:
pytest --nbmake ./notebooks --nbmake-kernel=python3 --ignore ./notebooks/cleanup ./notebooks/students
Or you can run a specific test like this:
pytest -k test_single_engine
The benefit of OpenTNSim is the generic set-up. A number of examples are presented in a seperate Jupyter Notebook repository. Information on how to use the notebooks is presented in that repository as well.
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 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.
OpenTNSim makes use of the OpenCLSim code. Both packages are maintained by the same team of developers. There are some differences between packages (e.g. in logging approaches), but you can use them together. We are working towards further integrating these two software packages.
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Hashes for opentnsim-1.3.4-py2.py3-none-any.whl