osrm-backend/features/testbot/multi_level_routing.feature

149 lines
5.3 KiB
Gherkin
Raw Normal View History

2017-03-12 14:19:57 -04:00
@routing @testbot @mld
Feature: Multi level routing
Background:
Given the profile "testbot"
And the partition extra arguments "--small-component-size 1 --max-cell-sizes 4,16,64"
2017-03-12 14:19:57 -04:00
Scenario: Testbot - Multi level routing check partition
Given the node map
"""
abef
dc hg
ij mn
lkpo
"""
And the ways
| nodes | highway |
| abcda | primary |
| efghe | primary |
| ijkli | primary |
| nmop | primary |
| cm | primary |
| hj | primary |
| kp | primary |
| be | primary |
And the data has been extracted
When I run "osrm-partition --max-cell-sizes 4,16 --small-component-size 1 {processed_file}"
2017-03-12 14:19:57 -04:00
Then it should exit successfully
And stdout should not contain "level 1 #cells 1 bit size 1"
Scenario: Testbot - Multi level routing
Given the node map
"""
ab ef
dc hg
ij mn
lkpo
"""
2017-07-01 15:57:28 -04:00
And the nodes
| node | highway |
| i | traffic_signals |
| n | traffic_signals |
2017-03-12 14:19:57 -04:00
And the ways
| nodes | highway |
| abcda | primary |
| efghe | primary |
| ijkli | primary |
2017-07-01 15:57:28 -04:00
| mnopm | primary |
2017-03-12 14:19:57 -04:00
| cm | primary |
| hj | primary |
| kp | primary |
When I route I should get
2017-07-01 15:57:28 -04:00
| from | to | route | time |
| a | b | abcda,abcda | 20s |
| a | f | abcda,cm,mnopm,kp,ijkli,hj,efghe,efghe | 229.4s |
| a | l | abcda,cm,mnopm,kp,ijkli,ijkli | 144.7s |
| a | o | abcda,cm,mnopm,mnopm,mnopm | 124.7s |
| f | l | efghe,hj,ijkli,ijkli,ijkli | 124.7s |
| f | o | efghe,hj,ijkli,kp,mnopm,mnopm | 144.7s |
| l | o | ijkli,kp,mnopm,mnopm | 60s |
| c | m | cm,cm | 44.7s |
2017-03-12 14:19:57 -04:00
When I request a travel time matrix I should get
| | a | f | l | o |
2017-07-01 15:57:28 -04:00
| a | 0 | 229.4 | 144.7 | 124.7 |
| f | 229.4 | 0 | 124.7 | 144.7 |
| l | 144.7 | 124.7 | 0 | 60 |
| o | 124.7 | 144.7 | 60 | 0 |
2017-03-12 14:19:57 -04:00
Scenario: Testbot - Multi level routing: horizontal road
Given the node map
"""
ab ef
dc hg
ijkl
mn qr
pots
"""
And the ways
| nodes | highway |
| abcda | primary |
| efghe | primary |
| mnopm | primary |
| qrstq | primary |
| ijkl | primary |
| dim | primary |
| glr | primary |
| ot | secondary |
When I route I should get
| from | to | route | time |
| a | b | abcda,abcda | 20s |
| a | d | abcda,abcda | 20s |
| a | l | abcda,dim,ijkl,ijkl | 100s |
| a | p | abcda,dim,mnopm,mnopm | 80s |
| a | o | abcda,dim,mnopm,mnopm | 100s |
| a | t | abcda,dim,mnopm,ot,ot | 140s |
| a | s | abcda,dim,ijkl,glr,qrstq,qrstq | 140s |
| a | f | abcda,dim,ijkl,glr,efghe,efghe | 140s |
Scenario: Testbot - Multi level routing: route over internal cell edge hf
Given the node map
"""
ab
dcef
hgij
lk
"""
And the partition extra arguments "--small-component-size 1 --max-cell-sizes 4,16"
2017-03-12 14:19:57 -04:00
And the ways
| nodes | maxspeed |
| abcda | 5 |
| efghe | 5 |
| ijkli | 5 |
| eg | 10 |
| ce | 15 |
| ch | 15 |
| fi | 15 |
| gi | 15 |
| hf | 100 |
When I route I should get
| from | to | route | time |
| a | k | abcda,ch,hf,fi,ijkli,ijkli | 724.3s |