Skip to content

stdcm: debug: add a way to export a kind of space-time chart on the output path #13831

@eckter

Description

@eckter

EDIT: the previous version of this ticket was to output a full train schedule, but that's not the plan anymore. Instead, core will directly output something akin to a space-time chart, as that's the end goal here. It won't be directly an image, rather some csv/json that can be used to build it.

What we need to have

We'll generally want to have a 2D space with distance on one axis and time on the other. We'll first log every relevant data, and then see how it can be plotted (probably in a notebook)

Required:

  • Train head position
  • When each zone is occupied
  • By which train (with an ID that isn't specific to OSRD)

Nice to have:

  • Train tail position
  • Head / tail positions of other trains (that directly show up on the tracks)
  • When the new train needs each zone to be free
  • Path data: zones, signals, routes
  • Train speed at each location
  • Maximum speed at each location
  • Temporary speed limits?
  • Engineering allowance ranges

Implementation plan (draft):

We'll generate some JSON data during post-processing, with every relevant data we can fetch. At first we'll dump it into a file, eventually it should be uploaded to the object storage.

Easy to get:

  • Train head / tail position
  • When each zone is occupied by a different train
  • Path data
  • Speed, max speed, temporary speed limits
  • Engineering allowance range

ID of other trains: we'll need to attach some metadata to the "cached timetables". It shouldn't be too tricky. -> Turns out we also need to add that data to the requirement endpoint response. Still doable.

When the train needs each zone to be free: we'll need to dig into what is now private / hidden behind abstract interfaces. It can be done, but the result may not be very nice (in terms of implementation) -> We can just plot the requirements in front of the trains (as it should be), no issue there.

Head/tail position of other trains: we just don't have the information there.

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

Status

Awaiting merge

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions