2018-04-20 18:18:55 -04:00
|
|
|
@matrix @testbot @ch
|
2015-01-01 09:12:45 -05:00
|
|
|
Feature: Basic Distance Matrix
|
2018-04-20 18:18:55 -04:00
|
|
|
# note that results of travel distance are in metres
|
2015-01-01 09:12:45 -05:00
|
|
|
|
|
|
|
Background:
|
|
|
|
Given the profile "testbot"
|
2017-10-10 06:33:32 -04:00
|
|
|
And the partition extra arguments "--small-component-size 1 --max-cell-sizes 2,4,8,16"
|
2015-01-01 09:12:45 -05:00
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
Scenario: Testbot - Travel distance matrix of minimal network
|
2015-01-01 09:12:45 -05:00
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b
|
|
|
|
"""
|
2015-01-01 09:12:45 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| ab |
|
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b |
|
|
|
|
| a | 0 | 100+-1 |
|
|
|
|
| b | 100+-1 | 0 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
Scenario: Testbot - Travel distance matrix of minimal network with toll exclude
|
|
|
|
Given the query options
|
|
|
|
| exclude | toll |
|
2015-01-01 14:19:41 -05:00
|
|
|
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
2018-04-20 18:18:55 -04:00
|
|
|
a b
|
|
|
|
c d
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
2015-01-01 14:19:41 -05:00
|
|
|
|
|
|
|
And the ways
|
2018-04-20 18:18:55 -04:00
|
|
|
| nodes | highway | toll | # |
|
|
|
|
| ab | motorway | | not drivable for exclude=motorway |
|
|
|
|
| cd | primary | | always drivable |
|
|
|
|
| ac | primary | yes | not drivable for exclude=toll and exclude=motorway,toll |
|
|
|
|
| bd | motorway | yes | not drivable for exclude=toll and exclude=motorway,toll |
|
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b | c | d |
|
|
|
|
| a | 0 | 100+-1 | | |
|
|
|
|
| b | 100+-1 | 0 | | |
|
|
|
|
| c | | | 0 | 100+-1 |
|
|
|
|
| d | | | 100+-1 | 0 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
Scenario: Testbot - Travel distance matrix of minimal network with motorway exclude
|
|
|
|
Given the query options
|
|
|
|
| exclude | motorway |
|
2016-01-07 04:33:47 -05:00
|
|
|
|
2015-01-01 14:19:41 -05:00
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b
|
2018-04-20 18:18:55 -04:00
|
|
|
c d
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
2015-01-01 14:19:41 -05:00
|
|
|
|
|
|
|
And the ways
|
2018-04-20 18:18:55 -04:00
|
|
|
| nodes | highway | # |
|
|
|
|
| ab | motorway | not drivable for exclude=motorway |
|
|
|
|
| cd | residential | |
|
|
|
|
| ac | residential | |
|
|
|
|
| bd | residential | |
|
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b | c | d |
|
|
|
|
| a | 0 | 300+-2 | 100+-2 | 200+-2 |
|
2015-01-01 14:19:41 -05:00
|
|
|
|
2016-01-07 04:33:47 -05:00
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
Scenario: Testbot - Travel distance matrix of minimal network disconnected motorway exclude
|
|
|
|
Given the query options
|
|
|
|
| exclude | motorway |
|
|
|
|
And the extract extra arguments "--small-component-size 4"
|
|
|
|
|
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
ab efgh
|
|
|
|
cd
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | # |
|
|
|
|
| be | motorway | not drivable for exclude=motorway |
|
|
|
|
| abcd | residential | |
|
|
|
|
| efgh | residential | |
|
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b | e |
|
|
|
|
| a | 0 | 50+-1 | |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
|
|
|
|
Scenario: Testbot - Travel distance matrix of minimal network with motorway and toll excludes
|
|
|
|
Given the query options
|
|
|
|
| exclude | motorway,toll |
|
|
|
|
|
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
a b e f
|
|
|
|
c d g h
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway | toll | # |
|
|
|
|
| be | motorway | | not drivable for exclude=motorway |
|
|
|
|
| dg | primary | yes | not drivable for exclude=toll |
|
|
|
|
| abcd | residential | | |
|
|
|
|
| efgh | residential | | |
|
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b | e | g |
|
|
|
|
| a | 0 | 100+-1 | | |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
Scenario: Testbot - Travel distance matrix with different way speeds
|
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
a b c d
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | highway |
|
|
|
|
| ab | primary |
|
|
|
|
| bc | secondary |
|
|
|
|
| cd | tertiary |
|
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b | c | d |
|
|
|
|
| a | 0 | 100+-1 | 200+-1 | 300+-1 |
|
|
|
|
| b | 100+-1 | 0 | 100+-1 | 200+-1 |
|
|
|
|
| c | 200+-1 | 100+-1 | 0 | 100+-1 |
|
|
|
|
| d | 300+-1 | 200+-1 | 100+-1 | 0 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b | c | d |
|
|
|
|
| a | 0 | 100+-1 | 200+-1 | 300+-1 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a |
|
|
|
|
| a | 0 |
|
|
|
|
| b | 100+-1 |
|
|
|
|
| c | 200+-1 |
|
|
|
|
| d | 300+-1 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
Scenario: Testbot - Travel distance matrix of small grid
|
2015-01-01 14:19:41 -05:00
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c
|
|
|
|
d e f
|
|
|
|
"""
|
2015-01-01 14:19:41 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| abc |
|
|
|
|
| def |
|
|
|
|
| ad |
|
|
|
|
| be |
|
|
|
|
| cf |
|
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b | e | f |
|
|
|
|
| a | 0 | 100+-1 | 200+-1 | 300+-1 |
|
|
|
|
| b | 100+-1 | 0 | 100+-1 | 200+-1 |
|
|
|
|
| e | 200+-1 | 100+-1 | 0 | 100+-1 |
|
|
|
|
| f | 300+-1 | 200+-1 | 100+-1 | 0 |
|
2015-01-01 14:19:41 -05:00
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
Scenario: Testbot - Travel distance matrix of network with unroutable parts
|
2015-01-01 14:19:41 -05:00
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b
|
|
|
|
"""
|
2015-01-01 14:19:41 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| ab | yes |
|
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b |
|
|
|
|
| a | 0 | 100+-1 |
|
|
|
|
| b | | 0 |
|
2016-01-07 04:33:47 -05:00
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
Scenario: Testbot - Travel distance matrix of network with oneways
|
2015-01-01 14:19:41 -05:00
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
x a b y
|
|
|
|
d e
|
|
|
|
"""
|
2015-01-01 14:19:41 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| abeda | yes |
|
|
|
|
| xa | |
|
|
|
|
| by | |
|
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | x | y | d | e |
|
|
|
|
| x | 0 | 300+-2 | 400+-2 | 300+-2 |
|
|
|
|
| y | 500+-2 | 0 | 300+-2 | 200+-2 |
|
|
|
|
| d | 200+-2 | 300+-2 | 0 | 300+-2 |
|
|
|
|
| e | 300+-2 | 400+-2 | 100+-2 | 0 |
|
2015-11-05 12:28:00 -05:00
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
Scenario: Testbot - Rectangular travel distance matrix
|
2015-11-05 12:28:00 -05:00
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c
|
|
|
|
d e f
|
|
|
|
"""
|
2015-11-05 12:28:00 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| abc |
|
|
|
|
| def |
|
|
|
|
| ad |
|
|
|
|
| be |
|
|
|
|
| cf |
|
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b | e | f |
|
|
|
|
| a | 0 | 100+-1 | 200+-1 | 300+-1 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a |
|
|
|
|
| a | 0 |
|
|
|
|
| b | 100+-1 |
|
|
|
|
| e | 200+-1 |
|
|
|
|
| f | 300+-1 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b | e | f |
|
|
|
|
| a | 0 | 100+-1 | 200+-1 | 300+-1 |
|
|
|
|
| b | 100+-1 | 0 | 100+-1 | 200+-1 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b |
|
|
|
|
| a | 0 | 100+-1 |
|
|
|
|
| b | 100+-1 | 0 |
|
|
|
|
| e | 200+-1 | 100+-1 |
|
|
|
|
| f | 300+-1 | 200+-1 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b | e | f |
|
|
|
|
| a | 0 | 100+-1 | 200+-1 | 300+-1 |
|
|
|
|
| b | 100+-1 | 0 | 100+-1 | 200+-1 |
|
|
|
|
| e | 200+-1 | 100+-1 | 0 | 100+-1 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b | e |
|
|
|
|
| a | 0 | 100+-1 | 200+-1 |
|
|
|
|
| b | 100+-1 | 0 | 100+-1 |
|
|
|
|
| e | 200+-1 | 100+-1 | 0 |
|
|
|
|
| f | 300+-1 | 200+-1 | 100+-1 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b | e | f |
|
|
|
|
| a | 0 | 100+-1 | 200+-1 | 300+-1 |
|
|
|
|
| b | 100+-1 | 0 | 100+-1 | 200+-1 |
|
|
|
|
| e | 200+-1 | 100+-1 | 0 | 100+-1 |
|
|
|
|
| f | 300+-1 | 200+-1 | 100+-1 | 0 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
|
|
|
|
Scenario: Testbot - Travel distance 3x2 matrix
|
2015-12-02 12:11:15 -05:00
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b c
|
|
|
|
d e f
|
|
|
|
"""
|
2015-12-02 12:11:15 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| abc |
|
|
|
|
| def |
|
|
|
|
| ad |
|
|
|
|
| be |
|
|
|
|
| cf |
|
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | b | e | f |
|
|
|
|
| a | 100+-1 | 200+-1 | 300+-1 |
|
|
|
|
| b | 0 | 100+-1 | 200+-1 |
|
2015-12-01 20:46:29 -05:00
|
|
|
|
2016-01-07 04:33:47 -05:00
|
|
|
Scenario: Testbot - All coordinates are from same small component
|
2015-12-01 20:46:29 -05:00
|
|
|
Given a grid size of 300 meters
|
|
|
|
Given the extract extra arguments "--small-component-size 4"
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b f
|
|
|
|
d e g
|
|
|
|
"""
|
2015-12-01 20:46:29 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| ab |
|
|
|
|
| be |
|
|
|
|
| ed |
|
|
|
|
| da |
|
2015-12-10 11:37:41 -05:00
|
|
|
| fg |
|
2015-12-01 20:46:29 -05:00
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | f | g |
|
|
|
|
| f | 0 | 300+-2 |
|
|
|
|
| g | 300+-2 | 0 |
|
2015-12-10 11:37:41 -05:00
|
|
|
|
2016-01-07 04:33:47 -05:00
|
|
|
Scenario: Testbot - Coordinates are from different small component and snap to big CC
|
2015-12-10 11:37:41 -05:00
|
|
|
Given a grid size of 300 meters
|
|
|
|
Given the extract extra arguments "--small-component-size 4"
|
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a b f h
|
|
|
|
d e g i
|
|
|
|
"""
|
2015-12-10 11:37:41 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| ab |
|
|
|
|
| be |
|
|
|
|
| ed |
|
|
|
|
| da |
|
|
|
|
| fg |
|
|
|
|
| hi |
|
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
When I route I should get
|
|
|
|
| from | to | distance |
|
|
|
|
| f | g | 300m |
|
|
|
|
| f | i | 300m |
|
|
|
|
| g | f | 300m |
|
|
|
|
| g | h | 300m |
|
|
|
|
| h | g | 300m |
|
|
|
|
| h | i | 300m |
|
|
|
|
| i | f | 300m |
|
|
|
|
| i | h | 300m |
|
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | f | g | h | i |
|
|
|
|
| f | 0 | 300+-2 | 0 | 300+-2 |
|
|
|
|
| g | 300+-2 | 0 | 300+-2 | 0 |
|
|
|
|
| h | 0 | 300+-2 | 0 | 300+-2 |
|
|
|
|
| i | 300+-2 | 0 | 300+-2 | 0 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
Scenario: Testbot - Travel distance matrix with loops
|
2016-01-07 04:33:47 -05:00
|
|
|
Given the node map
|
2016-09-30 03:33:08 -04:00
|
|
|
"""
|
|
|
|
a 1 2 b
|
|
|
|
d 4 3 c
|
|
|
|
"""
|
2016-01-07 04:33:47 -05:00
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| ab | yes |
|
|
|
|
| bc | yes |
|
|
|
|
| cd | yes |
|
|
|
|
| da | yes |
|
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | 1 | 2 | 3 | 4 |
|
|
|
|
| 1 | 0 | 100+-1 | 400+-1 | 500+-1 |
|
|
|
|
| 2 | 700+-1 | 0 | 300+-1 | 400+-1 |
|
|
|
|
| 3 | 400+-1 | 500+-1 | 0 | 100+-1 |
|
|
|
|
| 4 | 300+-1 | 400+-1 | 700+-1 | 0 |
|
2017-01-19 16:52:09 -05:00
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
Scenario: Testbot - Travel distance matrix based on segment durations
|
2017-05-18 08:27:28 -04:00
|
|
|
Given the profile file
|
2017-01-19 16:52:09 -05:00
|
|
|
"""
|
2017-05-18 08:27:28 -04:00
|
|
|
local functions = require('testbot')
|
|
|
|
functions.setup_testbot = functions.setup
|
|
|
|
|
|
|
|
functions.setup = function()
|
|
|
|
local profile = functions.setup_testbot()
|
|
|
|
profile.traffic_signal_penalty = 0
|
|
|
|
profile.u_turn_penalty = 0
|
|
|
|
return profile
|
|
|
|
end
|
|
|
|
|
|
|
|
functions.process_segment = function(profile, segment)
|
2017-01-19 16:52:09 -05:00
|
|
|
segment.weight = 2
|
|
|
|
segment.duration = 11
|
|
|
|
end
|
2017-05-18 08:27:28 -04:00
|
|
|
|
|
|
|
return functions
|
2017-01-19 16:52:09 -05:00
|
|
|
"""
|
|
|
|
|
|
|
|
And the node map
|
|
|
|
"""
|
|
|
|
a-b-c-d
|
|
|
|
.
|
|
|
|
e
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
2018-04-20 18:18:55 -04:00
|
|
|
| nodes |
|
|
|
|
| abcd |
|
|
|
|
| ce |
|
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b | c | d | e |
|
|
|
|
| a | 0 | 100+-2 | 200+-2 | 300+-2 | 400+-2 |
|
|
|
|
| b | 100+-2 | 0 | 100+-2 | 200+-2 | 300+-2 |
|
|
|
|
| c | 200+-2 | 100+-2 | 0 | 100+-2 | 200+-2 |
|
|
|
|
| d | 300+-2 | 200+-2 | 100+-2 | 0 | 300+-2 |
|
|
|
|
| e | 400+-2 | 300+-2 | 200+-2 | 300+-2 | 0 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
Scenario: Testbot - Travel distance matrix for alternative loop paths
|
2017-05-18 08:27:28 -04:00
|
|
|
Given the profile file
|
2017-01-19 16:52:09 -05:00
|
|
|
"""
|
2017-05-18 08:27:28 -04:00
|
|
|
local functions = require('testbot')
|
|
|
|
functions.setup_testbot = functions.setup
|
|
|
|
|
|
|
|
functions.setup = function()
|
|
|
|
local profile = functions.setup_testbot()
|
|
|
|
profile.traffic_signal_penalty = 0
|
|
|
|
profile.u_turn_penalty = 0
|
|
|
|
profile.weight_precision = 3
|
|
|
|
return profile
|
|
|
|
end
|
|
|
|
|
|
|
|
functions.process_segment = function(profile, segment)
|
2017-01-19 16:52:09 -05:00
|
|
|
segment.weight = 777
|
|
|
|
segment.duration = 3
|
|
|
|
end
|
2017-05-18 08:27:28 -04:00
|
|
|
|
|
|
|
return functions
|
2017-01-19 16:52:09 -05:00
|
|
|
"""
|
|
|
|
And the node map
|
|
|
|
"""
|
|
|
|
a 2 1 b
|
|
|
|
7 4
|
|
|
|
8 3
|
|
|
|
c 5 6 d
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes | oneway |
|
|
|
|
| ab | yes |
|
|
|
|
| bd | yes |
|
|
|
|
| dc | yes |
|
|
|
|
| ca | yes |
|
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 |
|
|
|
|
| 1 | 0 | 1100+-5 | 300+-5 | 200+-5 | 600+-5 | 500+-5 | 900+-5 | 800+-5 |
|
|
|
|
| 2 | 100+-5 | 0 | 400+-5 | 300+-5 | 700+-5 | 600+-5 | 1000+-5 | 900+-5 |
|
|
|
|
| 3 | 900+-5 | 800+-5 | 0 | 1100+-5 | 300+-5 | 200+-5 | 600+-5 | 500+-5 |
|
|
|
|
| 4 | 1000+-5 | 900+-5 | 100+-5 | 0 | 400+-5 | 300+-5 | 700+-5 | 600+-5 |
|
|
|
|
| 5 | 600+-5 | 500+-5 | 900+-5 | 800+-5 | 0 | 1100+-5 | 300+-5 | 200+-5 |
|
|
|
|
| 6 | 700+-5 | 600+-5 | 1000+-5 | 900+-5 | 100+-5 | 0 | 400+-5 | 300+-5 |
|
|
|
|
| 7 | 300+-5 | 200+-5 | 600+-5 | 500+-5 | 900+-5 | 800+-5 | 0 | 1100+-5 |
|
|
|
|
| 8 | 400+-5 | 300+-5 | 700+-5 | 600+-5 | 1000+-5 | 900+-5 | 100+-5 | 0 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
Scenario: Testbot - Travel distance matrix with ties
|
|
|
|
Given the node map
|
2017-09-27 09:17:47 -04:00
|
|
|
"""
|
|
|
|
a b
|
|
|
|
|
|
|
|
c d
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
2018-04-20 18:18:55 -04:00
|
|
|
| nodes |
|
|
|
|
| ab |
|
|
|
|
| ac |
|
|
|
|
| bd |
|
|
|
|
| dc |
|
2017-09-27 09:17:47 -04:00
|
|
|
|
2018-04-20 18:18:55 -04:00
|
|
|
When I route I should get
|
|
|
|
| from | to | route | distance | time | weight |
|
|
|
|
| a | c | ac,ac | 200m | 20s | 20 |
|
2017-09-27 09:17:47 -04:00
|
|
|
|
|
|
|
When I route I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| from | to | route | distance |
|
|
|
|
| a | b | ab,ab | 300m +- 1 |
|
|
|
|
| a | c | ac,ac | 200m |
|
|
|
|
| a | d | ab,bd,bd | 500m +- 1 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a | b | c | d |
|
|
|
|
| a | 0 | 300+-2 | 200+-2 | 500+-2 |
|
2018-04-20 18:18:55 -04:00
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
2018-04-25 11:00:13 -04:00
|
|
|
| | a |
|
|
|
|
| a | 0 |
|
|
|
|
| b | 300+-2 |
|
|
|
|
| c | 200+-2 |
|
|
|
|
| d | 500+-2 |
|
|
|
|
|
|
|
|
|
|
|
|
# Check rounding errors
|
|
|
|
Scenario: Testbot - Long distances in tables
|
|
|
|
Given a grid size of 1000 meters
|
|
|
|
Given the node map
|
|
|
|
"""
|
|
|
|
a b c d
|
|
|
|
"""
|
|
|
|
|
|
|
|
And the ways
|
|
|
|
| nodes |
|
|
|
|
| abcd |
|
|
|
|
|
|
|
|
When I request a travel distance matrix I should get
|
|
|
|
| | a | b | c | d |
|
|
|
|
| a | 0 | 1000+-3 | 2000+-3 | 3000+-3 |
|