-
Notifications
You must be signed in to change notification settings - Fork 22
[Feature request]: Add more details to NGE trainrun events #792
Copy link
Copy link
Labels
area:servicesServices, helpers, utils and i18n ("logical" stuff)Services, helpers, utils and i18n ("logical" stuff)feature-requestA request of a new feature of the enhancement of an existing oneA request of a new feature of the enhancement of an existing one
Description
Discussion with @Synar @louisgreiner @emersion @Akctarus
OSRD bugs:
- Roundtrip → one-way, loose an arbitrary one (perhaps the wrong one)
- Margins, arbitrary name for roundtrips
- Duplicating doesn't retain original train data
Possible solutions:
- ✅ Add more data to NGE events, e.g. a tag explaining what changed
- ❌ Introduce a new event for trainrun changes with only fields which got changed
Focus on trainruns for now.
Tags indicating what changed:
trainrunSectionstrainrunSections.nodes(OSRD:path,schedule, resetmargins)trainrunSections.times(OSRD:schedule,⚠️ use old path step IDs
instead of assuming${node.id}-${})trainrunSections.numberOfStops(OSRD: no-op)
name(OSRD:train_name)categoryId(OSRD:category)frequencyId(OSRD:paced)trainrunTimeCategoryId(OSRD: no-op)labelIds(OSRD:labels)direction(OSRD: special snowflake)- For one-way, call
generatePathAndSchedule()depending on
oneWayDirection, then store train schedule - For round-trips, create return train schedule based on previous one-way
train schedule (should be current behavior)
- For one-way, call
Then add a list of tags to TrainrunOperation, plus a field to indicate
one-way direction:
class TrainrunUpdateOperation extends TrainrunOperation {
readonly tags: []TrainrunUpdateTag;
readonly oneWayDirection?: "forward" | "backward";
}For trainrun duplication:
class TrainrunCreateOperation extends TrainrunOperation {
readonly duplicatedTrainrunId?: number;
}Link to design proposal file
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
area:servicesServices, helpers, utils and i18n ("logical" stuff)Services, helpers, utils and i18n ("logical" stuff)feature-requestA request of a new feature of the enhancement of an existing oneA request of a new feature of the enhancement of an existing one
Type
Projects
Status
Awaiting merge