-
Notifications
You must be signed in to change notification settings - Fork 8
employee_run_dates.txt #87
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
Changes from 24 commits
8291088
f393e84
d3d1de0
66ffdac
fb4e3b3
025ee2e
f9dbb9a
3780c5b
64e3368
991e8b3
24f2502
f3c883b
737edce
9c9b4b9
d68b2f0
841eaf8
df8466f
6b533c2
6097800
952e47b
0394dcf
76dcf58
67da576
b15606d
e0e9cd3
a16c162
d933e26
97cea85
e7bc306
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,8 @@ There are two types of files used in the TODS standard: | |
- **Supplement files**, used to add, modify, and delete information from public GTFS files to model the operational service for internal purposes (with a `_supplement` filename suffix). | ||
- **TODS-Specific files**, used to model operational elements not currently defined in the GTFS standard. | ||
|
||
All files are optional. | ||
|
||
### Files | ||
|
||
| **File Name** | **Type** | **Description** | | ||
|
@@ -21,6 +23,7 @@ There are two types of files used in the TODS standard: | |
| stop_times_supplement.txt | Supplement | Supplements and modifies GTFS [stop_times.txt](https://github.com/google/transit/blob/master/gtfs/spec/en/reference.md#stop_timestxt) with non-public times at which trips stop at locations, `stop_times` entries for non-public trips, and related information. | | ||
| routes_supplement.txt | Supplement | Supplements and modifies GTFS [routes.txt](https://github.com/google/transit/blob/master/gtfs/spec/en/reference.md#routestxt) with internal route identifiers and other non-public route identification. | | ||
| run_events.txt | TODS-Specific | Lists all trips and other scheduled activities to be performed by a member of personnel during a run. | | ||
| employee_run_dates.txt | TODS-Specific | Assigns employees to runs. | | ||
|
||
_The use of the Supplement standard to modify other GTFS files is not yet formally adopted into the specification and remains subject to change. Other files may be formally adopted in the future._ | ||
|
||
|
@@ -133,9 +136,28 @@ Events that don't have `trip_id` set may overlap in time with any other events. | |
|
||
Because some events may overlap in time, it may not be possible to choose a single order for events within a run that's correct for all uses. Producers should use `event_sequence` to define a reasonable order. If a consumer cares about exactly how overlapping events are ordered, they should sort based on the time fields and `event_type` instead. | ||
|
||
#### Run ID Uniqueness | ||
|
||
Run IDs may be non-unique. E.g. E.g. there may be a "Run 100" on both Weekday and Weekend service. There may even be a Run 100 on both `garage1-weekday` and `garage2-weekday` services, happening on the same day. Runs are uniquely referred to by a `(service_id, run_id)` pair. This is why the service ID is required on this file and other files that refer to run IDs. | ||
|
||
#### `run_events` Notes | ||
|
||
- Multiple `run_event`s may refer to the same `trip_id`, if multiple employees work on that trip. | ||
- Events may have gaps between the end time of one event and the start time of the next. e.g. if an operator's layovers aren't represented by an event. | ||
- `start_time` may equal `end_time` for an event that's a single point in time (such as a report time) without any duration. | ||
- Recommended sort order: `service_id`, `run_id`, `event_sequence`. | ||
|
||
### `employee_run_dates.txt` | ||
|
||
Describes which employees are scheduled to which runs on which dates. | ||
|
||
This file should represent the schedule after holidays, vacation, and other scheduled exceptions have been applied. | ||
|
||
Primary Key: `*` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The primary key being There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yeah, I think this is good. My original thought was that if two employees really are doing the same thing all day (maybe like 2 fare collectors who work the same trains), they could share a run number and the producer could skip some rows. But consumers knowing that there's at most one employee per run is more valuable. I've made the change. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'd request to revert this change for the original reason cited by @skyqrose: on the railroad front, it is common to have multiple employees assigned to the same run. While some may pre-specify by craft, others include dual-certified personnel whereby two employees work the same run and are required to vary up who works as the engineer vs conductor on each trip. Likewise, other operations include two matched crew members who work identical shifts in the same function. In practice, I suspect most consumers can treat There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Ah, I didn't realize that there were schedules like that in practice. Given that this is a real situation, I'll revert it. |
||
|
||
| **Field Name** | **Type** | **Required** | **Description** | | ||
| --- | --- | --- | --- | | ||
| `date` | Date | Required | Service date. | | ||
| `employee_id` | ID | Required | References an agency's external systems. Employee IDs are not used elsewhere in TODS. | | ||
| `service_id` | ID referencing `run_events.txt` | Required | Part of the Run ID, which is refered to as `(service_id, run_id)`. See [Run ID Uniqueness](#run-id-uniqueness). | | ||
| `run_id` | ID referencing `run_events.txt` | Required | The run that's added to this employee's schedule. | |
Uh oh!
There was an error while loading. Please reload this page.