This flowchart describes how the main bricks will be communicating.
---
title: OSRD - NGE Workflow for synchronous workspaces
---
flowchart TD
OSRD[("OSRD")] -- create / update on change --> timetable["Timetable"]
timetable -- create / modify / delete train schedules &\n (re)calculate pathfindings and running times --> timetable
timetable -- on change --> synchronization_timetable{"Synchro \nenabled?"}
synchronization_timetable -- yes, save modifications ----> OSRD
OSRD -- send infra & timetable for convertion --> converter["Converter / Event handler (osrd-front)"]
converter -- send NGE light model \n(window.postMessage) --> NGE["osrd-nge component"]
NGE -- create / modify / delete trainruns --> NGE
NGE -- on change --> synchronization_nge{"Synchro \nenabled?"}
synchronization_nge -- yes, save modifications \n(window.postMessage) --> converter
converter -- requests to update timetable --> OSRD
As shown in the following sequence diagram, services have to develop new communcations.
---
title: OSRD - NGE Sequence diagram
---
sequenceDiagram
autonumber
OSRD (osrd_window)-->>OSRD (osrd_window): init web page
OSRD (osrd_window)->>NGE (nge_iframe): set `netzgrafikDto` DOM property
loop while synchronization is ON
alt any modification in OSRD (osrd_window)
OSRD (osrd_window)-->>OSRD (osrd_window): any modification
OSRD (osrd_window)->>NGE (nge_iframe): set `netzgrafikDto` DOM property
else any modification in NGE (nge_iframe)
NGE (nge_iframe)-->>NGE (nge_iframe): any modification <br>(hooks)
NGE (nge_iframe)->>OSRD (osrd_window): send `operationX` event (@Output)
OSRD (osrd_window)-->>OSRD (osrd_window): convert NGE operation into <br/>timetable update
OSRD (osrd_window)->>NGE (nge_iframe): set `netzgrafikDto` DOM property
end
end
[x] NGE is customizable according to OSRD needs (can run without back-end)
[x] Only NGE workspace is displayed (not the project management and authentication menus)
[x] osrd-nge is available as npm package
[x] A test iframe proves the communication between osrd-nge and NGE
7537
[x] osrd-nge runs in operational studies panel
[x] Microscopic / Macroscopic switch works
[x] NGE is displayed in operational studies panel when Macroscopic switch is ticked
[x] Microscopic switch switches back to simulation view
7538
[x] The infrastructure (stations/nodes) involved in a scenario is displayed in NGE
[x] All the train schedules of a timetable of a scenario can be displayed in NGE
[ ] Running times are the same as OSRD calculations
[ ] Only valid trains are displayed in NGE
7539
[x] A timetable change implies an update of the NGE model
[x] An action on trainruns* in NGE implies an update of the timetable
[ ] Create trainrun
[ ] Create valid trainrun with valid path => train schedule creation (simulation not working, rolling stock must be entered in OSRD first) => once the rollingstock is given and simulation done => trainrun updated (running times, same path)
[ ] Create valid trainrun with incomplete path (should pass by intermediary stations) => train schedule creation (simulation not working, rolling stock must be entered in OSRD first) => once the rollingstock is given and simulation done => trainrun updated (running times, updated path)
[ ] Create invalid trainrun => train schedule creation (simulation not working, rolling stock must be entered in OSRD first) => once the rollingstock is given and simulation failed => trainrun deleted / updated (TBD)
[ ] Update trainrun
[ ] Update trainrun path (shorten and lengthen steps or only start, intermediary or end step) => train schedule updated and simulation done => trainrun updated (updated running times, updated path)
[x] (Angular) Enable / disable NGE UI elements (authentication and project management components) to keep only workspace (netzgrafik) and filters (see Angular ngIf) (set environment.disableBackend)
Description
Concept diagram:
This flowchart describes how the main bricks will be communicating.
As shown in the following sequence diagram, services have to develop new communcations.
Contacts: @louisgreiner (SNCF Réseau) - @aiAdrian (SBB CFF FFS)
Acceptance criteria
7536
osrd-nge
is available as npm packageiframe
proves the communication betweenosrd-nge
and NGE7537
osrd-nge
runs in operational studies panel7538
7539
*a
trainrun
in NGE is the equivalent of atrain schedule
in OSRD (even tho it is not semantically 100% correct)Implementation plan
osrd-nge
: a wrapper (Angular app) that embed a build of NGE with specific settings for OSRD use (standalone mode) (see POC)osrd-nge
in npmosrd-nge
from npm and make the NGE build available within OSRD buildversion-control.service.ts
)environment.customElement
)netzgrafik
) and filters (see Angular ngIf) (setenvironment.disableBackend
)osrd-nge
:Microscopic / Macroscopic
switchnetzgrafikDto
DOM root propertycreate_nge_model_infra
method from PoC)create_nge_model_with_trains
method from PoC, taking in account TSv2)@Input
for this message in NGEloadNetzgrafikDto
eventListener
for the NGEoperationX
eventsDefinition of ready
UX
PO
Technical
General