pyssms 0.1.0__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (151) hide show
  1. pyssms-0.1.0/.github/workflows/ci.yml +18 -0
  2. pyssms-0.1.0/.github/workflows/release.yml +39 -0
  3. pyssms-0.1.0/.gitignore +48 -0
  4. pyssms-0.1.0/CHANGELOG.md +18 -0
  5. pyssms-0.1.0/CITATION.cff +26 -0
  6. pyssms-0.1.0/CONTRIBUTING.md +11 -0
  7. pyssms-0.1.0/LICENSE +29 -0
  8. pyssms-0.1.0/PKG-INFO +112 -0
  9. pyssms-0.1.0/README.md +82 -0
  10. pyssms-0.1.0/docs/benchmark.md +23 -0
  11. pyssms-0.1.0/docs/beta_proposal.md +48 -0
  12. pyssms-0.1.0/docs/data_notes.md +11 -0
  13. pyssms-0.1.0/docs/data_sources.md +35 -0
  14. pyssms-0.1.0/docs/diamond_NGSIM.json +382 -0
  15. pyssms-0.1.0/docs/diamond_NGSIM.md +99 -0
  16. pyssms-0.1.0/docs/diamond_NGSIM_raw.json +110 -0
  17. pyssms-0.1.0/docs/diamond_NGSIM_raw.md +32 -0
  18. pyssms-0.1.0/docs/diamond_exiD.json +746 -0
  19. pyssms-0.1.0/docs/diamond_exiD.md +206 -0
  20. pyssms-0.1.0/docs/diamond_highD.json +640 -0
  21. pyssms-0.1.0/docs/diamond_highD.md +177 -0
  22. pyssms-0.1.0/docs/diamond_inD.json +714 -0
  23. pyssms-0.1.0/docs/diamond_inD.md +167 -0
  24. pyssms-0.1.0/docs/diamond_rounD.json +571 -0
  25. pyssms-0.1.0/docs/diamond_rounD.md +141 -0
  26. pyssms-0.1.0/docs/diamond_uniD.json +193 -0
  27. pyssms-0.1.0/docs/diamond_uniD.md +49 -0
  28. pyssms-0.1.0/docs/equivalence.json +135 -0
  29. pyssms-0.1.0/docs/equivalence.md +38 -0
  30. pyssms-0.1.0/docs/exid_ssm1d_descriptive.json +527 -0
  31. pyssms-0.1.0/docs/exid_ssm1d_descriptive.md +62 -0
  32. pyssms-0.1.0/docs/figures/timetime_concept.png +0 -0
  33. pyssms-0.1.0/docs/highd_ssm1d_descriptive.json +527 -0
  34. pyssms-0.1.0/docs/highd_ssm1d_descriptive.md +62 -0
  35. pyssms-0.1.0/docs/index.md +25 -0
  36. pyssms-0.1.0/docs/io_and_scenarios.md +123 -0
  37. pyssms-0.1.0/docs/jimenez2013_note.md +44 -0
  38. pyssms-0.1.0/docs/methods.md +101 -0
  39. pyssms-0.1.0/docs/ngsim_checks.md +10 -0
  40. pyssms-0.1.0/docs/ngsim_notes.md +86 -0
  41. pyssms-0.1.0/docs/ngsim_overlap.json +12 -0
  42. pyssms-0.1.0/docs/ngsim_overlap.md +14 -0
  43. pyssms-0.1.0/docs/ngsim_ssm1d_descriptive.json +527 -0
  44. pyssms-0.1.0/docs/ngsim_ssm1d_descriptive.md +62 -0
  45. pyssms-0.1.0/docs/ssm1d_notes.md +40 -0
  46. pyssms-0.1.0/docs/validation.md +33 -0
  47. pyssms-0.1.0/mkdocs.yml +10 -0
  48. pyssms-0.1.0/paper_softwarex/README.md +15 -0
  49. pyssms-0.1.0/paper_softwarex/build_en.py +187 -0
  50. pyssms-0.1.0/paper_softwarex/build_fa.py +167 -0
  51. pyssms-0.1.0/paper_softwarex/check_parallel.py +79 -0
  52. pyssms-0.1.0/paper_softwarex/check_pdf_numbers.py +63 -0
  53. pyssms-0.1.0/paper_softwarex/common.py +138 -0
  54. pyssms-0.1.0/paper_softwarex/content.py +495 -0
  55. pyssms-0.1.0/paper_softwarex/fig_numbers.json +12 -0
  56. pyssms-0.1.0/paper_softwarex/figures/fig1_architecture.pdf +0 -0
  57. pyssms-0.1.0/paper_softwarex/figures/fig1_architecture.png +0 -0
  58. pyssms-0.1.0/paper_softwarex/figures/fig1_architecture_fa.pdf +0 -0
  59. pyssms-0.1.0/paper_softwarex/figures/fig1_architecture_fa.png +0 -0
  60. pyssms-0.1.0/paper_softwarex/figures/fig2_polygon.pdf +0 -0
  61. pyssms-0.1.0/paper_softwarex/figures/fig2_polygon.png +0 -0
  62. pyssms-0.1.0/paper_softwarex/figures/fig3_verification.pdf +0 -0
  63. pyssms-0.1.0/paper_softwarex/figures/fig3_verification.png +0 -0
  64. pyssms-0.1.0/paper_softwarex/figures/fig4_ten_measures.pdf +0 -0
  65. pyssms-0.1.0/paper_softwarex/figures/fig4_ten_measures.png +0 -0
  66. pyssms-0.1.0/paper_softwarex/figures/fig5_correlations.pdf +0 -0
  67. pyssms-0.1.0/paper_softwarex/figures/fig5_correlations.png +0 -0
  68. pyssms-0.1.0/paper_softwarex/figures/fig6_hierarchy.pdf +0 -0
  69. pyssms-0.1.0/paper_softwarex/figures/fig6_hierarchy.png +0 -0
  70. pyssms-0.1.0/paper_softwarex/highlights.txt +5 -0
  71. pyssms-0.1.0/paper_softwarex/latex/figures/fig1_architecture.pdf +0 -0
  72. pyssms-0.1.0/paper_softwarex/latex/figures/fig2_polygon.pdf +0 -0
  73. pyssms-0.1.0/paper_softwarex/latex/figures/fig3_ten_measures.pdf +0 -0
  74. pyssms-0.1.0/paper_softwarex/latex/figures/fig3_verification.pdf +0 -0
  75. pyssms-0.1.0/paper_softwarex/latex/figures/fig4_correlations.pdf +0 -0
  76. pyssms-0.1.0/paper_softwarex/latex/figures/fig4_ten_measures.pdf +0 -0
  77. pyssms-0.1.0/paper_softwarex/latex/figures/fig5_correlations.pdf +0 -0
  78. pyssms-0.1.0/paper_softwarex/latex/figures/fig5_hierarchy.pdf +0 -0
  79. pyssms-0.1.0/paper_softwarex/latex/figures/fig6_hierarchy.pdf +0 -0
  80. pyssms-0.1.0/paper_softwarex/latex/figures/fig6_verification.pdf +0 -0
  81. pyssms-0.1.0/paper_softwarex/latex/manuscript_softwarex.tex +333 -0
  82. pyssms-0.1.0/paper_softwarex/listing_result.json +32 -0
  83. pyssms-0.1.0/paper_softwarex/listing_test.py +19 -0
  84. pyssms-0.1.0/paper_softwarex/make_figures.py +492 -0
  85. pyssms-0.1.0/paper_softwarex/make_numbers.py +217 -0
  86. pyssms-0.1.0/paper_softwarex/manuscript_en.in.md +93 -0
  87. pyssms-0.1.0/paper_softwarex/manuscript_fa.in.md +93 -0
  88. pyssms-0.1.0/paper_softwarex/results.json +868 -0
  89. pyssms-0.1.0/paper_softwarex/softwarex_fa.css +38 -0
  90. pyssms-0.1.0/pyproject.toml +83 -0
  91. pyssms-0.1.0/src/pyssms/__init__.py +32 -0
  92. pyssms-0.1.0/src/pyssms/bank.py +360 -0
  93. pyssms-0.1.0/src/pyssms/calibration.py +158 -0
  94. pyssms-0.1.0/src/pyssms/contact.py +244 -0
  95. pyssms-0.1.0/src/pyssms/data/NGSIM_CC-BY-2.0_legalcode.html +219 -0
  96. pyssms-0.1.0/src/pyssms/data/NGSIM_LICENSE.txt +5 -0
  97. pyssms-0.1.0/src/pyssms/data/conflict_bank_ngsim.npz +0 -0
  98. pyssms-0.1.0/src/pyssms/data/summary_levelx.json +2867 -0
  99. pyssms-0.1.0/src/pyssms/datasets.py +219 -0
  100. pyssms-0.1.0/src/pyssms/disturbance.py +266 -0
  101. pyssms-0.1.0/src/pyssms/escape.py +131 -0
  102. pyssms-0.1.0/src/pyssms/geometry.py +96 -0
  103. pyssms-0.1.0/src/pyssms/hierarchy.py +173 -0
  104. pyssms-0.1.0/src/pyssms/io.py +699 -0
  105. pyssms-0.1.0/src/pyssms/margins.py +109 -0
  106. pyssms-0.1.0/src/pyssms/preprocessing.py +117 -0
  107. pyssms-0.1.0/src/pyssms/process.py +551 -0
  108. pyssms-0.1.0/src/pyssms/py.typed +0 -0
  109. pyssms-0.1.0/src/pyssms/reference/__init__.py +6 -0
  110. pyssms-0.1.0/src/pyssms/reference/laureshyn2010.py +195 -0
  111. pyssms-0.1.0/src/pyssms/reference/scenarios.py +96 -0
  112. pyssms-0.1.0/src/pyssms/scenario.py +241 -0
  113. pyssms-0.1.0/src/pyssms/severity.py +180 -0
  114. pyssms-0.1.0/src/pyssms/ssm1d.py +208 -0
  115. pyssms-0.1.0/src/pyssms/stories.py +200 -0
  116. pyssms-0.1.0/src/pyssms/timetime.py +375 -0
  117. pyssms-0.1.0/src/pyssms/trajectories.py +173 -0
  118. pyssms-0.1.0/src/pyssms/validation/__init__.py +127 -0
  119. pyssms-0.1.0/src/pyssms/validation/data/example.yaml +17 -0
  120. pyssms-0.1.0/src/pyssms/validation/data/laureshyn2017_table1.yaml +146 -0
  121. pyssms-0.1.0/src/pyssms/viz.py +143 -0
  122. pyssms-0.1.0/tests/unit/test_appendix_a.py +66 -0
  123. pyssms-0.1.0/tests/unit/test_contact.py +232 -0
  124. pyssms-0.1.0/tests/unit/test_disturbance.py +189 -0
  125. pyssms-0.1.0/tests/unit/test_escape.py +134 -0
  126. pyssms-0.1.0/tests/unit/test_injury_risk.py +60 -0
  127. pyssms-0.1.0/tests/unit/test_invariance.py +166 -0
  128. pyssms-0.1.0/tests/unit/test_io.py +243 -0
  129. pyssms-0.1.0/tests/unit/test_jimenez2013.py +65 -0
  130. pyssms-0.1.0/tests/unit/test_margins.py +97 -0
  131. pyssms-0.1.0/tests/unit/test_ngsim_bank.py +189 -0
  132. pyssms-0.1.0/tests/unit/test_process.py +245 -0
  133. pyssms-0.1.0/tests/unit/test_propositions.py +96 -0
  134. pyssms-0.1.0/tests/unit/test_readme.py +15 -0
  135. pyssms-0.1.0/tests/unit/test_severity.py +83 -0
  136. pyssms-0.1.0/tests/unit/test_smoke.py +5 -0
  137. pyssms-0.1.0/tests/unit/test_ssm1d.py +172 -0
  138. pyssms-0.1.0/tests/unit/test_stories.py +88 -0
  139. pyssms-0.1.0/tests/unit/test_timetime.py +160 -0
  140. pyssms-0.1.0/tests/unit/test_validation.py +29 -0
  141. pyssms-0.1.0/tools/benchmark.py +111 -0
  142. pyssms-0.1.0/tools/build_conflict_bank.py +118 -0
  143. pyssms-0.1.0/tools/equivalence.py +273 -0
  144. pyssms-0.1.0/tools/levelx_diamond.py +215 -0
  145. pyssms-0.1.0/tools/levelx_ssm1d.py +300 -0
  146. pyssms-0.1.0/tools/levelx_ssm1d_report.py +279 -0
  147. pyssms-0.1.0/tools/make_validation_report.py +54 -0
  148. pyssms-0.1.0/tools/ngsim_checks.py +41 -0
  149. pyssms-0.1.0/tools/ngsim_overlap_check.py +45 -0
  150. pyssms-0.1.0/tools/ngsim_run.py +100 -0
  151. pyssms-0.1.0/tools/ngsim_ssm1d.py +138 -0
