Context: When loading a RJS in core, default electrification (so not-electrified) is empty string ""
This is not especially clear and might be ambiguous if ever the RJS electrification "" would really mean something else.
This also means that all interfaces up to front must re-interpret this "" as a null
The goal of this task is to switch to an option internally in core, then correctly update all interfaces all the way up to front.
This would allow clear interfaces everywhere when no electrification exists (and probably force clearer design even in display).
Attention points:
DistanceRangeMap in core handles null as the no-value interval, which is probably correct but could lead to difficulties in the refactor (not knowing the range size if no elec is provided in that case for example): a dedicated enum could be a solution for that (the one used by PathProperties?).
In some cases, it may be difficult to make a difference between no-electrification and no electrification-problem (both null ranges?) : adding an extra enum would be necessary?
Routing it all the way everywhere is probably an "important" job
Description and goal
Context: When loading a RJS in core, default electrification (so not-electrified) is empty string
""
This is not especially clear and might be ambiguous if ever the RJS electrification""
would really mean something else. This also means that all interfaces up to front must re-interpret this""
as anull
The goal of this task is to switch to an option internally in core, then correctly update all interfaces all the way up to front. This would allow clear interfaces everywhere when no electrification exists (and probably force clearer design even in display).
Attention points:
DistanceRangeMap
in core handlesnull
as the no-value interval, which is probably correct but could lead to difficulties in the refactor (not knowing the range size if no elec is provided in that case for example): a dedicated enum could be a solution for that (the one used byPathProperties
?).Relates to https://github.com/OpenRailAssociation/osrd/pull/8235#discussion_r1703656475
Acceptance criteria
null
value when the infra is not electrified