2016-01-28 09:26:56 -05:00
|
|
|
@routing @testbot @alternative
|
|
|
|
Feature: Alternative route
|
|
|
|
|
|
|
|
Background:
|
|
|
|
Given the profile "testbot"
|
2017-02-15 09:12:24 -05:00
|
|
|
Given a grid size of 200 meters
|
2018-02-27 17:24:35 -05:00
|
|
|
# Force data preparation to single-threaded to ensure consistent
|
|
|
|
# results for alternative generation during tests (alternative
|
|
|
|
# finding is highly sensitive to graph shape, which is in turn
|
|
|
|
# affected by parallelism during generation)
|
|
|
|
And the contract extra arguments "--threads 1"
|
|
|
|
And the extract extra arguments "--threads 1"
|
|
|
|
And the customize extra arguments "--threads 1"
|
|
|
|
And the partition extra arguments "--threads 1"
|
2016-01-28 09:26:56 -05:00
|
|
|
|
|
|
|
Scenario: Alternative Loop Paths
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a 2 1 b
|
|
|
|
7 4
|
|
|
|
8 3
|
|
|
|
c 5 6 d
|
|
|
|
"""
|
2016-01-28 09:26:56 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| ab | yes |
|
|
|
|
| bd | yes |
|
|
|
|
| dc | yes |
|
|
|
|
| ca | yes |
|
|
|
|
|
|
|
|
And the query options
|
2016-03-30 20:53:36 -04:00
|
|
|
| alternatives | true |
|
2016-01-28 09:26:56 -05:00
|
|
|
|
|
|
|
When I route I should get
|
2016-03-31 19:48:06 -04:00
|
|
|
| from | to | route | alternative |
|
|
|
|
| 1 | 2 | ab,bd,dc,ca,ab,ab | |
|
|
|
|
| 3 | 4 | bd,dc,ca,ab,bd,bd | |
|
|
|
|
| 5 | 6 | dc,ca,ab,bd,dc,dc | |
|
|
|
|
| 7 | 8 | ca,ab,bd,dc,ca,ca | |
|
2017-06-08 07:45:50 -04:00
|
|
|
|
2017-11-20 05:01:30 -05:00
|
|
|
|
2023-08-01 04:24:51 -04:00
|
|
|
@mld
|
2017-11-20 05:01:30 -05:00
|
|
|
Scenario: Alternative loop paths on a single node with an asymmetric circle
|
|
|
|
# The test checks only MLD implementation, alternatives results are unpredictable for CH on windows (#4691, #4693)
|
|
|
|
Given a grid size of 10 meters
|
2017-06-08 07:45:50 -04:00
|
|
|
Given the node map
|
|
|
|
"""
|
2017-11-20 05:01:30 -05:00
|
|
|
a b c
|
|
|
|
l d
|
|
|
|
k e
|
|
|
|
j f
|
|
|
|
i h g
|
2017-06-08 07:45:50 -04:00
|
|
|
"""
|
|
|
|
|
2017-11-20 05:01:30 -05:00
|
|
|
And the nodes
|
|
|
|
| node | barrier |
|
|
|
|
| i | bollard |
|
|
|
|
| g | bollard |
|
|
|
|
|
2017-06-08 07:45:50 -04:00
|
|
|
And the ways
|
2017-11-20 05:01:30 -05:00
|
|
|
| nodes | oneway |
|
|
|
|
| abcdefghijkla | no |
|
2017-06-08 07:45:50 -04:00
|
|
|
|
|
|
|
And the query options
|
|
|
|
| alternatives | true |
|
|
|
|
|
|
|
|
When I route I should get
|
2017-11-20 05:01:30 -05:00
|
|
|
| from | to | route | alternative | weight |
|
|
|
|
| e | k | abcdefghijkla,abcdefghijkla | abcdefghijkla,abcdefghijkla | 6.8 |
|