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 support for opposite approach request parameter #6842

Merged
merged 3 commits into from
Apr 3, 2024

Conversation

mjjbell
Copy link
Member

@mjjbell mjjbell commented Apr 2, 2024

Issue

As outlined in #5616, adding support for restricting the waypoint approach to the opposite direction, relative to the input coordinate.

It was included in the original approaches PR (#4039), but dropped due to lack of support at the time.
This is beneficial for VRP use-cases in particular, and is a simple enough addition that I think it's worth supporting.

This PR leverages @asaveljevs changes, I've just added some additional docs and test coverage.

Tasklist

Requirements / Relations

Fixes #5616

@mjjbell mjjbell force-pushed the mbell/opposite_approach branch from 4cab282 to 1d285ad Compare April 2, 2024 22:39
@@ -36,7 +36,8 @@ namespace osrm::engine
enum class Approach : std::uint8_t
{
CURB = 0,
UNRESTRICTED = 1
OPPOSITE = 1,
Copy link
Collaborator

Choose a reason for hiding this comment

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

it's an enum class and it is not likely there are casts from/to integers. Yet, it might make sense to keep value assignments, i.e. to add OPPOSITE = 2.

@DennisOSRM
Copy link
Collaborator

Looks good, only one minor nitpick.

@mjjbell mjjbell merged commit 8ef366e into Project-OSRM:master Apr 3, 2024
20 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

add approach on the opposite side of the road
3 participants