@@ -0,0 +1,18 @@
1
+ name: ci
2
+ on: [push, pull_request]
3
+ jobs:
4
+ test:
5
+ runs-on: ${{ matrix.os }}
6
+ strategy:
7
+ matrix:
8
+ os: [ubuntu-latest, windows-latest]
9
+ python: ["3.10", "3.13"]
10
+ steps:
11
+ - uses: actions/checkout@v4
12
+ - uses: actions/setup-python@v5
13
+ with:
14
+ python-version: ${{ matrix.python }}
15
+ - run: pip install -e ".[dev]"
16
+ - run: ruff check src tests
17
+ - run: mypy
18
+ - run: pytest # data/network tests are excluded by default (no microdata in CI)
@@ -0,0 +1,39 @@
1
+ name: release
2
+ # Publishes to PyPI with Trusted Publishing (OIDC): no token or password is stored anywhere.
3
+ # One-time setup on pypi.org (account > Publishing > "Add a new pending publisher"):
4
+ # project name pyssms | owner sabernaseralavi-60 | repository pyssms | workflow release.yml | environment pypi
5
+ # Trigger: publishing a GitHub release, or running the workflow by hand (workflow_dispatch).
6
+ # A published version number can never be reused: bump the version before every release.
7
+ on:
8
+ release:
9
+ types: [published]
10
+ workflow_dispatch:
11
+
12
+ jobs:
13
+ build:
14
+ runs-on: ubuntu-latest
15
+ steps:
16
+ - uses: actions/checkout@v4
17
+ - uses: actions/setup-python@v5
18
+ with:
19
+ python-version: "3.12"
20
+ - run: python -m pip install build twine
21
+ - run: python -m build
22
+ - run: python -m twine check dist/*
23
+ - uses: actions/upload-artifact@v4
24
+ with:
25
+ name: dist
26
+ path: dist/
27
+
28
+ publish:
29
+ needs: build
30
+ runs-on: ubuntu-latest
31
+ environment: pypi
32
+ permissions:
33
+ id-token: write
34
+ steps:
35
+ - uses: actions/download-artifact@v4
36
+ with:
37
+ name: dist
38
+ path: dist/
39
+ - uses: pypa/gh-action-pypi-publish@release/v1
@@ -0,0 +1,48 @@
1
+ # data and caches: never commit microdata or third-party copyrighted PDFs
2
+ local_data/
3
+ data_raw/
4
+ *.csv
5
+ *.parquet
6
+ *.feather
7
+ *.arrow
8
+ *.zip
9
+ *.sas7bdat
10
+ *.xpt
11
+ *.dbf
12
+ *.RData
13
+ *.rds
14
+ lit/*.pdf
15
+ .cache/
16
+ # python
17
+ __pycache__/
18
+ *.py[cod]
19
+ .venv/
20
+ .pytest_cache/
21
+ .mypy_cache/
22
+ .ruff_cache/
23
+ dist/
24
+ build/
25
+ *.egg-info/
26
+ .coverage
27
+ htmlcov/
28
+
29
+ # local figures made from datasets without a declared licence
30
+ figures_local/
31
+ paper/manuscript.html
32
+ paper/manuscript_fa.html
33
+
34
+ # per-recording run files (aggregates, resumable runs)
35
+ runs_local/
36
+
37
+ # logs of long runs
38
+ runs_*.log
39
+ .venv310/
40
+
41
+ # paper_softwarex build leftovers
42
+ paper_softwarex/latex/*.aux
43
+ paper_softwarex/latex/*.log
44
+ paper_softwarex/latex/*.out
45
+ paper_softwarex/latex/*.synctex.gz
46
+ paper_softwarex/__pycache__/
47
+ paper_softwarex/listing_test.log
48
+ paper_softwarex/latex/*.spl
@@ -0,0 +1,18 @@
1
+ # Changelog
2
+
3
+ ## 0.1.0 (2026-11-08): initial release
4
+
5
+ * `timetime`: one conflict polygon K in the plane of the two predicted arrival times gives TTC (state A), Time Advantage, T2 and Time Gap (state B) and
6
+ the no-overlap state C, for two convex translating bodies at any approach angle; vectorised; 8-row and 12-row forms of K for rectangles.
7
+ * `reference.laureshyn2010`: independent implementation of Appendix A of Laureshyn et al. (2010) (32 corner-side combinations); equivalence
8
+ report (`docs/equivalence.md`) and benchmark (`docs/benchmark.md`).
9
+ * `ssm1d`: the ten car-following measures of the 2025 framework (TTC1, TTC2, TTC3, TTCD, DRAC, MDRAC, DCIA, PSD, MPSD, SDI), tested against
10
+ simulations of their motion stories.
11
+ * `contact`, `escape`, `stories`, `margins`, `disturbance`, `severity` (Delta-V, Extended Delta-V, injury-risk curves).
12
+ * Trajectory input and processing: `io` (SSAM, SUMO FCD, VISSIM, LevelX, NGSIM, generic table), `preprocessing`, `process`, `calibration`,
13
+ `hierarchy`, `scenario`, `bank` and `datasets` (synthetic scenarios, a bank of NGSIM conflict windows under the FHWA licence text, aggregated
14
+ counts and scales of the five LevelX data sets; no LevelX trajectories), `viz`.
15
+ * Tests: pytest suite in `tests/`; continuous integration on Linux and Windows with Python 3.10 and 3.13.
16
+ * Article: `paper_softwarex/` holds the sources, the number-injection scripts and the figures of the accompanying software article.
17
+
18
+ Everything reported by the tools is descriptive; no indicator is validated against observed outcomes in this release.
@@ -0,0 +1,26 @@
1
+ cff-version: 1.2.0
2
+ message: "If you use pyssms, please cite it as below."
3
+ title: "pyssms: surrogate safety indicators for road-user encounters on a time-time conflict polygon"
4
+ version: 0.1.0
5
+ date-released: 2026-11-08
6
+ license: BSD-3-Clause
7
+ repository-code: "https://github.com/sabernaseralavi-60/pyssms"
8
+ authors:
9
+ - family-names: Naseralavi
10
+ given-names: Seyed Saber
11
+ orcid: "https://orcid.org/0000-0002-5392-910X"
12
+ affiliation: "Department of Civil Engineering, Shahid Bahonar University of Kerman, Kerman, Iran"
13
+ - family-names: Mazaheri
14
+ given-names: Akram
15
+ affiliation: "Department of Civil and Environmental Engineering, Tarbiat Modares University, Tehran, Iran"
16
+ keywords:
17
+ - surrogate safety measures
18
+ - time to collision
19
+ - post-encroachment time
20
+ - traffic conflict
21
+ - road safety
22
+ - trajectory data
23
+ abstract: >-
24
+ Continuous surrogate safety indicators for road-user encounters: TTC, Time Advantage, T2 and Time Gap for arbitrary approach angles, computed exactly on a time-time conflict polygon.
25
+ # After the first release: archive it on Zenodo (GitHub integration) and add the DOI here:
26
+ # doi: 10.5281/zenodo.XXXXXXX
@@ -0,0 +1,11 @@
1
+ # Contributing
2
+
3
+ 1. **Set up:** `uv venv && uv pip install -e ".[dev]"`.
4
+ 2. **Checks before a pull request:** `ruff check src tests`, `mypy`, `pytest`. Run `mypy` and `pytest` in a
5
+ fresh Python 3.10 environment too: CI installs newer type stubs than a long-lived dev environment.
6
+ 3. **Never commit data** or third-party PDFs (`.gitignore` already excludes them).
7
+ 4. **Do not tune the library to match a published figure.** If a figure does not reproduce, record it
8
+ with a note in `src/pyssms/validation/data/*.yaml` and set its `expected` status honestly.
9
+ 5. Regenerate `docs/validation.md` after any change that can move an estimate.
10
+ 6. Releases: bump the version in `pyproject.toml` and `src/pyssms/__init__.py`, update `CHANGELOG.md`,
11
+ tag `vX.Y.Z` and publish a GitHub release; the `release` workflow uploads to PyPI.
pyssms-0.1.0/LICENSE ADDED
@@ -0,0 +1,29 @@
1
+ BSD 3-Clause License
2
+
3
+ Copyright (c) 2026, Seyed Saber Naseralavi
4
+ All rights reserved.
5
+
6
+ Redistribution and use in source and binary forms, with or without
7
+ modification, are permitted provided that the following conditions are met:
8
+
9
+ 1. Redistributions of source code must retain the above copyright notice, this
10
+ list of conditions and the following disclaimer.
11
+
12
+ 2. Redistributions in binary form must reproduce the above copyright notice,
13
+ this list of conditions and the following disclaimer in the documentation
14
+ and/or other materials provided with the distribution.
15
+
16
+ 3. Neither the name of the copyright holder nor the names of its
17
+ contributors may be used to endorse or promote products derived from
18
+ this software without specific prior written permission.
19
+
20
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21
+ AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
22
+ IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
23
+ DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
24
+ FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
25
+ DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
26
+ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
27
+ CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
28
+ OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
29
+ OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
pyssms-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,112 @@
1
+ Metadata-Version: 2.5
2
+ Name: pyssms
3
+ Version: 0.1.0
4
+ Summary: Continuous surrogate safety indicators for road-user encounters: TTC, Time Advantage, T2 and Time Gap for arbitrary approach angles, computed exactly on a time-time conflict polygon.
5
+ Project-URL: Homepage, https://github.com/sabernaseralavi-60/pyssms
6
+ Project-URL: Issues, https://github.com/sabernaseralavi-60/pyssms/issues
7
+ Project-URL: Changelog, https://github.com/sabernaseralavi-60/pyssms/blob/main/CHANGELOG.md
8
+ License: BSD-3-Clause
9
+ License-File: LICENSE
10
+ Keywords: NGSIM,highD,post-encroachment time,road safety,surrogate safety measures,time to collision,traffic conflict,trajectory data
11
+ Classifier: Development Status :: 3 - Alpha
12
+ Classifier: Intended Audience :: Science/Research
13
+ Classifier: License :: OSI Approved :: BSD License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Topic :: Scientific/Engineering
16
+ Requires-Python: >=3.10
17
+ Requires-Dist: numpy>=1.24
18
+ Requires-Dist: pyyaml>=6.0
19
+ Provides-Extra: dev
20
+ Requires-Dist: build; extra == 'dev'
21
+ Requires-Dist: mypy; extra == 'dev'
22
+ Requires-Dist: pytest-cov; extra == 'dev'
23
+ Requires-Dist: pytest>=8; extra == 'dev'
24
+ Requires-Dist: ruff; extra == 'dev'
25
+ Requires-Dist: twine; extra == 'dev'
26
+ Requires-Dist: types-pyyaml; extra == 'dev'
27
+ Provides-Extra: plot
28
+ Requires-Dist: matplotlib; extra == 'plot'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # pyssms
32
+
33
+ ![status](https://img.shields.io/badge/status-alpha-orange)
34
+ ![python](https://img.shields.io/badge/python-3.10%2B-blue)
35
+ ![license](https://img.shields.io/badge/license-BSD--3--Clause-green)
36
+
37
+ Continuous surrogate safety indicators for road-user encounters: Time-to-Collision (TTC), Time
38
+ Advantage (TAdv, a predicted PET), T2 and Time Gap (TG) as defined by Laureshyn, Svensson and
39
+ Hydén (2010), for any approach angle and any convex body shape, computed exactly on one
40
+ time-time conflict polygon.
41
+
42
+ > **Status.** Version 0.1.0 is the initial release of the package. It covers the four indicators of the 2010 framework for
43
+ > constant-velocity prediction of two translating convex bodies (verified against an independent implementation of the
44
+ > paper's Appendix A and a brute-force grid oracle: [docs/equivalence.md](docs/equivalence.md)), the ten car-following
45
+ > measures of the 2025 framework, trajectory readers for SSAM, SUMO, VISSIM, LevelX and NGSIM, and a bank of NGSIM
46
+ > conflict windows. All statistics produced by the tools are descriptive: the indicators are not validated against observed
47
+ > outcomes here. Install from the repository (not yet on PyPI):
48
+ > `pip install git+https://github.com/sabernaseralavi-60/pyssms`. The accompanying article is in [paper_softwarex/](paper_softwarex/).
49
+
50
+ ## What it does
51
+
52
+ ```python
53
+ import numpy as np
54
+ from pyssms import indicators_rect
55
+
56
+ # car 1 at (-20, 0) heading east at 10 m/s; car 2 at (0, -30) heading north at 10 m/s; 4.5 x 1.8 m
57
+ k = indicators_rect(-20, 0, 0, 10, 0, 4.5, 1.8, 0, -30, np.pi / 2, 0, 10, 4.5, 1.8)
58
+ k.state, k.ttc, k.tadv, k.t2, k.tg # ['B'], [nan], [0.37], [2.685], [2.685] (crossing course)
59
+ ```
60
+
61
+ All inputs may be arrays of encounters; computation is vectorised.
62
+
63
+ ## Coverage (what exists today)
64
+
65
+ | Measure | Module | Status |
66
+ |---|---|---|
67
+ | TTC, TAdv, T2, TG, state A/B/C (Laureshyn et al. 2010), any angle, any convex shape | `timetime` | verified against Appendix A (1e6 encounters) |
68
+ | Injury risk curves for pedestrians, cyclists, motorcyclists, car drivers (Lubbe et al. 2022) | `severity` | safe speeds of the paper reproduced within coefficient rounding |
69
+ | Disturbance set D, signed margin beta, Time Advantage and lateral margin as its axis readings | `disturbance` | consistent with `timetime` and `margins`; brute-force membership check; scales are inputs |
70
+ | Smallest braking that avoids a contact (shape-aware DRAC relative) | `escape` | braking curve vs conflict polygon and vs `stories`; analytic stopping case |
71
+ | Delta-V, Extended Delta-V (Laureshyn et al. 2017) | `severity` | 18 of 20 printed Table 1 rows reproduced; 2 documented gaps |
72
+ | TTC1, TTC2, TTC3, TTCD, DRAC, MDRAC, DCIA, PSD, MPSD, SDI (Naseralavi et al. 2025), car following | `ssm1d` | tested against simulations of their stories; printed-form differences in `docs/ssm1d_notes.md` |
73
+ | Motion stories (constant speed, acceleration, jerk) and first contact on straight paths | `stories` | equals `timetime` for constant speed; brute-force check for braking |
74
+ | Time margin (TAdv) and lateral margin | `timetime`, `margins` | lateral margin checked against the independent polygon code |
75
+ | Trajectory readers: SSAM `.trj` (read and write), LevelX (inD, rounD, exiD, uniD, highD), SUMO FCD, VISSIM `.fzp`, generic table | `io` | round trips on synthetic files; the LevelX readers were run on real recordings of the five LevelX data sets ([docs/io_and_scenarios.md](docs/io_and_scenarios.md)) |
76
+ | Encounter series, observed PET, TET/TIT, braking onset and (TA, v_conf), scale calibration, severity hierarchy, scenario summary and comparison, synthetic scenarios | `process`, `calibration`, `hierarchy`, `scenario`, `datasets` | unit tests on constructed cases; definitions stated in the docstrings; hierarchy and prediction-error scales computed on all recordings of inD, rounD, uniD, exiD and highD (`docs/diamond_*.md`, descriptive, nothing validated); Hyden's (1987) severity zones are approximate (see the docstrings) |
77
+ | Which face and corner touch first on a collision course, and which would touch if the road user ahead were delayed by TAdv (crossing course) | `contact` | time-stepped search; the ten corner-side configurations of Jimenez et al. (2013) come out as classes |
78
+ | NGSIM reader (US-101, I-80, Lankershim, Peachtree; feet to metres, front centre to body centre) | `io.read_ngsim` | run on all ten periods; units checked against the data set's own columns ([docs/ngsim_notes.md](docs/ngsim_notes.md)) |
79
+ | Causal or centred smoothing of trajectories | `preprocessing` | unit tests (causality, noise reduction, lag); not tuned to a data set |
80
+ | Conflict windows: `extract_conflicts`, and a bank of windows around the most severe encounters of NGSIM that ships with the package (`datasets.load_conflict_bank("ngsim")`), plus counts and scales of the five LevelX data sets (`datasets.load_summary()`) | `bank`, `datasets` | the windows are chosen by the package's own indicators: examples and test material, **not a sample** |
81
+ | Plots of the polygon K, the disturbance set D with the signed margin, the indicator profile of an encounter, the hierarchy (needs matplotlib) | `viz` | smoke tests |
82
+ | Statistically scaled margin (beta), collision physics beyond point masses, 2-D versions of the ten car-following measures, native Aimsun input | - | **not implemented** |
83
+
84
+ ## The idea in one paragraph
85
+
86
+ Give each road user its own predicted arrival time at the conflict. The pairs of arrival times at which the two bodies overlap
87
+ form a convex polygon `K` (an affine preimage of the Minkowski difference of the bodies).
88
+ Undisturbed motion is the diagonal. TTC is where the diagonal enters `K`; TAdv is the distance
89
+ of `K` from the diagonal (the delay that would produce a collision); T2 and TG are the earliest
90
+ second arrivals. The 32 corner-side combinations of the 2010 appendix become one polygon, and
91
+ parallel paths, standing road users and overlapping bodies need no special cases. See
92
+ [docs/methods.md](docs/methods.md).
93
+
94
+ ## Development
95
+
96
+ ```
97
+ uv venv && uv pip install -e ".[dev]"
98
+ pytest
99
+ python tools/equivalence.py --n 1000000 # writes docs/equivalence.md
100
+ python tools/benchmark.py # writes docs/benchmark.md
101
+ ```
102
+
103
+ ## Citation
104
+
105
+ See [CITATION.cff](CITATION.cff). License of the code: BSD-3-Clause.
106
+
107
+ **Data shipped inside the package** (`src/pyssms/data/`): the windows in `conflict_bank_ngsim.npz` come
108
+ from the FHWA NGSIM trajectories, licensed by the Federal Highway Administration under a modified
109
+ Creative Commons Attribution 2.0 licence (not public domain). Credit FHWA and the Next Generation
110
+ Simulation (NGSIM) program; any reuse of those data is subject to that licence
111
+ (`NGSIM_LICENSE.txt`, `NGSIM_CC-BY-2.0_legalcode.html`); the data are provided as is. Nothing from the
112
+ LevelX data sets (inD, rounD, uniD, exiD, highD) is shipped except aggregated counts and scales.
pyssms-0.1.0/README.md ADDED
@@ -0,0 +1,82 @@
1
+ # pyssms
2
+
3
+ ![status](https://img.shields.io/badge/status-alpha-orange)
4
+ ![python](https://img.shields.io/badge/python-3.10%2B-blue)
5
+ ![license](https://img.shields.io/badge/license-BSD--3--Clause-green)
6
+
7
+ Continuous surrogate safety indicators for road-user encounters: Time-to-Collision (TTC), Time
8
+ Advantage (TAdv, a predicted PET), T2 and Time Gap (TG) as defined by Laureshyn, Svensson and
9
+ Hydén (2010), for any approach angle and any convex body shape, computed exactly on one
10
+ time-time conflict polygon.
11
+
12
+ > **Status.** Version 0.1.0 is the initial release of the package. It covers the four indicators of the 2010 framework for
13
+ > constant-velocity prediction of two translating convex bodies (verified against an independent implementation of the
14
+ > paper's Appendix A and a brute-force grid oracle: [docs/equivalence.md](docs/equivalence.md)), the ten car-following
15
+ > measures of the 2025 framework, trajectory readers for SSAM, SUMO, VISSIM, LevelX and NGSIM, and a bank of NGSIM
16
+ > conflict windows. All statistics produced by the tools are descriptive: the indicators are not validated against observed
17
+ > outcomes here. Install from the repository (not yet on PyPI):
18
+ > `pip install git+https://github.com/sabernaseralavi-60/pyssms`. The accompanying article is in [paper_softwarex/](paper_softwarex/).
19
+
20
+ ## What it does
21
+
22
+ ```python
23
+ import numpy as np
24
+ from pyssms import indicators_rect
25
+
26
+ # car 1 at (-20, 0) heading east at 10 m/s; car 2 at (0, -30) heading north at 10 m/s; 4.5 x 1.8 m
27
+ k = indicators_rect(-20, 0, 0, 10, 0, 4.5, 1.8, 0, -30, np.pi / 2, 0, 10, 4.5, 1.8)
28
+ k.state, k.ttc, k.tadv, k.t2, k.tg # ['B'], [nan], [0.37], [2.685], [2.685] (crossing course)
29
+ ```
30
+
31
+ All inputs may be arrays of encounters; computation is vectorised.
32
+
33
+ ## Coverage (what exists today)
34
+
35
+ | Measure | Module | Status |
36
+ |---|---|---|
37
+ | TTC, TAdv, T2, TG, state A/B/C (Laureshyn et al. 2010), any angle, any convex shape | `timetime` | verified against Appendix A (1e6 encounters) |
38
+ | Injury risk curves for pedestrians, cyclists, motorcyclists, car drivers (Lubbe et al. 2022) | `severity` | safe speeds of the paper reproduced within coefficient rounding |
39
+ | Disturbance set D, signed margin beta, Time Advantage and lateral margin as its axis readings | `disturbance` | consistent with `timetime` and `margins`; brute-force membership check; scales are inputs |
40
+ | Smallest braking that avoids a contact (shape-aware DRAC relative) | `escape` | braking curve vs conflict polygon and vs `stories`; analytic stopping case |
41
+ | Delta-V, Extended Delta-V (Laureshyn et al. 2017) | `severity` | 18 of 20 printed Table 1 rows reproduced; 2 documented gaps |
42
+ | TTC1, TTC2, TTC3, TTCD, DRAC, MDRAC, DCIA, PSD, MPSD, SDI (Naseralavi et al. 2025), car following | `ssm1d` | tested against simulations of their stories; printed-form differences in `docs/ssm1d_notes.md` |
43
+ | Motion stories (constant speed, acceleration, jerk) and first contact on straight paths | `stories` | equals `timetime` for constant speed; brute-force check for braking |
44
+ | Time margin (TAdv) and lateral margin | `timetime`, `margins` | lateral margin checked against the independent polygon code |
45
+ | Trajectory readers: SSAM `.trj` (read and write), LevelX (inD, rounD, exiD, uniD, highD), SUMO FCD, VISSIM `.fzp`, generic table | `io` | round trips on synthetic files; the LevelX readers were run on real recordings of the five LevelX data sets ([docs/io_and_scenarios.md](docs/io_and_scenarios.md)) |
46
+ | Encounter series, observed PET, TET/TIT, braking onset and (TA, v_conf), scale calibration, severity hierarchy, scenario summary and comparison, synthetic scenarios | `process`, `calibration`, `hierarchy`, `scenario`, `datasets` | unit tests on constructed cases; definitions stated in the docstrings; hierarchy and prediction-error scales computed on all recordings of inD, rounD, uniD, exiD and highD (`docs/diamond_*.md`, descriptive, nothing validated); Hyden's (1987) severity zones are approximate (see the docstrings) |
47
+ | Which face and corner touch first on a collision course, and which would touch if the road user ahead were delayed by TAdv (crossing course) | `contact` | time-stepped search; the ten corner-side configurations of Jimenez et al. (2013) come out as classes |
48
+ | NGSIM reader (US-101, I-80, Lankershim, Peachtree; feet to metres, front centre to body centre) | `io.read_ngsim` | run on all ten periods; units checked against the data set's own columns ([docs/ngsim_notes.md](docs/ngsim_notes.md)) |
49
+ | Causal or centred smoothing of trajectories | `preprocessing` | unit tests (causality, noise reduction, lag); not tuned to a data set |
50
+ | Conflict windows: `extract_conflicts`, and a bank of windows around the most severe encounters of NGSIM that ships with the package (`datasets.load_conflict_bank("ngsim")`), plus counts and scales of the five LevelX data sets (`datasets.load_summary()`) | `bank`, `datasets` | the windows are chosen by the package's own indicators: examples and test material, **not a sample** |
51
+ | Plots of the polygon K, the disturbance set D with the signed margin, the indicator profile of an encounter, the hierarchy (needs matplotlib) | `viz` | smoke tests |
52
+ | Statistically scaled margin (beta), collision physics beyond point masses, 2-D versions of the ten car-following measures, native Aimsun input | - | **not implemented** |
53
+
54
+ ## The idea in one paragraph
55
+
56
+ Give each road user its own predicted arrival time at the conflict. The pairs of arrival times at which the two bodies overlap
57
+ form a convex polygon `K` (an affine preimage of the Minkowski difference of the bodies).
58
+ Undisturbed motion is the diagonal. TTC is where the diagonal enters `K`; TAdv is the distance
59
+ of `K` from the diagonal (the delay that would produce a collision); T2 and TG are the earliest
60
+ second arrivals. The 32 corner-side combinations of the 2010 appendix become one polygon, and
61
+ parallel paths, standing road users and overlapping bodies need no special cases. See
62
+ [docs/methods.md](docs/methods.md).
63
+
64
+ ## Development
65
+
66
+ ```
67
+ uv venv && uv pip install -e ".[dev]"
68
+ pytest
69
+ python tools/equivalence.py --n 1000000 # writes docs/equivalence.md
70
+ python tools/benchmark.py # writes docs/benchmark.md
71
+ ```
72
+
73
+ ## Citation
74
+
75
+ See [CITATION.cff](CITATION.cff). License of the code: BSD-3-Clause.
76
+
77
+ **Data shipped inside the package** (`src/pyssms/data/`): the windows in `conflict_bank_ngsim.npz` come
78
+ from the FHWA NGSIM trajectories, licensed by the Federal Highway Administration under a modified
79
+ Creative Commons Attribution 2.0 licence (not public domain). Credit FHWA and the Next Generation
80
+ Simulation (NGSIM) program; any reuse of those data is subject to that licence
81
+ (`NGSIM_LICENSE.txt`, `NGSIM_CC-BY-2.0_legalcode.html`); the data are provided as is. Nothing from the
82
+ LevelX data sets (inD, rounD, uniD, exiD, highD) is shipped except aggregated counts and scales.
@@ -0,0 +1,23 @@
1
+ # Benchmark
2
+
3
+ *Generated by `tools/benchmark.py`; do not edit by hand.* pyssms 0.1.0, Python 3.13.5, NumPy 2.5.4, Intel64 Family 6 Model 151 Stepping 5, GenuineIntel; single process, best of 3 (best-of-3 also at 10^6; absolute times vary by up to a factor of two between runs).
4
+
5
+ All four indicators (TTC, TAdv, T2, TG) per encounter.
6
+
7
+ | encounters | time-time polygon (s) | 32 combinations, vectorised (s) | polygon us/encounter |
8
+ |---|---|---|---|
9
+ | 10,000 | 0.05 | 0.03 | 5.4 |
10
+ | 100,000 | 0.56 | 0.40 | 5.6 |
11
+ | 1,000,000 | 4.34 | 4.13 | 4.3 |
12
+
13
+ The polygon column uses the 8-row form of K that applies when both rectangles move along their length (side faces parallel to the axes of the time-time plane; all encounters of this benchmark). The general 12-row form, which any convex shape and any velocity direction uses, takes:
14
+
15
+ | encounters | general 12-row form (s) | 8-row form (s) | ratio |
16
+ |---|---|---|---|
17
+ | 10,000 | 0.10 | 0.05 | 1.93 |
18
+ | 100,000 | 0.94 | 0.56 | 1.67 |
19
+ | 1,000,000 | 9.48 | 4.34 | 2.18 |
20
+
21
+ A per-encounter Python loop over the 32 combinations takes 5449 us per encounter.
22
+
23
+ Both columns use the block size that was fastest for them (polygon: the default, 500 encounters; reference: all at once, 20,000, 5,000 or 2,000). At 10^6 encounters the polygon takes 1.05 times the time of the vectorised combinations. Its value is exactness in the cases the appendix does not cover (parallel paths, standing road users, overlapping bodies) and one code path for any convex shape.
@@ -0,0 +1,48 @@
1
+ # Margin beta: what is decided and what is not (2026-11-01)
2
+
3
+ Status: **not implemented.** The 2010 paper only says that a near miss "has less of a safety margin
4
+ to endure an additional unlucky factor" (Section 2). Turning that sentence into a number needs a
5
+ disturbance model, which is a scientific decision. Facts that constrain it, read from the papers:
6
+
7
+ * The 2017 paper (Section 5.2) lists what a disturbance model must not ignore: braking force
8
+ depends on friction and vehicle; cyclists swerve and pedestrians can jump back; four masses only;
9
+ the collision is a completely inelastic point-mass collision.
10
+ * Prior art on disturbance-based margins exists (Astarita & Giofre 2019; Kuang et al. 2015; Xie et
11
+ al. 2019 for TTCD in the 2025 paper), so novelty must come from the formulation, not the idea.
12
+
13
+ Candidate definitions, from simplest to richest (none validated):
14
+
15
+ 1. **Time margin** = TAdv (already implemented): the smallest delay of one road user that creates a
16
+ collision course. No new parameter.
17
+ 2. **Lateral margin** (needed for state C): the smallest sideways shift of one path that makes the
18
+ bodies overlap at the same time; exact on the overlap polygon R for straight paths.
19
+ 3. **Combined margin**: smallest norm of (delay, lateral shift) after scaling each by a standard
20
+ deviation estimated from undisturbed passages at the same site (a Hasofer-Lind style distance).
21
+ Scales are data, not constants; the choice of norm and of the scales is the open decision.
22
+
23
+ ## Update 2026-11-01: option 3 as a geometric object (implemented, scales still open)
24
+
25
+ `pyssms.disturbance` computes the disturbance set D in the plane of the clock shift delta (s) and a
26
+ sideways shift eps (m) of one path: the pairs for which the disturbed straight-line encounter
27
+ overlaps within the horizon. D is a convex polygon (projection of a convex polytope; exact
28
+ Fourier-Motzkin elimination). Then:
29
+
30
+ * the undisturbed encounter is the origin; it lies in D exactly on a collision course (state A);
31
+ * Time Advantage (option 1) and the lateral margin (option 2) are the shortest distances to D along
32
+ the two axes (checked against `pyssms.timetime` and `pyssms.margins`);
33
+ * the signed distance `beta` from the origin to D in the scaled coordinates
34
+ `(delta/sigma_delta, eps/sigma_eps)` is continuous through A, B and C; `Phi(-beta)` is the
35
+ Hasofer-Lind approximation of a collision-course probability (exact for a half-plane D).
36
+
37
+ What this does not settle: (a) `sigma_delta` and `sigma_eps` (data, not constants; the error of a
38
+ constant-velocity prediction grows with the horizon), (b) whether a shift of the clock is the right
39
+ disturbance for a braking road user (braking is not a time shift), (c) at a perpendicular crossing
40
+ the lateral margin of the second road user equals `|v1| * TAdv`, so it adds no information there;
41
+ it matters for diverging or parallel paths, (d) when a passage is over (D empty) `beta` is
42
+ undefined. Prior art for the idea of a margin: Hyden (1987) hypothesises a safety margin used by
43
+ road users when judging whether they are on a collision course (as cited in the 2010 thesis,
44
+ Section 4.1); Svensson (1998) discusses enlarging the road users' footprints so that near misses register as collision courses (read in her thesis, Section 4 and the closing chapter: discussed, not applied)
45
+ (same source; neither read in the original); Astarita & Giofre (2019) and Kuang et al. (2015) are in
46
+ `literature_step0.md`. The contribution to claim is the formulation and its checks, not the idea.
47
+
48
+ Question for the 2010 paper's authors: which of these matches the intuition in Section 2?
@@ -0,0 +1,11 @@
1
+ # Pitfalls found while building pyssms
2
+
3
+ * Implementing Appendix A of Laureshyn et al. (2010) from the journal's "article in press" PDF
4
+ gives a wrong sign: Eqs. (8) and (9) lack the leading minus sign there and return minus the
5
+ crossing time. The author's 2010 thesis (Appendix, printed p. 138) prints the minus sign, so the
6
+ equations themselves are correct. Eq. (10) has `x2`, `y2` where `x_ln2`, `y_ln2` are meant (thesis
7
+ and preprint alike), and a literal implementation needs a tolerance for sides parallel to an axis.
8
+ Evidence and counts: [equivalence.md](equivalence.md); derivation: [methods.md](methods.md).
9
+ * The appendix does not cover parallel paths, standing road users or bodies that already overlap.
10
+ * Any comparison of two implementations must use the same prediction horizon (an oracle with a
11
+ shorter horizon produced a false 2.6 s disagreement during development).
@@ -0,0 +1,35 @@
1
+ # Data sources (not redistributed)
2
+
3
+ | Dataset | Source | Retrieved | Notes |
4
+ |---|---|---|---|
5
+ | DUT vehicle-crowd interaction (filtered trajectories and ratios) | https://github.com/dongfang-steven-yang/vci-dataset-dut, commit `80b8c746833664cd1e5244fccad79c7f2a7cbe31` | 2026-11-01 | Stored in `data_raw/dut/` (git-ignored). **The repository declares no licence**: do not redistribute; ask the authors before publishing derived figures. Cite Yang et al., arXiv:1902.00487 (not yet read in full; verify the reference before citing). Per-file SHA-256 list: `data_raw/SHA256SUMS_dut.txt` (84 files; SHA-256 of that list begins `c1f53915d9b77d6b`). Columns of vehicle files: `id, frame, label, x_est, y_est, psi_est, vel_est`; pedestrians: `id, frame, label, x_est, y_est, vx_est, vy_est`. |
6
+ | SinD sample record Tianjin 8_2_1 (Tsinghua University) | https://github.com/SOTIF-AVLab/SinD, `Data/Tianjin/8_2_1/` (Git LFS objects fetched from media.githubusercontent.com) | 2026-11-02 | Stored in `data_raw/sind_tianjin/` (git-ignored; SHA-256 list `data_raw/SHA256SUMS_sind_tianjin.txt`, `Veh_smoothed_tracks.csv` begins `c377452a22ad0d57`). **Licence is not clear:** the repository `LICENSE` file is the CC0 text, but the README badge and text state a non-commercial *dataset* licence and give full access by request to an educational e-mail address. Treated as non-commercial research use, not redistributed, aggregates only; ask the authors before publishing any derived figure. Cars and bicycles have measured `length`/`width`; pedestrians have none. Cite Xu et al. (2022), IEEE ITSC (not yet read; verify before citing). |
7
+ | FLUID (Figshare, doi 10.6084/m9.figshare.29974954; Scientific Data, doi 10.1038/s41597-026-07110-9) | placed by the user in `data_raw/FLUID/` (browser download), 2026-11-02 | 2026-11-02 | Licence CC BY 4.0 (read from the Figshare record). Files and SHA-256 prefixes: `Conflict.zip` a654792d6756c209, `FI-derived_data.zip` 271be0412b6ad56d, `FIDRT-derived_data.zip` b59703fdec881c28, `TI-derived_data.zip` e73ed4a0f2f400d4, `README.md` 4c8eed3aaea9f14f, article PDF 682d4748fcbd0bcc. **The conflict lists are not human labels:** the paper defines a conflict by thresholds on the authors' own TTC (0 to 2 s) and DGT (0 to 4 s) for pairs of motor vehicles; using them as an outcome for TTC-type indicators would be circular. Analysed from 2026-11-02 with `tools/fluid_pilot.py` (scene TI videos 1-3 exploratory; scenes FI and FIDRT as a pre-declared confirmation, `docs/prereg_fluid_confirmation.md`); the conflict lists are not used. |
8
+ | NGSIM (FHWA Next Generation Simulation): US-101, I-80, Lankershim Boulevard, Peachtree Street | placed by the user at `D:\ReproducibleResearch_R_Projects\NGSIM\10-02-2026\data_raw\NGSIM DATA` (four archives); unpacked 2026-11-07 into `data_raw/ngsim/` | 2026-11-07 | **Licence read from `ngsim-license.htm` of the archives: modified Creative Commons Attribution 2.0, Licensor FHWA; credit FHWA and NGSIM, and any reuse must state it is subject to the licence. Not public domain, not CC0.** Redistribution of derived windows is allowed under those conditions (shipped in `src/pyssms/data/` with the licence text). SHA-256 prefixes of the archives and of the ten trajectory files: `data_raw/SHA256SUMS_ngsim_prefix.txt` (archives: I 80.rar 48f113fc6795984f, Lankershim d615aae87efe0b84, Peachtree d25a34bc64761318, US-101 480b460615482e0d). Used: hierarchy and scales (`docs/diamond_NGSIM.md`), ten measures on the freeway files, conflict bank. Details: `docs/ngsim_notes.md`. |
9
+ | DLR Urban Traffic dataset v1.3.1 (Zenodo) | placed by the user in `data_raw/dlr_ut/`, 2026-11-02 | 2026-11-02 | Licence CC BY-NC-SA 4.0 (from the dataset README). `DLR-Urban-Traffic-dataset_v1-3-1.zip` f13b10fdba5675ca (463 MB), documentation PDF 94fd9ebd32d04a9c. One day at the AIM Research Intersection in Braunschweig. Not analysed yet. The dataset paper (Schicktanz et al., IEEE IV 2025; placed by the user in `data_raw/dlr_ut/`, SHA-256 prefix 56cdefef7609ee54) gives 10 Hz trajectories of 32,296 road users of one day. |
10
+ | Svensson (1998) thesis | placed by the user in `lit/Svensson1998.pdf`, 2026-11-02 | 2026-11-02 | SHA-256 prefix c0d9dce7149e943c; 176 pages; read only in the passages on footprint enlargement and safety margins. |
11
+ | highD copy in a third-party GitHub repository (`HighD_Preprocessing`) | not downloaded | 2026-11-02 | highD is distributed on request; a third-party copy has no declared licence, so it was not fetched. Use the official request. |
12
+ | LevelX family: inD, highD, rounD, exiD, uniD (RWTH Aachen / fka) | requests reported approved by the user on 2026-11-03 (relayed in chat; the approval e-mails were not seen by me) | not downloaded | **Files not yet in `data_raw/` on 2026-11-03.** Licence terms are those of the approval e-mails (scientific, non-commercial use as relayed); do not redistribute, do not commit, no derived figure without checking the terms. Cite inD as Bock, Krajewski, Moers, Runde, Vater and Eckstein (2020), 2020 IEEE Intelligent Vehicles Symposium, pp. 1929-1934, doi:10.1109/IV47402.2020.9304839 (checked with Crossref 2026-11-03; the other data sets have their own preferred references on the providers' websites, not yet recorded here). Present on 2026-11-03: `data_raw/inD-dataset-v1.1` (33 recordings), `round-dataset-v1.1` (24), `uniD-dataset-v1.1` (13), `exiD-dataset-v2.1` (93), `highD-dataset-v1.0` (60 recordings, 4.5 GB). |
13
+
14
+ Papers fetched on 2026-11-01 into `lit/` (outside the repository; open access, normal download, no
15
+ paywall bypassed). SHA-256 in parentheses:
16
+
17
+ | File | Source | SHA-256 |
18
+ |---|---|---|
19
+ | `Lubbe2022_safe_speeds.pdf` | https://doi.org/10.55329/vfma7555 (Traffic Safety Research 2, 000006, CC-BY) via https://tsr.international/TSR/article/download/23823/21217 | `32318eaf90f9d5b2` |
20
+ | `Johnsson_Laureshyn2022_evasive.pdf` | https://doi.org/10.55329/erqd8683 (Traffic Safety Research 3, 000012) via https://tsr.international/TSR/article/download/23755/21648 | `f1681103dc3206c0` |
21
+ | `Tefft2011_PedestrianRiskVsSpeed.pdf` | https://aaafoundation.org/wp-content/uploads/2026/02/2011PedestrianRiskVsSpeedReport.pdf | `3deef7f75204089b` |
22
+ | `Hyden1987_thesis.pdf` | https://www.ictct.net/wp-content/uploads/SMoS_Library/LIB_Hyden_1987.pdf (link published in the SMoS library cited by Johnsson and Laureshyn 2022) | `78cd77939702c27e` |
23
+ | `Aliaksei_Laureshyn.pdf` | Lund University portal copy of the 2010 thesis (supplied by the user; download date printed in the file: 2026-11-01) | not computed |
24
+ | `Zanardi2023_arXiv2308.01050.pdf` | https://arxiv.org/pdf/2308.01050 (arXiv preprint; downloaded 2026-11-02; methods read) | `d73feeae0a6409b0` |
25
+ | `2013_An Improved Method to Calculate the Time-to-Collision of Two Vehicles.pdf` | placed by the user in `lit/` on 2026-11-03 (paywalled at the publisher; not downloaded by me). Jimenez, Naranjo, Garcia, Int. J. Intell. Transp. Syst. Res. 11(1):34-42, doi:10.1007/s13177-012-0054-4 (Crossref: online 2012-11-28, volume 11 issue 1 pages 34-42). Read: sections 2 to 5 (pages 2 to 7) | `9fdf8a616ed7dfcf` |
26
+ | `SSAM_File_Format_v1.04.pdf` | https://raw.githubusercontent.com/OSADP/SSAM/master/Documentation/SSAM%20File%20Format%20v1.04.pdf (downloaded 2026-11-03) | `11e62f3b7e9d5b9a` |
27
+ | `SSAM_File_Format_v3.0.pdf` | https://raw.githubusercontent.com/OSADP/SSAM/master/Documentation/Open%20Source%20SSAM%20File%20Format%20v3.0.pdf (downloaded 2026-11-03) | `15c5068489101deb` |
28
+ | `ika_drone_dataset_tools_tracks_import.py` | https://raw.githubusercontent.com/ika-rwth-aachen/drone-dataset-tools/master/src/tracks_import.py (downloaded 2026-11-03; reference loader of the LevelX data provider, read for column names) | `317c2fb8b74d40a7` |
29
+ | `sumo_sumolib_convert_trj.py` | https://raw.githubusercontent.com/eclipse-sumo/sumo/main/tools/sumolib/output/convert/trj.py (downloaded 2026-11-03; SUMO's `.trj` writer, EPL-2.0 or GPL-2.0+, read for the byte layout) | `f17c59157ac6e95d` |
30
+ | `Cheng2026_arXiv2604.17841.pdf` | https://arxiv.org/pdf/2604.17841 (arXiv preprint; downloaded 2026-11-02; methods read) | `2531e0dfff77b65d` |
31
+
32
+ Svensson (1998), https://portal.research.lu.se/files/4456913/1653512.pdf, returned a
33
+ Cloudflare challenge page (HTTP 403) and was not fetched; it needs to be placed in `lit/` by hand.
34
+ Hyden (1987) was fetched but not yet read. Papers in `lit/` are git-ignored. Open-access copy of Laureshyn et al. (2017, Extended Delta-V) could
35
+ not be fetched (publisher 403, university server down for maintenance); place it in `lit/` by hand.