-
Notifications
You must be signed in to change notification settings - Fork 8
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
Vehicle assignments #85
base: main
Are you sure you want to change the base?
Conversation
Working off of @skyqrose 's outline of vehicle_assignments.txt, cal-itp#28 (comment). Attempted alignment with GTFS-Vehicles proposal.
for more information, see https://pre-commit.ci
Based on this #28 (comment) - what @skyqrose outlined in August Notes:
|
Some internal discussion at Optibus: |
These are vehicle properties that Optibus currently exports in a non TODS format. Which properties should be included in TODS? Vehicle properties example.xlsx
|
From the fields mentioned above, I would remove at least To me, those look too undefined, covered by other attributes like I'm also very unsure about |
docs/spec/index.md
Outdated
| `block_id` | ID referencing `trips.block_id` | Conditionally required | Identifies the block. Either `trip_id` or `block_id` must be specified. | | ||
| `trip_id` | ID referencing `trips.trip_id` | Conditionally required | Either `trip_id` or `block_id` must be specified. In the case where both are supplied, `trip_id` overrides `block_id`. Note: multiple vehicles are allowed on the same block+date, but this is not recommended. | | ||
| `vehicle_id` | ID referencing `vehicles.vehicle_id` | Conditionally required | Refers to a specific vehicle in the transit fleet. Either `vehicle_id` or `vehicle_category_id` MUST be supplied. | | ||
| `vehicle_category_id` | ID referencing `vehicle_categories.vehicle_category_id` | Conditionally required | Refers to a category of vehicle in the transit fleet if there is no specific vehicle assignment. Either `vehicle_id` or `vehicle_category_id` MUST be supplied. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Having the category here sounds good, but perhaps we should then stress that this is the operationally assigned category of vehicle, not the planned one.
The planned vehicle category/type would be more naturally placed in routes_supplement.txt
or trips_supplement.txt
. Usually, planned and real vehicle type should be identical, but there could be differences.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes. GTFS-Vehicles had proposed to add a routes
.vehicle_category_id
field that would define "a default vehicle category for all trips belonging to this route". This could be useful for rider-facing applications (i.e. accessibility & amenity information) and for planning, scheduling, and operational purposes as well, I imagine.
fixes cal-itp#85 (comment) responds to cal-itp#85 (comment)
…tional-data-standard into vehicle_assignments
@skyqrose @safrazier17 Can you help guide process here? Since I worked off the #81 branch, this has the rosters and employee assignments spec draft. Should I remove those changes? Will we vote on the two PRs separately or together? Merge separately? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've left lots of line-by-line comments.
As for the process, I think this is completely independent from #81. We could split them into two separate PRs/votes.
docs/spec/index.md
Outdated
| `date` | Date | Required | | | ||
| `service_id` | ID referencing `calendar.service_id` or `calendar_dates.service_id` | Optional | Identifies a set of dates when the run is scheduled to take place. Required if `block_id`s are repeated between different `service_id`s. | | ||
| `block_id` | ID referencing `trips.block_id` | Conditionally required | Identifies the block. Either `trip_id` or `block_id` must be specified. | | ||
| `trip_id` | ID referencing `trips.trip_id` | Conditionally required | Either `trip_id` or `block_id` must be specified. In the case where both are supplied, `trip_id` overrides `block_id`. Note: multiple vehicles are allowed on the same block+date, but this is not recommended. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would an agency ever schedule multiple vehicles to the same block? Doesn't that go against the definition of block? I know that might happen as a realtime adjustment, but if it's scheduled to happen, shouldn't they change the schedule so it's multiple different blocks?
If we can make that assumption, then this field could be removed.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I included trip_id
as an option for cases where block_id
is not supplied in the GTFS. On 2nd thought I'd favor removing, unless we know this is a case to plan for out of the gate.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd recommend including it for specific trips. This works for agencies that don't publish blocks and may not wish to make specific trip-specific block assignments in TODS, and likewise works for agencies with interchangeable operations. (I could see us making these assignments on a trip-specific level to specify requirements by trip prior to building out cycles.)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm in favour of keeping it as it is now, with the trip_id
removed.
If we allow assignments of individual trips to vehicles it breaks the logic of blocks as @skyqrose pointed out.
If we allow assignments of individual trips to vehicle types/categories it overlaps content-wise with http://bit.ly/gtfs-vehicles (which already has a route-to-vehicle-category assignment modeling a "requirement"). The case that you pointed out last ("specify requirements by trip prior to building out cycles") should probably be modeled using http://bit.ly/gtfs-vehicles.
"agencies that don't publish blocks" can still wrap each trip in an artificial block and assign it this way and/or add their real blocks in the non-public trips_supplement.txt
only.
So overall, it seems like we can transmit the operational plan (including which vehicles/types will really be running the trips) without allowing to include trip_id
in the assignments.
crew/rostering is in cal-itp#81 cal-itp#85 (review)
We've been discussing this internally at Optibus, including with some CAD/AVL partners. For the upcoming version, we propose a "least viable" approach:
This removes speculative vehicle attributes. The CAD/AVL should be able to look up vehicle attributes stored in that system. Thoughts/reactions? |
That does remove the ability to assign a type of vehicle without assigning a specific vehicle, but that's probably fine if we're aiming for a least viable approach. |
@skyqrose If we pass a version of this without vehicle types, I think the discussion was still useful, so thanks for the review and great comments. And if we do add in more vehicle attributes besides the ID and license plate, then bringing back in vehicle type seems useful. |
docs/spec/index.md
Outdated
| `date` | Date | Required | | | ||
| `service_id` | ID referencing `calendar.service_id` or `calendar_dates.service_id` | Optional | Identifies a set of dates when the trip is scheduled to take place. Required if `block_id`s are repeated between different `service_id`s. | | ||
| `block_id` | ID referencing `trips.block_id` | Required | Identifies the block. | | ||
| `vehicle_id` | ID referencing `vehicles.vehicle_id` | Conditionally required | Refers to a specific vehicle in the transit fleet. Either `vehicle_id` or `vehicle_type_id` MUST be supplied. | |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Proposed changes (from discussion today):
vehicle_id
required- Remove
vehicle_type_id
(and vehicle_types.txt file) with a note that this may be introduced in the future, in order to mitigate issues that would be caused by a later backwards-incompatibile change to addvehicle_type_id
and makevehicle_id
conditionally required. - Also, in service of future spec evolution, mention GTFS-Vehicles and add note about train couplings
- Add a vehicle label field (e.g. like the name of a ferry)
- Recommend (do NOT require) vehicle_id should match GTFS-realtime vehicle_id
- Keep
license_plate
field since it matches GTFS-realtime, but note other global identifier may be supplied, particularly for non-road vehicle types, e.g. Maritime Mobile Service Identity (MMSI) for ferries
Minimum viable vehicle assignments proposal. see cal-itp#85 (comment)
https: //github.com/cal-itp/pull/85#discussion_r1890259183 Co-Authored-By: Jeff Kessler <31969870+jeffkessler-keolis@users.noreply.github.com>
Pre-vote checklist (@antrim)
|
| `vehicle_label` | Text | Optional | Free text label for a vehicle, e.g. vessel name. | | ||
| `license_plate` | Text | Optional | License number or global identifier for the vehicle, e.g. “E898656”. The field name was chosen to align with the `license_plate` field in GTFS-Realtime. It may specify a different global identifier, particularly for non-road vehicle types without license plates, e.g. Maritime Mobile Service Identity (MMSI) for ferries. | | ||
|
||
*Note for future-compatibility:* Future TODS versions may support vehicle couplings: specifically, train cars (individual vehicles) that comprise a train set. Such a proposal is described by the [GTFS-VehicleCouplings draft extension](http://bit.ly/gtfs-vehicles). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For this note, is there anything different that we would expect a rail producer to do in order to future proof their feed? Or is this just for general awareness?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
General awareness. Not sure how else we could express this or if it makes sense to include.
I think that a rail producer would advocate for this function to be added.
This is also a heads up for any consumer: Future versions of TODS may have vehicle consists.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this is looking much better now
e.g. bus number. thanks @skyqrose Co-authored-by: Sky Rose <zgnomdnv@sky.skyqrose.com>
-trip (remove outdated reference) Co-authored-by: Sky Rose <zgnomdnv@sky.skyqrose.com>
Proposed spec in response to issue #28 "Allocating drivers and vehicles in ODS".
What it does: Assign individual vehicles to blocks.
What it does NOT do:
Changes included:
vehicles.txt
: ID, text label, license plate. Only a few attribute fields are defined for a minimum viable proposal. TODS consumers may be able to look up additional attributes by vehicle_id. More attributes can be defined in future TODS versions.vehicle_assignments.txt
: Assignments by service date,block_id
,service_id