Skip to content

Asymmetry #418

@louisgreiner

Description

@louisgreiner

Description

Close #242

Impacted features

Not only the implementation of the asymmetry has to be done here, but also the refacto of the rest of the functionnalities has to be taken in account and make sure they still work without regression.

  • Streckengrafik (GET)
  • Perlenkette (side-view)
  • O/D Matrix
  • Analytics
  • Node occupancy
  • Track occupancy (at nodes and at sections)
  • Non-stop trainruns

Also, a major refacto of the services involved in the times calculation, to ease the maintenance of the rest involved features.

Also, all the test netzgrafikDto files (default NetzgrafikDto, demo env, etc...) have to be updated to take asymmetry into account.

Roadmap:

  • One-way trip
  • Nodes asymmetry
  • Return travel time
  • Different stop policy (non-stop) for round trips
  • Refactor of the times services

Asymmetry v2 (done by late August 2025)

TODO: implementation order + new attributes design + naming

Design issues:

  • where to display the backward travel time when 5+ intermediate stops in the netzgrafik?
  • instead of having an ugly toggle to represent the symmetry state, use a "mirror" representation?

Important

Review must be done regularly, eventually by commit batch ; like a feature branch

Implementation should go through (approximative order):

  • Add trainrun section attribute for node asymmetry: trainrunSection.sourceSymmetry (bool) and trainrunSection.targetSymmetry (bool)
    • Disable symmetry warnings when symmetry off
  • Add trainrunSection attribute for backward travel time: trainrunSection.backwardTravelTime (TimeLock)
  • Display trainrunSection.backwardTravelTime (and its inputs) when at least one of trainrunSection.sourceSymmetry is false for a section
    • When displayed, trainrunSection.backwardTravelTime is displayed below the travel time (TODO: fix the current design that doesn't work when numberOfStops >= 5)
    • If trainrunSection.travelTime === trainrunSection.backwardTravelTime, the latter is not displayed
  • Make sure old files still work
    • Migration of test netzgrafikDto files (default NetzgrafikDto, demo env, etc...)
    • if trainrunSection.sourceSymmetry not present, then both values are true
    • if trainrunSection.backwardTravelTime is not present, then copy trainrunSection.travelTime value
  • Add a toggle for source and a toggle for target in the trainrun section dialog for setting trainrunSection.sourceSymmetry and trainrunSection.targetSymmetry
  • Handle asymmetry in trainrun-section-times.service.ts
  • When switching from asymmetric to symmetric on a section, update the values (source or target) to be symmetric using the travelTime (then in a second time allow to choose)
  • Update the connection times displayed in the pearl view component (for normal travel time / backward travel time)
  • Update of rest of the features
    • Streckengrafik (GET)
    • Perlenkette (side-view)
    • O/D Matrix
    • Analytics
    • Node occupancy
    • Track occupancy (at nodes and at sections)
    • Non-stop trainruns (hard part)
    • Import / Export
    • Times propagation (<- / ->)
  • Mark the asymmetrical sections with svg arrows (see end of last comment) (as the trainrun directions arrows)
  • Add a filter for asymmetrical trainruns + adapt Symmetry filtering
  • If at least 1 trainrunSection contains asymmetry, add a toggle for switching on the symmetry of a whole trainrun (setting all the trainrunSection.sourceSymmetry and trainrunSection.targetSymmetry to true, updating all the values) (in trainrun dialog and header of pearl view), an interface should allow the user to choose the symmetry "master" (= which travel time to consider for symmetry)
  • When switching from asymmetric to symmetric on a section, an interface should allow the user to choose the symmetry "master" (= which travel time to consider for symmetry) (in trainrun section dialog and Perlenkette (pearl view))
  • Emit operations
  • Add documentation
  • Bonus: different stop policy (non-stop) for round trips

Most of the specifications are here

Asymmetry goals

Image

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions