-
-
Notifications
You must be signed in to change notification settings - Fork 3.9k
Contractor rewrite #7442
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
base: master
Are you sure you want to change the base?
Contractor rewrite #7442
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,45 @@ | ||
| @routing @testbot @self-loop | ||
| Feature: Self-loops | ||
| Background: | ||
| Given the profile "testbot" | ||
|
|
||
| Scenario: Waypoints on same edge with approaches | ||
| Given the node map | ||
| """ | ||
| 4 3 | ||
| a-------b | ||
| 1 2 | ||
| """ | ||
|
|
||
| And the ways | ||
| | nodes | highway | | ||
| | ab | residential | | ||
|
|
||
| When I route I should get | ||
| | waypoints | approaches | route | | ||
| | 1,2 | curb curb | ab,ab | | ||
| | 2,3 | curb curb | ab,ab,ab | | ||
| | 3,4 | curb curb | ab,ab | | ||
| | 4,1 | curb curb | ab,ab,ab | | ||
| | 4,3 | curb curb | ab,ab,ab,ab | | ||
| | 3,2 | curb curb | ab,ab,ab | | ||
| | 2,1 | curb curb | ab,ab,ab,ab | | ||
| | 1,4 | curb curb | ab,ab,ab | | ||
|
|
||
|
|
||
| Scenario: Waypoints on same edge with bearings | ||
| Given the node map | ||
| """ | ||
| 4 3 | ||
| a-------b | ||
| 1 2 | ||
| """ | ||
|
|
||
| And the ways | ||
| | nodes | highway | | ||
| | ab | residential | | ||
|
|
||
| When I route I should get | ||
| | waypoints | bearings | route | | ||
| | 2,1 | 90 90 | ab,ab,ab,ab | | ||
| | 4,3 | 270 270 | ab,ab,ab,ab | |
| Original file line number | Diff line number | Diff line change | ||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -15,6 +15,7 @@ | |||||||||||||||||
| #include "util/coordinate_calculation.hpp" | ||||||||||||||||||
| #include "util/guidance/entry_class.hpp" | ||||||||||||||||||
| #include "util/guidance/turn_lanes.hpp" | ||||||||||||||||||
| #include "util/log.hpp" | ||||||||||||||||||
| #include "util/typedefs.hpp" | ||||||||||||||||||
|
|
||||||||||||||||||
| #include <cstddef> | ||||||||||||||||||
|
|
@@ -153,6 +154,11 @@ inline std::vector<RouteStep> assembleSteps(const datafacade::BaseDataFacade &fa | |||||||||||||||||
| {intersection}, | ||||||||||||||||||
| is_left_hand_driving}); | ||||||||||||||||||
|
|
||||||||||||||||||
| #ifndef NDEBUG | ||||||||||||||||||
| util::Log(logDEBUG) << "pushing RouteStep of duration " | ||||||||||||||||||
| << from_alias<double>(segment_duration) / 10.; | ||||||||||||||||||
|
Comment on lines
156
to
+159
|
||||||||||||||||||
| util::Log(logDEBUG) << "pushing RouteStep of duration " | |
| << from_alias<double>(segment_duration) / 10.; | |
| #if defined(ENABLE_DEBUG_LOGGING) || !defined(NDEBUG) | |
| util::Log(logDEBUG) << "pushing RouteStep of duration " | |
| << from_alias<double>(segment_duration) / 10.; | |
| #endif |
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 this API, the boolean vector is still named
node_is_contractable, but the rest of the PR consistently uses “contractible” (is_contractible,node_is_contractible_, etc.). Renaming the parameter improves consistency and avoids having both spellings in the public header.