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
Add new features from work on TriMet’s OpenTripPlanner Shared-Use Mobility (OTP SUM) project. Resolves #2642 #2664
Conversation
Also, update to junit 4.12 so that wiremock can work
Go all-in on ObjectMapper deserialization and make packages for the lyft and uber updaters to organize all the files
- fix calculation of mode-specific weight in streetSearch method - add in a euclidean heuristic for pre-transit vertices in searches with lots of pre-transit vertices
These changes bring this file in alignment with the almost-approved PR that would include these changes in OTP dev-1.x in #2677
I no longer intend to merge this specific PR as a whole into OTP as almost all of the items that were added to this trimet-dev branch have been broken out into other PRs. However, if it's ok with the repository owners, I would like to keep this PR open until all the other branches get merged in. That way I should be able to reconcile that against what is in this development branch to see if anything hasn't yet been merged into the primary branches of this repository. |
Active development on this branch has moved to https://github.com/ibi-group/OpenTripPlanner/tree/trimet-dev. Therefore, I'm closing this PR. |
Relevant code changes extracted from opentripplanner#2664
Relevant code changes extracted from opentripplanner#2664
Relevant code changes extracted from opentripplanner#2664
Relevant code changes extracted from #2664
Not sure if this should be one giant PR or multiple different ones, but sort of starting the process here. This is a PR to add the work being done on TriMet’s OpenTripPlanner Shared-Use Mobility (OTP SUM) project to OTP master. Some of the items in this PR (especially with TNC and car rental routing build on the work done for each).
Issues and Roadmap
closes #45
).Items with issues
#2642 (add TNC routing).
Transportation Network Company (TNC) routing has been added from inspiration of how the current Park and Ride and Kiss and Ride routing works. TNC routing is currently implemented to work with either Uber or Lyft. In a shortest path search, it is possible to hail a TNC vehicle while on a StreetEdge. The TNC must be used a minimum amount of distance before deboarding and is alighted whenever a StreetEdge that forbids driving is encountered or when a StreetTransitLink is encountered or the destination is reached. While traversing streets, the weight is increased by multiplying the weight with a drive time reluctance factor and a drive distance reluctance factor which are configurable. A postprocessing check will occur that will remove certain itineraries that do not have a certain percent of the distance of the overall journey using transit.
Part of the TNC routing includes an updater that doesn't actually update the graph, but does allow for querying the TNC APIs for arrival, trip duration and price estimates. The arrival estimates are used to determine if a TNC is avaible to pickup at a certain location and will result in no results being found if no service is reported to exist. Each response with a TNC leg is returned with arrival, duration and price estimates.
This code also attempts to read OSM way tags to determine if a particular way is suitable for a TNC pickup/dropoff. Currently, the first parking:lane tag is read and if the value is either
no_stopping
orfire_lane
then TNC pickups/dropoffs are not allowed. This has limitations of data quality since there are only 597 ways with aparking:lane:*
tag in the Portland Metro area at the time of the creation of this PR.Items without issues, but listed in OTP Project in 1.4
Add Car Rental routing
Car rental routing has been added by heavily copying the bike rental codebase. The car rental code also uses a lot of code copied from on-going work from Coord's bike rental routing work in their own branch/fork of OTP. The car rental routing has an updater that consumes data from a file or url about Car2Go locations. The updater also reads in an optional GeoJson feature representing a car rental region that vehicles must be dropped off inside of. Almost all of the rental region code was copied from the Coord fork. It is however possible to configure a car rental trip request that allows the car to be dropped off outside of a region. New edge and vertex types for car rental stations are added. Furthermore, car rentals are allowed to be dropped off on any street edge that allows that. That code is also copied and modified from Coord's work.
This code also attempts to read OSM way tags to determine if a particular way is suitable for a car rental dropoff. Currently, the first parking:lane tag is read and if the value is either
no_stopping
orfire_lane
orno_parking
then car rental dropoffs are not allowed. This has limitations of data quality since there are only 597 ways with aparking:lane:*
tag in the Portland Metro area at the time of the creation of this PR.Custom walk configuration
TODO: explain this a little more
Items without issues and not listed in OTP
Park and Ride improvements
A new API endpoint for fetching a list of Park and Rides has been added at
/routers/{routerId}/park_and_ride
.Some stuff with elevation metadata
TODO: explain this a little more
Improvements to InterleavedBidirectionalHeuristic
There were some bug fixes and improvements. This heuristic is being used as a way to speed up searches with transit by attempting to traverse and score ways close to the origin and destination before doing the main graph search. A number of problems were identified in this issue here that were the result of problems with the InterleavedBidirectionalHeuristic. There was an issue with the heuristic not adding bike rental stations or car rental stations, thus ignoring them in searches. One-way streets were being traversed backwards while walking a bike which led to trips that did not respect the maxWalkDistance parameter. Also, trips with cars were traversing the entire graph, so now, if the car mode is enabled, the pretransit search isn't done at all and a limiter on the posttransit search was implemented to stop the search once the origin was reached. And finally, forked states weren't being analyzed so that was fixed.
Tests
Some tests have been added (especially for the TNC and Car Rental updaters), but elsewhere tests have not been added. All tests are currently passing. Should this PR also add code coverage checking to OTP? At Conveyal, we use codecov.io for this which is free for open-source projects.
Formatting
Yes
To be completed by @opentripplanner/plc: