-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Add bikesAllowedStopMaxTransferDuration to build config to limit bike transfers
#6787
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 bikesAllowedStopMaxTransferDuration to build config to limit bike transfers
#6787
Conversation
2adc320 to
0870b27
Compare
0870b27 to
4c0f483
Compare
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## dev-2.x #6787 +/- ##
=============================================
+ Coverage 72.15% 72.21% +0.05%
- Complexity 19782 19852 +70
=============================================
Files 2151 2155 +4
Lines 79981 80084 +103
Branches 8061 8084 +23
=============================================
+ Hits 57713 57831 +118
+ Misses 19422 19407 -15
Partials 2846 2846 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
On a test with London data, this feature flag has resulted in the graph.obj file decreased from 10.0 GB to 2.3 GB with 3 walk transfers and 1 bike transfer, and the number of BIKE transfers has decreased from 9938935 to 1459294. |
It isn't relevant for now but if we decide to support bike rental or bike parking for transfers, this optimization shouldn't apply
application/src/main/java/org/opentripplanner/graph_builder/module/DirectTransferGenerator.java
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I took a look at the functionality. Can you take a look at how the carsAllowedStopMaxTransferDuration is implemented in https://github.com/opentripplanner/OpenTripPlanner/blob/dev-2.x/application/src/main/java/org/opentripplanner/standalone/config/buildconfig/TransferParametersMapper.java and change your implementation to use the build config
application/src/main/java/org/opentripplanner/transit/service/TimetableRepository.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/framework/application/OTPFeature.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/graph_builder/module/DirectTransferGenerator.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/graph_builder/module/DirectTransferGenerator.java
Outdated
Show resolved
Hide resolved
ff5f1af to
576add2
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The build config changes look good. I don't fully understand the realtime aspect of the PR. What kind of realtime updates exist at graph build time that are not in the normal timetables? @miklcct Could you write a short explanation of you use case/goal. It could be that you are trying to do something that is currently not possible.
application/src/main/java/org/opentripplanner/graph_builder/module/DirectTransferGenerator.java
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/graph_builder/module/DirectTransferGenerator.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/opentripplanner/standalone/config/buildconfig/TransferParametersMapper.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/graph_builder/module/DirectTransferGenerator.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/graph_builder/module/DirectTransferGenerator.java
Outdated
Show resolved
Hide resolved
# Conflicts: # application/src/test/java/org/opentripplanner/transit/service/TimetableRepositoryTest.java
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, just a couple comments related to documentation and functionality. I'll take a look at the tests at a later date.
application/src/main/java/org/opentripplanner/graph_builder/module/DirectTransferGenerator.java
Outdated
Show resolved
Hide resolved
...rc/main/java/org/opentripplanner/standalone/config/buildconfig/TransferParametersMapper.java
Outdated
Show resolved
Hide resolved
bikesAllowedStopMaxTransferDuration to build config to limit bike transfers
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In addition to the previous feedback, I found a couple of things related to the tests. When all the changes have been done, I think this PR should be ready
...tion/src/test/java/org/opentripplanner/graph_builder/module/DirectTransferGeneratorTest.java
Outdated
Show resolved
Hide resolved
...tion/src/test/java/org/opentripplanner/graph_builder/module/DirectTransferGeneratorTest.java
Outdated
Show resolved
Hide resolved
application/src/test/java/org/opentripplanner/transit/service/TimetableRepositoryTest.java
Outdated
Show resolved
Hide resolved
|
You should also add the field to this build config (similar to the line I linked) so that it automatically generates documentation: OpenTripPlanner/application/src/test/resources/standalone/config/build-config.json Line 89 in eff71e0
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I found a few things
...rc/main/java/org/opentripplanner/standalone/config/buildconfig/TransferParametersMapper.java
Outdated
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/graph_builder/module/DirectTransferGenerator.java
Show resolved
Hide resolved
application/src/main/java/org/opentripplanner/graph_builder/module/DirectTransferGenerator.java
Show resolved
Hide resolved
# Conflicts: # application/src/test/java/org/opentripplanner/routing/algorithm/GraphRoutingTest.java
# Conflicts: # doc/user/BuildConfiguration.md
Summary
This adds a feature flag to limit the generation of bike transfers to stops serving bikes or empty stops only.
Issue
Improves #6781
Unit tests
Added
Documentation
New build configuration option added
Changelog
Bumping the serialization version id
Not required