refactor of post-processing
- moves collapse into a dedicated set of functions / files - make collapse scenarios distinct (slight performance cost) - reduce verbosity for short name segments (now actually working, was supposed to do so before)
This commit is contained in:
committed by
Patrick Niklaus
parent
8d83c3adbb
commit
6c3390f14d
@@ -3,6 +3,7 @@ Feature: Alternative route
|
||||
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
Given a grid size of 200 meters
|
||||
|
||||
Scenario: Alternative Loop Paths
|
||||
Given the node map
|
||||
|
||||
@@ -3,6 +3,7 @@ Feature: Basic Routing
|
||||
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
Given a grid size of 100 meters
|
||||
|
||||
@smallest
|
||||
Scenario: A single way with two nodes
|
||||
@@ -145,7 +146,6 @@ Feature: Basic Routing
|
||||
| c | b | bc,bc |
|
||||
|
||||
Scenario: 3 connected triangles
|
||||
Given a grid size of 100 meters
|
||||
Given the node map
|
||||
"""
|
||||
x a b s
|
||||
@@ -178,12 +178,14 @@ Feature: Basic Routing
|
||||
| c | a | ca,ca |
|
||||
| c | b | bc,bc |
|
||||
|
||||
Scenario: To ways connected at a 45 degree angle
|
||||
Scenario: To ways connected at a 90 degree angle
|
||||
Given the node map
|
||||
"""
|
||||
a
|
||||
|
|
||||
b
|
||||
c d e
|
||||
|
|
||||
c----d----e
|
||||
"""
|
||||
|
||||
And the ways
|
||||
@@ -270,7 +272,7 @@ Feature: Basic Routing
|
||||
| de | primary | |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route |
|
||||
| from | to | route |
|
||||
| d | c | de,ce,ce |
|
||||
| e | d | de,de |
|
||||
|
||||
@@ -294,7 +296,7 @@ Feature: Basic Routing
|
||||
Scenario: Ambiguous edge names - Use lexicographically smallest name
|
||||
Given the node map
|
||||
"""
|
||||
a b c
|
||||
a-------b-------c
|
||||
"""
|
||||
|
||||
And the ways
|
||||
|
||||
@@ -3,6 +3,7 @@ Feature: Compass bearing
|
||||
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
Given a grid size of 200 meters
|
||||
|
||||
Scenario: Bearing when going northwest
|
||||
Given the node map
|
||||
|
||||
@@ -64,17 +64,17 @@ Feature: Bearing parameter
|
||||
| ha | yes |
|
||||
|
||||
When I route I should get
|
||||
| from | to | bearings | route | bearing |
|
||||
| 0 | b | 10 10 | bc,bc | 0->0,0->0 |
|
||||
| 0 | b | 90 90 | ab,ab | 0->90,90->0 |
|
||||
| 0 | b | 170 170 | da,da | 0->0,0->0 |
|
||||
| 0 | b | 189 189 | da,da | 0->0,0->0 |
|
||||
| 0 | 1 | 90 270 | ab,bc,cd,cd | 0->90,90->0,0->270,270->0 |
|
||||
| 1 | 2 | 10 10 | bc,bc | 0->0,0->0 |
|
||||
| 1 | 2 | 90 90 | ab,bc,cd,da,ab,ab | 0->90,90->0,0->270,270->180,180->90,90->0 |
|
||||
| 1 | 0 | 189 189 | da,da | 0->180,180->0 |
|
||||
| 1 | 2 | 270 270 | cd,cd | 0->270,270->0 |
|
||||
| 1 | 2 | 349 349 | | |
|
||||
| from | to | bearings | route | bearing |
|
||||
| 0 | b | 10 10 | bc,bc | 0->0,0->0 |
|
||||
| 0 | b | 90 90 | ab,ab | 0->90,90->0 |
|
||||
| 0 | b | 170 170 | da,da | 0->0,0->0 |
|
||||
| 0 | b | 189 189 | da,da | 0->0,0->0 |
|
||||
| 0 | 1 | 90 270 | ab,cd,cd | 0->90,90->0,270->0 |
|
||||
| 1 | 2 | 10 10 | bc,bc | 0->0,0->0 |
|
||||
| 1 | 2 | 90 90 | ab,cd,ab,ab | 0->90,90->0,270->180,90->0 |
|
||||
| 1 | 0 | 189 189 | da,da | 0->180,180->0 |
|
||||
| 1 | 2 | 270 270 | cd,cd | 0->270,270->0 |
|
||||
| 1 | 2 | 349 349 | | |
|
||||
|
||||
Scenario: Testbot - Initial bearing in all direction
|
||||
Given the node map
|
||||
|
||||
@@ -3,6 +3,7 @@ Feature: Choosing fastest route
|
||||
|
||||
Background:
|
||||
Given the profile "testbot"
|
||||
Given a grid size of 200 meters
|
||||
|
||||
Scenario: Pick the geometrically shortest route, way types being equal
|
||||
Given the node map
|
||||
|
||||
@@ -168,9 +168,9 @@ Feature: Testbot - Handle ferry routes
|
||||
| defg | | ferry | 0:02 |
|
||||
|
||||
When I route I should get
|
||||
| from | to | route | time |
|
||||
| a | g | xa,xy,yg,yg | 60s +-25% |
|
||||
| g | a | yg,xy,xa,xa | 60s +-25% |
|
||||
| from | to | route | time |
|
||||
| a | g | xa,xy,yg | 60s +-25% |
|
||||
| g | a | yg,xy,xa | 60s +-25% |
|
||||
|
||||
Scenario: Testbot - Long winding ferry route
|
||||
Given the node map
|
||||
|
||||
@@ -98,6 +98,6 @@ Feature: Avoid weird loops caused by rounding errors
|
||||
| bh | primary |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route |
|
||||
| a,2,d | ab,be,ef,ef,ef,cf,cd,cd |
|
||||
| a,1,d | ab,be,ef,ef,ef,cf,cd,cd |
|
||||
| waypoints | route |
|
||||
| a,2,d | ab,be,ef,ef,ef,cd,cd |
|
||||
| a,1,d | ab,be,ef,ef,ef,cd,cd |
|
||||
|
||||
@@ -56,10 +56,13 @@ Feature: Snap start/end point to the nearest way
|
||||
Scenario: Snap to edge right under start/end point
|
||||
Given the node map
|
||||
"""
|
||||
d e f g
|
||||
c h
|
||||
b i
|
||||
a l k j
|
||||
d e f g
|
||||
|
||||
c h
|
||||
|
||||
b i
|
||||
|
||||
a l k j
|
||||
"""
|
||||
|
||||
And the ways
|
||||
|
||||
@@ -209,7 +209,7 @@ Feature: Estimation of travel time
|
||||
| from | to | route | time |
|
||||
| b | c | abc,abc | 10s +-1 |
|
||||
| c | e | cde,cde | 60s +-1 |
|
||||
| b | d | abc,cde,cde | 40s +-1 |
|
||||
| b | d | abc,cde | 40s +-1 |
|
||||
| a | e | abc,cde,cde | 80s +-1 |
|
||||
|
||||
Scenario: Time of travel on part of a way
|
||||
|
||||
@@ -79,9 +79,9 @@ Feature: Via points
|
||||
| dh |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route |
|
||||
| a,c,f | ab,bcd,bcd,bcd,de,efg,efg |
|
||||
| a,c,f,h | ab,bcd,bcd,bcd,de,efg,efg,efg,gh,gh |
|
||||
| waypoints | route |
|
||||
| a,c,f | ab,bcd,bcd,de,efg |
|
||||
| a,c,f,h | ab,bcd,bcd,de,efg,efg,gh,gh |
|
||||
|
||||
|
||||
Scenario: Duplicate via point
|
||||
@@ -124,12 +124,12 @@ Feature: Via points
|
||||
| fa | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | distance |
|
||||
| 1,3 | ab,bc,cd,cd | 400m +-1 |
|
||||
| 3,1 | cd,de,ef,fa,ab,ab | 1000m +-1 |
|
||||
| 1,2,3 | ab,bc,bc,bc,cd,cd | 400m +-1 |
|
||||
| 1,3,2 | ab,bc,cd,cd,cd,de,ef,fa,ab,bc,bc | 1600m +-1 |
|
||||
| 3,2,1 | cd,de,ef,fa,ab,bc,bc,bc,cd,de,ef,fa,ab,ab | 2400m +-1 |
|
||||
| waypoints | route | distance |
|
||||
| 1,3 | ab,bc,cd | 400m +-1 |
|
||||
| 3,1 | cd,de,ef,fa,ab,ab | 1000m +-1 |
|
||||
| 1,2,3 | ab,bc,bc,cd | 400m +-1 |
|
||||
| 1,3,2 | ab,bc,cd,cd,de,ef,fa,ab,bc | 1600m +-1 |
|
||||
| 3,2,1 | cd,de,ef,fa,ab,bc,bc,cd,de,ef,fa,ab,ab | 2400m +-1 |
|
||||
|
||||
Scenario: Via points on ring on the same oneway
|
||||
# xa it to avoid only having a single ring, which cna trigger edge cases
|
||||
@@ -269,11 +269,11 @@ Feature: Via points
|
||||
| da | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | distance |
|
||||
| 2,1 | ab,bc,cd,da,ab,ab | 1100m +-1 |
|
||||
| 4,3 | bc,cd,da,ab,bc,bc | 1100m +-1 |
|
||||
| 6,5 | cd,da,ab,bc,cd,cd | 1100m +-1 |
|
||||
| 8,7 | da,ab,bc,cd,da,da | 1100m +-1 |
|
||||
| waypoints | route | distance |
|
||||
| 2,1 | ab,bc,cd,da,ab | 1100m +-1 |
|
||||
| 4,3 | bc,cd,da,ab,bc | 1100m +-1 |
|
||||
| 6,5 | cd,da,ab,bc,cd | 1100m +-1 |
|
||||
| 8,7 | da,ab,bc,cd,da | 1100m +-1 |
|
||||
|
||||
Scenario: Multiple Via points on ring on the same oneway, forces one of the vertices to be top node
|
||||
Given the node map
|
||||
@@ -293,10 +293,10 @@ Feature: Via points
|
||||
| da | yes |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | distance |
|
||||
| 3,2,1 | ab,bc,cd,da,ab,ab,ab,bc,cd,da,ab,ab | 3000m +-1 |
|
||||
| 6,5,4 | bc,cd,da,ab,bc,bc,bc,cd,da,ab,bc,bc | 3000m +-1 |
|
||||
| 9,8,7 | cd,da,ab,bc,cd,cd,cd,da,ab,bc,cd,cd | 3000m +-1 |
|
||||
| waypoints | route | distance |
|
||||
| 3,2,1 | ab,bc,cd,da,ab,ab,ab,bc,cd,da,ab | 3000m +-1 |
|
||||
| 6,5,4 | bc,cd,da,ab,bc,bc,bc,cd,da,ab,bc | 3000m +-1 |
|
||||
| 9,8,7 | cd,da,ab,bc,cd,cd,cd,da,ab,bc,cd | 3000m +-1 |
|
||||
|
||||
# See issue #2706
|
||||
# this case is currently broken. It simply works as put here due to staggered intersections triggering a name collapse.
|
||||
|
||||
@@ -29,12 +29,12 @@ Feature: Weight tests
|
||||
| cde |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | a:weight |
|
||||
| s,t | abc,cde,cde | 1.1:2:2:1 |
|
||||
| waypoints | route | a:weight |
|
||||
| s,t | abc,cde | 1.1:2:2:1 |
|
||||
|
||||
When I route I should get
|
||||
| waypoints | route | times | weight_name | weights |
|
||||
| s,t | abc,cde,cde | 3.1s,3s,0s | duration | 3.1,3,0 |
|
||||
| waypoints | route | times | weight_name | weights |
|
||||
| s,t | abc,cde | 6.1s,0s | duration | 6.1,0 |
|
||||
|
||||
# FIXME include/engine/guidance/assemble_geometry.hpp:95
|
||||
Scenario: Start and target on the same and adjacent edge
|
||||
|
||||
Reference in New Issue
Block a user