Repository navigation
Add an architecture document - #13
Merged
Merged
Conversation
The layout the app called T-Junction is now T-Intersection. The README, docs/insights.md and a comment in the renderer follow suit, and the paragraphs that grew are rewrapped. The comment in .gitattributes now says "Normalize". Signed-off-by: Jim Schreckengast <schreck@gmail.com>
Scripted runs can now set TS_OVERLAYS (the overlays to show), TS_SELECT (a vehicle to select), TS_BENCH (start the controller or sensor benchmark) and TS_SCROLL_LEFT (the left panel's scroll offset). With TS_SHOT set, the clock now stops at TS_SHOT_AFTER and the capture waits 600 ms for the panels to refresh, so every capture of the same run shows the same moment. None of this has any effect unless the variables are set. Signed-off-by: Jim Schreckengast <schreck@gmail.com>
docs/architecture.md explains how Intersection Lab 0.5.1 fits together. It covers the layers, the boundary between ground truth and what controllers see, what each source file does and the order of one simulation step. It then describes the controllers and the learning code, gives an illustrated tour of the app and covers the build, CI and release pipeline. Section 13 lists where to change the code to add a controller, a layout or a sensor, and Appendix A says how each screenshot was made. It has 21 Mermaid diagrams, 40 screenshots and three figures, which are in docs/images/architecture/. The README and CONTRIBUTING.md link to it. Signed-off-by: Jim Schreckengast <schreck@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
docs/architecture.md describes how Intersection Lab 0.5.1 is put together:
src/sim/: the engine, the road network for every layout, signals, sensors, demand, vehicle classes, statistics, determinism, corridors and the cooperative crossing.It has 21 Mermaid diagrams, which share one color legend, and 40 screenshots and three figures in docs/images/architecture/. The README and CONTRIBUTING.md link to it.
Also in this change:
TS_OVERLAYS,TS_SELECT,TS_BENCHandTS_SCROLL_LEFT, which the screenshots needed. A scripted screenshot now stops the clock atTS_SHOT_AFTERand waits 600 ms for the panels to catch up, so every capture of a run shows the same moment. None of this does anything unless the variables are set.Checking the document against the code turned up a few bugs in 0.5.1, which will be fixed in separate pull requests. The document describes 0.5.1 as it is, so §8.7 records one of them: the Hybrid's Save weights writes a file that doesn't load.
Why
Contributors need a map of the code before they change it, and the README only describes the modules briefly. This also covers the documentation_architecture criterion of the OpenSSF Best Practices silver badge.
Testing
cargo clippy --locked --release --all-targets -- -D warnings, its wasm32 counterpart andcargo test --locked --releasepass.