Open t2gran opened 2 weeks ago
Attention: Patch coverage is 92.15686%
with 12 lines
in your changes missing coverage. Please review.
Project coverage is 69.51%. Comparing base (
67e6510
) to head (9b4b7fe
). Report is 60 commits behind head on dev-2.x.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
This PR is improving the group-by
filter, reminding improvements is documented her https://github.com/opentripplanner/OpenTripPlanner/issues/5923
Summary
The MaxLimit filter in GroupByFilter in the ItineraryListFilterChain did only look at
generalized-cost
when it reduced the number of itineraries in each group. This problematic because the itinerary with the best number of transfers or good alternatives for transit-groups could be lost. The new McMaxLimit filter will look at all pareto criterias used in the Raptor search and keep at least one optimal result for each criteria, before limiting the result to N itineraries.To enable this the
OTPFeature.MultiCriteriaGroupMaxFilter
must be set in otp-config.json.Issue
There is no issue for this, but one case we have seen at Entur is:
The alternative with two legs with the same agency is filtered away, in favor of a slightly better cost alternative with two legs with different agencies. The first leg is the same, but because of the switch to another agency the customer has to bye two tickets and have no guarantee in case of delays. So we want both options to be shown.
This is related to #5436 and #3833.
Unit tests
✅ All new business logic has unit-tests with 100% coverage.
Documentation
✅ There is extensive JavaDoc documentation, and a little bit of explaination on the new OTPFeature to enable this behaivour. OTP will work as before, if the feature is not enabled in config.
Changelog
✅ This is a minor improvment
Bumping the serialization version id
🟥 Not needed