OpenRailAssociation / osrd

An open source web application for railway infrastructure design, capacity analysis, timetabling and simulation
https://osrd.fr
466 stars 44 forks source link

meta: stdcm: things to do #3998

Open eckter opened 1 year ago

eckter commented 1 year ago

This is a collection of tasks to do related to STDCM. If anyone wants to pick something to get started and learn how it works, feel free to convert an item to an issue and assign it to yourself, and ask me any question you may have.

It's a work in progress and gets edited quite often.

General

Stops

Note: most of them will require extra parameters for each stop. Ideally it would take some UX planning from the start, I don't think adding one field at a time would lead to a good result.

Bugs

See: https://github.com/orgs/osrd-project/projects/15/views/5. Anything that affects the envelopes, running time calculation, signaling or pathfinding will also affect STDCM requests. There are a few STDCM-specific bugs, but most are just running-time bugs that happen much more often in this context.

Removing the use of floats would significantly improve the reliability of the whole process.

Tests / stability

Performances

It's probably still too early for extensive optimizations, but it will be important later on.

Possible refactoring

These suggestions aren't well refined, just things we could eventually look into

  1. Split the generic Pathfinding.kt into two versions for stdcm / block pathfinding
    1. It would remove clutter to the main class and enable for more flexibility, including significant optimization paths
    2. It would also lead to code duplication and a need for more unit tests
    3. https://github.com/osrd-project/osrd/issues/6917
      1. This is necessary to handle engineering allowances in a reasonable time
      2. Depending on the approximations made here, the post-processing may fail, we may have to "blacklist" block openings and re-run a pathfinding

Eventual rewrite

The current implementation is just a proof of concept, we mostly check that our solutions actually work but it's not meant to last forever. The way it's written has blurry interfaces and flexible components that evolve over time to iterate quickly, but that kind of architecture can turn into a mess and isn't fit for a long-lasting solution. We tried to think about most future problems from the start, but we did have to re-think a few things along the way when adding new features. Some future features don't have a very precise plan.

We should keep this in mind, but even if I may have said otherwise in the last few days (IRL), I think it's too early to start working on this now. There are still some very complex features that are not implemented yet and we don't have clear plan for them. Implementing those will likely require a few changes, and we need to have a precise solution before starting the rewrite. The biggest one is the "lookahead problem" (explained here in French, not translated yet). We also need to find a good way to stop on secondary tracks to avoid conflicts.

Additionally, the rewrite would ideally be in rust. This requires migrating almost everything that's written in java/kt first.

axrolld commented 1 year ago

Isn't Use the kotlin infra done by now ?