class STDCMSuccess(
var simulation: SimulationResponse,
var path: PathfindingBlockResponse,
@Json(name = "departure_time") var departureTime: ZonedDateTime
) : STDCMResponseV2
We directly return the simulation response in a format that's identical to the one returned by the simulation endpoint.
What we could do instead would be to return a train schedule, as in, the input for a simulation call. Editoast would then be in charge of sending a new request to core to get the actual results.
This would let us cache and re-use lots of components and generally makes more sense.
Currently, the core api for stdcm returns this:
We directly return the simulation response in a format that's identical to the one returned by the simulation endpoint.
What we could do instead would be to return a train schedule, as in, the input for a simulation call. Editoast would then be in charge of sending a new request to core to get the actual results.
This would let us cache and re-use lots of components and generally makes more sense.
This refactoring is briefly mentioned in https://github.com/osrd-project/osrd-confidential/issues/331, it came up in a workshop when discussion this issue.