LZB 80: Bremsweg-Simulation mit zugspezifischer Verzögerung - #21
Merged
Conversation
- Refactor LZB centre: movement authority now built from line data and interlocking state rather than telegram payload. Block division falls out of BlockMarker devices. - Add train-specific deceleration to LzbTelegram: derives from brake percentage (BRH), brake apply time (BRA), and speed-dependent falloff above 150 km/h. - Split line conductor payload: LzbSection (cable properties) separate from LzbTelegram (movement authority). Centre regenerates authority each step, so signals stopping ahead shorten it at once. - Introduce BlockMarkerPayload for block boundaries. Block mode (Full/Partial) is no longer a setting—determined by presence of BlockMarker devices in the line. - Move lookahead from ai-driver to sim-core; add block boundary scanning for LZB centre use. - Add lzb_centre integration test: authority ends at occupied blocks, respects block markers, handles signal stops, and tracks train running through the area. - Update Musterbahn demo: add block markers to sections 1 and 2, extend line conductor over edge 1 (full block mode), document the mechanism in MODS.md and README.
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.
Summary
authority()-Funktion baut Bewegungsbefugnisse aus Leitungstopologie und Stellwerksstate auf – läuft zu Grenzen, die nicht frei sind (besetzte Blockabschnitte oder Signals im Halt)Testing
cargo test -p sim-core– Bremsweg-Mathematik mit BRH-Variantencargo test -p content::lzb_centre– LZB-Zentrum mit 6 Szenarien:cargo run -p app -- --line example:beispielstrecke– Musterbahn lädt mit neuer Topologie (4 km LZB-Bereich, Blockmarker)cargo test --workspace– Alle 240 Tests grün, Clippy OK