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

Throw RoutingValidationException if origin and destination are the same #4364

Merged

Conversation

hannesj
Copy link
Contributor

@hannesj hannesj commented Aug 10, 2022

Summary

If the origin and destination share any vertices, the user is already at their destination, and the result is a trivial path.

Issue

Closes #4350

@hannesj hannesj added the bug label Aug 10, 2022
@hannesj hannesj added this to the 2.2 milestone Aug 10, 2022
@hannesj hannesj requested a review from a team as a code owner August 10, 2022 12:04
@optionsome
Copy link
Member

We had a similar check in OTP1. I don't exactly remember why it was removed in upstream but I think I at least removed it in a fork because via point routing. Maybe we should add a TODO here to check for via points once they are implemented.

@hannesj
Copy link
Contributor Author

hannesj commented Aug 11, 2022

Maybe we should add a TODO here to check for via points once they are implemented.

We will have a separate TemporaryVerticesContainer for each segment, so it will not be an issue

@hannesj hannesj merged commit 4749432 into opentripplanner:dev-2.x Aug 11, 2022
@hannesj hannesj deleted the otp2_fix_origin_destinbation_equals branch August 11, 2022 11:20
t2gran pushed a commit that referenced this pull request Aug 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Insane itineraries returned when request origin and destination are same
3 participants