Name | trafficgen JSON |
Version |
0.7.0
JSON |
| download |
home_page | None |
Summary | Automatic generation of ship traffic situations from a set of predefined situations |
upload_time | 2025-01-21 11:40:31 |
maintainer | None |
docs_url | None |
author | None |
requires_python | >=3.11 |
license | MIT License Copyright (c) 2025 [DNV](https://www.dnv.com) [open source](https://github.com/dnv-opensource) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. |
keywords |
simulation
testing
traffic generator
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# Traffic Generator
The tool generates a structured set of encounters for verifying automatic collision and grounding avoidance systems.
Based on input parameters such as desired situation, relative speed, relative bearing etc,
the tool will generate a set of traffic situations. The traffic situations may be written to files and/or inspected using plots.
A paper is written describing the background for the tool and how it works <a href="./docs/ICMASS23_verfying_caga_systems.pdf" target="_blank">[paper]</a>
## Installation
To install Ship Traffic Generator, run this command in your terminal:
```sh
pip install trafficgen
```
This is the preferred method to install Traffic Generator, as it will always install the most recent stable release.
You can check your installation by running:
```sh
uv run trafficgen --help
```
See documentation for usage of the Ship Traffic Generator.
## Development Setup
### Install UV
This project uses `uv` as package manager.
If you haven't already, install [uv](https://docs.astral.sh/uv), preferably using it's ["Standalone installer"](https://docs.astral.sh/uv/getting-started/installation/#__tabbed_1_2) method: <br>
..on Windows:
```sh
powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
```
..on MacOS and Linux:
```sh
curl -LsSf https://astral.sh/uv/install.sh | sh
```
(see [docs.astral.sh/uv](https://docs.astral.sh/uv/getting-started/installation/) for all / alternative installation methods.)
Once installed, you can update `uv` to its latest version, anytime, by running:
```sh
uv self update
```
### Install Python
The traffic generator requires Python 3.11 or later. <br>
If you don't already have a compatible version installed on your machine, you way install Python through `uv`:
```sh
uv python install
```
This will install the latest stable version of Python into the uv Python directory, i.e. as a uv-managed version of Python.
Alternatively, and if you want a standalone version of Python on your machine, you can install Python either via `winget`:
```sh
winget install --id Python.Python
```
or you can download and install Python from the [python.org](https://www.python.org/downloads/) website.
### Clone the repository
Clone the traffig generator repository into your local development directory:
```sh
git clone https://github.com/dnv-opensource/ship-traffic-generator path/to/your/dir/ship-traffic-generator
```
Change into the project directory after cloning:
```sh
cd ship-traffic-generator
```
### Install dependencies
Run `uv sync` to create a virtual environment and install all project dependencies into it:
```sh
uv sync
```
> **Note**: Using `--no-dev` will omit installing development dependencies.
> **Note**: `uv` will create a new virtual environment called `.venv` in the project root directory when running
> `uv sync` the first time. Optionally, you can create your own virtual environment using e.g. `uv venv`, before running
> `uv sync`.
### (Optional) Activate the virtual environment
When using `uv`, there is in almost all cases no longer a need to manually activate the virtual environment. <br>
`uv` will find the `.venv` virtual environment in the working directory or any parent directory, and activate it on the fly whenever you run a command via `uv` inside your project folder structure:
```sh
uv run <command>
```
However, you still _can_ manually activate the virtual environment if needed.
When developing in an IDE, for instance, this can in some cases be necessary depending on your IDE settings.
To manually activate the virtual environment, run one of the "known" legacy commands: <br>
..on Windows:
```sh
.venv\Scripts\activate.bat
```
..on Linux:
```sh
source .venv/bin/activate
```
### Documentation
To generate documentation use:
```sh
uv run docs/make.bat html
```
The html documentation will then be available in `docs/build/html/index.html`
Raw data
{
"_id": null,
"home_page": null,
"name": "trafficgen",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.11",
"maintainer_email": null,
"keywords": "simulation, testing, traffic generator",
"author": null,
"author_email": "Tom Arne Pedersen <Tom.Arne.Pedersen@dnv.com>, Claas Rostock <Claas.Rostock@dnv.com>, Minos Hemrich <Minos.Hemrich@dnv.com>",
"download_url": "https://files.pythonhosted.org/packages/06/c9/fc663f3d74eb7594291bd10635f2c43068e0841da4d12cfa8f8a79739535/trafficgen-0.7.0.tar.gz",
"platform": null,
"description": "# Traffic Generator\nThe tool generates a structured set of encounters for verifying automatic collision and grounding avoidance systems.\nBased on input parameters such as desired situation, relative speed, relative bearing etc,\nthe tool will generate a set of traffic situations. The traffic situations may be written to files and/or inspected using plots.\n\nA paper is written describing the background for the tool and how it works <a href=\"./docs/ICMASS23_verfying_caga_systems.pdf\" target=\"_blank\">[paper]</a>\n\n## Installation\nTo install Ship Traffic Generator, run this command in your terminal:\n```sh\npip install trafficgen\n```\nThis is the preferred method to install Traffic Generator, as it will always install the most recent stable release.\n\nYou can check your installation by running:\n```sh\nuv run trafficgen --help\n```\n\nSee documentation for usage of the Ship Traffic Generator.\n\n## Development Setup\n\n### Install UV\nThis project uses `uv` as package manager.\nIf you haven't already, install [uv](https://docs.astral.sh/uv), preferably using it's [\"Standalone installer\"](https://docs.astral.sh/uv/getting-started/installation/#__tabbed_1_2) method: <br>\n..on Windows:\n```sh\npowershell -ExecutionPolicy ByPass -c \"irm https://astral.sh/uv/install.ps1 | iex\"\n```\n..on MacOS and Linux:\n```sh\ncurl -LsSf https://astral.sh/uv/install.sh | sh\n```\n(see [docs.astral.sh/uv](https://docs.astral.sh/uv/getting-started/installation/) for all / alternative installation methods.)\n\nOnce installed, you can update `uv` to its latest version, anytime, by running:\n```sh\nuv self update\n```\n\n### Install Python\nThe traffic generator requires Python 3.11 or later. <br>\n\nIf you don't already have a compatible version installed on your machine, you way install Python through `uv`:\n```sh\nuv python install\n```\nThis will install the latest stable version of Python into the uv Python directory, i.e. as a uv-managed version of Python.\n\nAlternatively, and if you want a standalone version of Python on your machine, you can install Python either via `winget`:\n```sh\nwinget install --id Python.Python\n```\nor you can download and install Python from the [python.org](https://www.python.org/downloads/) website.\n\n### Clone the repository\nClone the traffig generator repository into your local development directory:\n```sh\ngit clone https://github.com/dnv-opensource/ship-traffic-generator path/to/your/dir/ship-traffic-generator\n```\nChange into the project directory after cloning:\n```sh\ncd ship-traffic-generator\n```\n\n### Install dependencies\nRun `uv sync` to create a virtual environment and install all project dependencies into it:\n```sh\nuv sync\n```\n> **Note**: Using `--no-dev` will omit installing development dependencies.\n\n> **Note**: `uv` will create a new virtual environment called `.venv` in the project root directory when running\n> `uv sync` the first time. Optionally, you can create your own virtual environment using e.g. `uv venv`, before running\n> `uv sync`.\n\n### (Optional) Activate the virtual environment\nWhen using `uv`, there is in almost all cases no longer a need to manually activate the virtual environment. <br>\n`uv` will find the `.venv` virtual environment in the working directory or any parent directory, and activate it on the fly whenever you run a command via `uv` inside your project folder structure:\n```sh\nuv run <command>\n```\n\nHowever, you still _can_ manually activate the virtual environment if needed.\nWhen developing in an IDE, for instance, this can in some cases be necessary depending on your IDE settings.\nTo manually activate the virtual environment, run one of the \"known\" legacy commands: <br>\n..on Windows:\n```sh\n.venv\\Scripts\\activate.bat\n```\n..on Linux:\n```sh\nsource .venv/bin/activate\n```\n\n### Documentation\nTo generate documentation use:\n```sh\nuv run docs/make.bat html\n```\nThe html documentation will then be available in `docs/build/html/index.html`\n",
"bugtrack_url": null,
"license": "MIT License Copyright (c) 2025 [DNV](https://www.dnv.com) [open source](https://github.com/dnv-opensource) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the \"Software\"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.",
"summary": "Automatic generation of ship traffic situations from a set of predefined situations",
"version": "0.7.0",
"project_urls": {
"Changelog": "https://github.com/dnv-innersource/ship-traffic-generator/blob/main/CHANGELOG.md",
"Homepage": "https://github.com/dnv-opensource/ship-traffic-generator",
"Issues": "https://github.com/dnv-opensource/ship-traffic-generator/issues",
"Repository": "https://github.com/dnv-opensource/ship-traffic-generator.git"
},
"split_keywords": [
"simulation",
" testing",
" traffic generator"
],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "2020c956c58031ad3409e4d233ee3bc242cc5fde9d900c0846f0e119814f9da4",
"md5": "2deeffb84f5c06c55961ee5ddd427316",
"sha256": "670731f9ffa572d53f0b9384787be1e8d7b0109fc5e23501574df72ed81f27f9"
},
"downloads": -1,
"filename": "trafficgen-0.7.0-py3-none-any.whl",
"has_sig": false,
"md5_digest": "2deeffb84f5c06c55961ee5ddd427316",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.11",
"size": 4724,
"upload_time": "2025-01-21T11:40:30",
"upload_time_iso_8601": "2025-01-21T11:40:30.277350Z",
"url": "https://files.pythonhosted.org/packages/20/20/c956c58031ad3409e4d233ee3bc242cc5fde9d900c0846f0e119814f9da4/trafficgen-0.7.0-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "06c9fc663f3d74eb7594291bd10635f2c43068e0841da4d12cfa8f8a79739535",
"md5": "c538dbec280bb31b407462e04e715277",
"sha256": "bcc1bbc068b0904bd9d3456b6b314d31dd2e287fe629cb44238761ac391315df"
},
"downloads": -1,
"filename": "trafficgen-0.7.0.tar.gz",
"has_sig": false,
"md5_digest": "c538dbec280bb31b407462e04e715277",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.11",
"size": 113413,
"upload_time": "2025-01-21T11:40:31",
"upload_time_iso_8601": "2025-01-21T11:40:31.670042Z",
"url": "https://files.pythonhosted.org/packages/06/c9/fc663f3d74eb7594291bd10635f2c43068e0841da4d12cfa8f8a79739535/trafficgen-0.7.0.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-21 11:40:31",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "dnv-innersource",
"github_project": "ship-traffic-generator",
"github_not_found": true,
"lcname": "trafficgen"
}