Skip to content

examples: fix duplicate event_sequence in Run as Directed work example - #147

Merged
carlfredl merged 1 commit into
MobilityData:mainfrom
ChelseaKR:fix/run-as-directed-event-sequence
Jun 29, 2026
Merged

carlfredl merged 1 commit into
MobilityData:mainfrom
ChelseaKR:fix/run-as-directed-event-sequence

Conversation

@ChelseaKR

Copy link
Copy Markdown
Contributor

The run_events.txt block in the Run as Directed work example uses event_sequence 30 on two rows of run (weekday, 10000):

weekday,10000,30,BLOCK-A,run-as-directed,,stop-1,09:00:00,stop-1,12:00:00
weekday,10000,30,BLOCK-A,deadhead,,stop-1,12:00:00,garage,12:10:00

run_events.txt declares Primary Key (service_id, run_id, event_sequence) and states event_sequence "Must be unique within one (service_id, run_id)", so the example contradicts its own rule. The two events are sequential (09:00 to 12:00, then 12:00 to 12:10), so this bumps the trailing deadhead to 40 (any non-duplicate value works, since sequences need not be consecutive).

Per the design discussion in #60, event_sequence values "must be different" even when two events share a start/end time, so this looks like a slip in the example rather than an intended tie. I found this while building a TODS validator, and I'm happy to adjust if 40 isn't the preferred convention.

The run_events.txt block for run (weekday, 10000) uses event_sequence 30 on
both the run-as-directed row and the following deadhead row, which violates the
declared Primary Key (service_id, run_id, event_sequence) and the rule that
event_sequence 'Must be unique within one (service_id, run_id).' Bump the
trailing deadhead event to 40 (any non-duplicate value works, since sequences
need not be consecutive).
@CLAassistant

CLAassistant commented Jun 23, 2026 •

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@skyqrose skyqrose left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants