Implement trip banning - #3953
Conversation
optionsome
left a comment
There was a problem hiding this comment.
https://github.com/opentripplanner/OpenTripPlanner/blob/dev-2.x/src/main/java/org/opentripplanner/api/common/RoutingResource.java#L475 javadoc should be updated to reflect that it's now partly supported. Tested with REST API and seemd to work.
| import org.opentripplanner.model.modes.AllowedTransitMode; | ||
| import org.opentripplanner.model.Trip; | ||
| import org.opentripplanner.routing.algorithm.raptoradapter.transit.TripPatternForDate; | ||
| import org.opentripplanner.routing.api.request.BannedStopSet; |
There was a problem hiding this comment.
This BannedStopSet is probably something we want to refactor out of at some point but seemingly the REST API allows to ban specific stops withing a trip
There was a problem hiding this comment.
I'm also not too keen on using an API class in the Raptor code.
There was a problem hiding this comment.
This is not in the RAPTOR code, it is in the raptor adapter, which sits between OTP and RAPTOR models. If you look below this class already uses two other classes from the same package, which will be moved when splitting up the REST API.
|
Since the rest of the Raptor code is very well tested: how hard would it be to add a test? |
Added |
leonardehrenfried
left a comment
There was a problem hiding this comment.
Could you rewrite the Javadoc that @optionsome has pointed out?
Done |
Summary
Trip banning was not implemented when moving from OTP1 to OTP2. This implements it, and fixes the descriptions in the Transmodel API for the unimplemented banned types.
Changelog
The changelog file
is generated from the pull-request title, make sure the title describe the feature or issue fixed.
To exclude the PR from the changelog add
[changelog skip]in the title.