Update handling of vehicles and consists - #272
Conversation
remove inadvertent constraints
Remove service_date from key, required fields Make type required
|
Documentation available at: |
|
Data Validation Report
|
|
Data Validation Report
|
|
Note for other reviewers: The diff on this PR is funky and pulls in some unrelated docs changes because |
lauriemerrell
left a comment
There was a problem hiding this comment.
I think this broadly looks pretty good to me but I am still a bit confused about the foreign key logistics -- if you have a consist-level location record, how is that associated with the consist? It seems like this proposal is leaving vehicle_id as the join key between the operational event/summary tables and vehicles, but vehicle_id is null for consists.
Should vehicle_id = vehicle_assignment_id for consists in vehicle_assignments, or have some other derived value, so that the operational tables can reference either type of vehicle (individual vehicle or consist) by way of vehicle_assignments? Like vehicle_id is either a reference for vehicles OR vehicle_assignments?
Update: this has since been addressed ✅ develop was strictly behind main (21 commits, all docs changes merged directly to main), so no rebase was needed, just a fast-forward: git push origin origin/main:develop. [aligns with the Change Management Policy guidance that the TIDES Manager "SHOULD periodically update this branch with any non-normative changes accepted into main." no history was rewritten, and there's no effect on any feature branch. the diff now shows only the vehicles restructure's 27 files, as of Friday July 24] |
|
@lauriemerrell comments
The intent was that the One option is to relax the constraint that Another option is to consider |
|
Here is an example that might help the conversation regarding the linkage between ops tables and the The agency fleet is a bus and two LRVs Each of these has a record in the
On any given date, the operational system creates a consist of Rail Car # 101 and Rail Car # 102 and calls it CON0099 In the operational data table, such as
There would be four records in There are two options for this. Option 1:
Option 2:
Note that Option 1 facilitates the join with the |
|
Data Validation Report
|
Pull Request
Summary
This PR updates the handling of vehicles and vehicles assignments in TIDES as follows
vehicle_groupstablevehiclestable to represent the static/slowly changing list of physical vehicles (buses and train cars)vehicle_assignmentstable to represent the vehicles (buses and train cars) and consists that are available to be assigned each date.train_carsandvehicle_train_carstables and add a newconsist_vehiclestable to document that cars that are assigned to each consist (with their order and orientation)vehicle_directionfield to the operational event and summary data tables to represent the direction that a train is moving during operation.This is a breaking change.
Resolves #269
Schema Tables / Terminology
vehicle_groups are collections of vehicles that share the same characteristics. A vehicle group may represent a group of individual vehicles (e.g., buses of the same type) or planned consist types (e.g., two-car trains of type 3 LRVs)
vehiclesvehicles are single physical vehicles, a bus or a train car. A vehicle has a start date and end date when it is in service, along with unique identifying information such as the label on the vehicle and license plate. Other attributes are referenced from
vehicle_groupsvehicle_assignments are the daily record of either a single vehicle (such as a bus or train car) or a consist (i.e., a train) that can have data associated with it. This allows for the fact that rail operations systems may associate data with either an entire train or each individual car of a train. There is some flexibility in whether and how the
vehicle_assignmentstable is used. In the simplest context, it is and optional table. And in some contexts, vehicle assignments may stretch over multiple days instead of being for a single date.consist_vehicles are the individual train cars that make up a consist. The cars of the consists refer to vehicle records and have both an order and an orientation.
Files Changed
Removed:
spec/train_cars.schema.jsonspec/vehicle_train_cars.schema.jsonsamples/template/TIDES/train_cars.csvsamples/template/TIDES/vehicle_train_cars.csvNew:
spec/vehicle_groups.schema.json- new table schemaspec/vehicle_assignments.schema.json- new table schemaspec/consists_vehicles.schema.json- new table schemasamples/template/TIDES/vehicle_groups.csv- template csv filesamples/template/TIDES/vehicle_assignments.csv- template csv filesamples/template/TIDES/consist_vehicles.csv- template csv fileModified:
spec/vehicles.schema.jsonspec/tides-schema.jsopnsamples/template/TIDES/vehicles.csvspec/tides-datapackage-profile.jsonsamples/template/TIDES/datapackage.jsonCHANGELOG.md- documented new table_- See related discussion in #269 and discussion document Vehicles and Crew in GTFS / TODS / TIDES
Usage Notes
Outstanding Tasks
vehicle_groupstable. This could be a subset of the fields proposed in Addition of vehicles.txt to GTFS schedule google/transit#636Review checklist
Per change management policy, the following must be met before feature branch changes can merge to
developbranch: