Repository navigation
Dev - #136
Merged
Merged
Dev#136
Conversation
…uration) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
set_min_speed() raises the speed of trip spans slower than min_speed, shifting the later times of each trip earlier and keeping dwell times. It mirrors set_max_speed(): both now call the internal limit_trip_speed() helper, whose behaviour in max mode is unchanged. Argument checks stay in the exported functions, and warn_missing_ids() gains a call argument, so warnings and errors are still attributed to the exported functions. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fix_gtfs() passes overwrite_stop_times (default FALSE, last argument so positional calls keep working) to interpolate_stop_times(overwrite = ). set_dwell_time()'s default strategy is "shift_trip_end": the docs, NEWS and tests still said "push_trip_end". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Many feeds write times after midnight as "00:30:00" instead of "24:30:00", so trips that cross midnight seem to go back in time and durations, speeds, time-of-day selections and interpolation come out wrong. New fix_overnight_times() rewrites these times to the GTFS form (a step back of more than 12 hours is taken as midnight; frequencies end_times earlier than start_times are moved a day later), and fix_gtfs() runs it first. The functions that calculate or change durations and speeds, interpolate_stop_times(), build_graph() and the time-of-day functions (filter_by_time_of_day(), get_route_frequency(), set_route_frequency(), get_stop_frequency(), get_vkt(), get_vmt(), get_trip_length() segment windows, get_summary()) fix them silently before using them. Each function checks its own feed, so nested calls find the times already fixed and don't change or copy them again. Internal helper has_overnight_trips() reports whether a feed needs the fix. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Resolves conflicts with set_dwell_time(strategy), set_min_speed() and fix_gtfs(overwrite_stop_times): NEWS keeps both sides' bullets, fix_gtfs() documents fix_overnight_times() as step 3 before the speed cap and the interpolation (with overwrite_stop_times), and limit_trip_speed() fixes the times once for both set_max_speed() and set_min_speed(), whose docs now say so. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
# Conflicts: # R/fix_gtfs.R
This was referenced Nov 1, 2026
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #131 #133 #134 #135