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

Add via to the Transmodel trip query and make a proper Raptor implementation for it #6084

Merged
merged 65 commits into from
Oct 10, 2024

Conversation

t2gran
Copy link
Member

@t2gran t2gran commented Sep 22, 2024

Summary

This PR add back the via search to the Transmodel plan query. It does so by "chaining" Raptor requests. To be able to do this I had to refactor quite a bit. The functional changes is not that big.

This PR changes the Transmodel API and add a via location to the plan request. The passThrough feature works as before, but is merged with the new via API, and the old passThrough arguments are deprecated.

There are a few things left to implement:

  • support for coordinate via locations. This is implemented in Raptor, but there is no module test for it. To implement this "transfers" must be generated between the to Raptor searches. To find all transfer, find the paths for all stops nearby and put all pair of them together to form a transfer (stop A -> coordinate -> stop B).
  • Refactor Raptor passthrough to use the chaning feature. This will allow us to use the pass-through with transit-group-priority and also heuristics. To do this Raptor must support starting a journey on-board witch is useful in other use-cases as well. When this is done, we can remove the existing pass-through implementation.
  • Mixing visit-via and passthrough-via. There is two ways to do it, either by using the existing pass-through (messy setup) or doing the above first, and we will get it for free.
  • Enable the heuristics for pass-through.
  • Add support to GTFS API. @leonardehrenfried Will add this in this PR.
  • Add support to Debug UI
  • Remove relaxCostAtDestination
  • Add support for via in AStar (direct-street)
  • Add information in response for via? There is no tagging for via point in the path/itinerary. This can create problems in e.g. TransferOptimizer.
  • Preserve via results in OptimizedTransfer - this is an existing bug with pass-through as well.

I will create issues for reminding features, when this is merged.

The feature is a bit experimental and need "real life" testing - small changes and bug fixes are expected.

If this PR is too massive, then I can split it - but I believe there is little risk in breaking existing functionality. Splitting it in a pure feature PR and refactorings is difficult.

Issue

Related to : #4887

Unit tests

This PR refactor a lot of code and also add missing unit-test to some of the refactored classes. Almost all new code have unit-tests.

Documentation

✅ The API is documented and all new public classes/methods should have JavaDoc.

Changelog

Bumping the serialization version id

✅ The routing request is changed

@t2gran t2gran added New Feature bump serialization id Add this label if you want the serialization id automatically bumped after merging the PR labels Sep 22, 2024
@t2gran t2gran added this to the 2.7 (next release) milestone Sep 22, 2024
@t2gran t2gran requested a review from a team as a code owner September 22, 2024 19:06
Copy link
Member

@optionsome optionsome left a comment

Choose a reason for hiding this comment

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

I think the resolved comments from me where addressed, but there are still some unresolved comments.

optionsome
optionsome previously approved these changes Oct 10, 2024
@optionsome optionsome added the High Priority High priority for review and issues label Oct 10, 2024
@t2gran t2gran mentioned this pull request Oct 10, 2024
12 tasks
@t2gran t2gran merged commit c5bd91d into opentripplanner:dev-2.x Oct 10, 2024
5 checks passed
@t2gran t2gran deleted the via branch October 10, 2024 15:13
t2gran pushed a commit that referenced this pull request Oct 10, 2024
t2gran pushed a commit that referenced this pull request Oct 10, 2024
t2gran added a commit to entur/OpenTripPlanner-LegacyHSLFork that referenced this pull request Oct 15, 2024
The list of ids inside passThroughPoints is allowed to be empty or null. We cannot
change this - that would be a breaking change. So, when the via search enforced this,
the API was not backward compatible anymore. This commit reverts the behavior and
just ignores the passThroughPoints if the list of ids is null or empty. This bug was
 introduced in PR opentripplanner#6084.
t2gran added a commit to entur/OpenTripPlanner-LegacyHSLFork that referenced this pull request Oct 16, 2024
The list of ids inside passThroughPoints is allowed to be empty or null. We cannot
change this - that would be a breaking change. So, when the via search enforced this,
the API was not backward compatible anymore. This commit reverts the behavior and
just ignores the passThroughPoints if the list of ids is null or empty. This bug was
 introduced in PR opentripplanner#6084.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bump serialization id Add this label if you want the serialization id automatically bumped after merging the PR High Priority High priority for review and issues New Feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants