Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve pairing of loaded and return rail vehicle type names #84

Open
mbbruch opened this issue Jul 31, 2024 · 0 comments
Open

Improve pairing of loaded and return rail vehicle type names #84

mbbruch opened this issue Jul 31, 2024 · 0 comments
Labels
future Low urgency but might be valuable in the future

Comments

@mbbruch
Copy link
Collaborator

mbbruch commented Jul 31, 2024

In rail vehicle .yamls and the resulting Rust objects, we're using the naming convention "_Loaded" and "_Empty". (Example: Intermodal_Loaded.yaml and Intermodal_Empty.yaml.

However, in the current version of default demand .csv files, we're using the naming convention of no suffix for loaded vehicles (e.g., "Intermodal") and "_Empty".

In the train planner, we generate return trips by appending "_Empty" to the train type labels from the demand .csv. This new _Empty value must match the name of one of the Rust rail vehicle objects.

We handle this ad-hoc in the train planner by cleaning up the string labels to match, but ideally we'd have something more standardized and robust. A couple options:

  • include in each .yaml a field for empty_vehicle_definition_name, so we could correctly point to the empty equivalent if it exists, and then to add special handling in the train planner for cases in which no empty equivalent exists. One wrinkle this wouldn't handle (that we aren't handling the old way either) is that the return type may differ based on the simulation you're running (maybe sometimes you return an empty intermodal container, but in other cases, you return a well car with no container on it at all).
  • have pairs of vehicles in yaml files and load a RailVehicles(Vec) object from the file
@mbbruch mbbruch added the future Low urgency but might be valuable in the future label Jul 31, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
future Low urgency but might be valuable in the future
Projects
None yet
Development

No branches or pull requests

1 participant