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
|
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
|
|
|
|
|
|
|
@4111
|
|
|
|
Scenario: Alternative Loop Paths with single node path
|
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
a1b2c3d
|
|
|
|
|
|
|
|
|
|
|
|
e f
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | maxspeed |
|
|
|
|
| ab | 30 |
|
|
|
|
| bc | 3 |
|
|
|
|
| cd | 30 |
|
|
|
|
| ae | 30 |
|
|
|
|
| ef | 30 |
|
|
|
|
| fd | 30 |
|
|
|
|
|
|
|
|
And the query options
|
|
|
|
| alternatives | true |
|
|
|
|
|
|
|
|
When I route I should get
|
|
|
|
| from | to | route | alternative |
|
2017-05-31 07:46:47 -04:00
|
|
|
| b | c | bc,bc | ab,ae,ef,fd,cd,cd |
|
|
|
|
#| c | b | bc,bc | cd,fd,ef,ae,ab,ab | # alternative path depends on phantom snapping order
|
2017-06-08 07:45:50 -04:00
|
|
|
| 1 | c | ab,bc,bc | ab,ae,ef,fd,cd,cd |
|
|
|
|
#| c | 1 | bc,ab | cd,fd,ef,ae,ab | # alternative path depends on phantom snapping order
|
|
|
|
| 2 | c | bc,bc | |
|
|
|
|
| c | 2 | bc,bc | |
|
|
|
|
| 1 | 3 | ab,ae,ef,fd,cd | ab,bc,cd |
|
|
|
|
#| 3 | 1 | cd,fd,ef,ae,ab | cd,bc,ab | # alternative path depends on phantom snapping order
|
|
|
|
| b | 3 | bc,cd | ab,ae,ef,fd,cd |
|
|
|
|
#| 3 | b | cd,bc,bc | cd,fd,ef,ae,ab,ab | # alternative path depends on phantom snapping order
|