Skip to content
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

Feature/time aware transit networks #87

Merged
merged 39 commits into from
May 19, 2021

Conversation

sablanchard
Copy link
Contributor

@sablanchard sablanchard commented Apr 23, 2021

Merge PR #86 first before this one.

New feature: Adds the optional ability to include arrival and departure times in the generated network. Adds the optional ability to pad the end time range when subsetting a transit network in order to extend your active transit network beyond the specified operational time range. Changed the selection of transit network stops and trips from > and < time range to >= and <= time range in order to explicitly include stop times that also equal the min and max time range - Note: this change will produce slightly larger transit networks than prior versions. Big thanks to @bouzaghrane for his initial PR #83 that started the features in this PR and his input on implementation and use cases. Simple use case demo notebook that illustrates this new functionality will be added in a future update.

Begins to address feature request described in: #78 and #51

Details on changes:

  • Updated create_transit_net() with new parameters:
    • timerange_pad: number of hours, minutes, seconds to pad after the end of the time interval specified in 'timerange'
    • time_aware: boolean to indicate whether the transit network should include time information. If True, 'arrival_time' and 'departure_time' columns from the stop_times table will be included in the transit edge table where 'departure_time' is the departure time at node_id_from stop and 'arrival_time' is the arrival time at node_id_to stop
  • Changed stop time selector > to >= and < to <=
  • Removed py27 and 35 from travis for future UrbanAccess end support of py27 and 35

…xisting_stop_times_int are used, remove ValueError that can never happen
…e and unique_trip_id records to aid in debugging
… and fix rare case where index was removed before merge
… accept new GTFS modes 11 and 12, validate inputs, update docstring, add prints
…dd calendar and calendar_dates as optional tables
…dd calendar and calendar_dates as optional tables
Copy link
Member

@smmaurer smmaurer left a comment

Choose a reason for hiding this comment

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

This looks great! Tests pass on my Mac. Love the clear docstrings. I feel like timerange_pad should be a float instead of an int, what do you think?

urbanaccess/gtfs/network.py Outdated Show resolved Hide resolved
urbanaccess/gtfs/network.py Outdated Show resolved Hide resolved
urbanaccess/gtfs/network.py Outdated Show resolved Hide resolved
urbanaccess/gtfs/network.py Outdated Show resolved Hide resolved
Base automatically changed from maintenance/gtfs-network-refactor-w-unit-tests to dev April 29, 2021 22:14
@sablanchard sablanchard requested a review from smmaurer May 18, 2021 21:42
@bouzaghrane
Copy link

This is great! Thanks @sablanchard

# Conflicts:
#	urbanaccess/gtfs/network.py
#	urbanaccess/tests/test_gtfs_network.py
Copy link
Member

@smmaurer smmaurer left a comment

Choose a reason for hiding this comment

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

Looks great! Tests are still failing on Travis in Python 2.7 and 3.5 because Conda isn't able to solve the environment, though.

Discussed this offline, and our feeling is that we should just end support for these platforms. They've been EOL'd, and users can always continue using older versions of UrbanAccess if they need to. See also UDST/udst-planning#2

@sablanchard
Copy link
Contributor Author

@smmaurer removed py27 and 35 from travis via: 35a0d0b

@sablanchard sablanchard merged commit a1976dc into dev May 19, 2021
@sablanchard sablanchard deleted the feature/time-aware-transit-networks branch May 19, 2021 22:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants