2012-10-05 10:15:47 -04:00
|
|
|
@routing @maxspeed @car
|
|
|
|
Feature: Car - Max speed restrictions
|
2012-10-02 07:22:14 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
Background: Use specific speeds
|
|
|
|
Given the profile "car"
|
|
|
|
Given a grid size of 1000 meters
|
2012-10-02 07:22:14 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
Scenario: Car - Respect maxspeeds when lower that way type speed
|
|
|
|
Given the node map
|
|
|
|
| a | b | c |
|
2012-10-02 07:22:14 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
And the ways
|
|
|
|
| nodes | highway | maxspeed |
|
|
|
|
| ab | trunk | |
|
|
|
|
| bc | trunk | 10 |
|
2012-10-02 07:22:14 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
When I route I should get
|
|
|
|
| from | to | route | time |
|
|
|
|
| a | b | ab | 42s ~10% |
|
2014-02-14 12:23:25 -05:00
|
|
|
| b | c | bc | 545s ~10% |
|
2012-10-02 07:22:14 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
Scenario: Car - Do not ignore maxspeed when higher than way speed
|
|
|
|
Given the node map
|
|
|
|
| a | b | c |
|
2012-10-02 07:22:14 -04:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
And the ways
|
|
|
|
| nodes | highway | maxspeed |
|
|
|
|
| ab | residential | |
|
|
|
|
| bc | residential | 85 |
|
2013-02-03 09:42:14 -05:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
When I route I should get
|
|
|
|
| from | to | route | time |
|
|
|
|
| a | b | ab | 144s ~10% |
|
2014-02-14 12:23:25 -05:00
|
|
|
| b | c | bc | 64s ~10% |
|
2013-08-29 13:29:13 -04:00
|
|
|
|
|
|
|
Scenario: Car - Forward/backward maxspeed
|
2013-02-03 12:13:57 -05:00
|
|
|
Given the shortcuts
|
2013-08-29 13:29:13 -04:00
|
|
|
| key | value |
|
2014-02-14 12:23:25 -05:00
|
|
|
| car-1 | 11s ~10% |
|
|
|
|
| car | 18s ~10% |
|
|
|
|
| run | 110s ~10% |
|
|
|
|
| walk | 220s ~10% |
|
|
|
|
| snail | 1080s ~10% |
|
2013-08-29 13:29:13 -04:00
|
|
|
|
|
|
|
And a grid size of 100 meters
|
|
|
|
|
|
|
|
Then routability should be
|
|
|
|
| maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
|
2014-02-14 12:23:25 -05:00
|
|
|
| | | | car-1 | car-1 |
|
2013-08-29 13:29:13 -04:00
|
|
|
| 10 | | | run | run |
|
2014-02-14 12:23:25 -05:00
|
|
|
| | 10 | | run | car-1 |
|
|
|
|
| | | 10 | car-1 | run |
|
2013-08-29 13:29:13 -04:00
|
|
|
| 1 | 10 | | run | snail |
|
|
|
|
| 1 | | 10 | snail | run |
|
|
|
|
| 1 | 5 | 10 | walk | run |
|
2013-02-03 09:42:14 -05:00
|
|
|
|
2013-08-29 13:29:13 -04:00
|
|
|
Scenario: Car - Maxspeed should not allow routing on unroutable ways
|
|
|
|
Then routability should be
|
|
|
|
| highway | railway | access | maxspeed | maxspeed:forward | maxspeed:backward | bothw |
|
|
|
|
| primary | | | | | | x |
|
|
|
|
| secondary | | no | | | | |
|
|
|
|
| secondary | | no | 100 | | | |
|
|
|
|
| secondary | | no | | 100 | | |
|
|
|
|
| secondary | | no | | | 100 | |
|
|
|
|
| (nil) | train | | | | | |
|
|
|
|
| (nil) | train | | 100 | | | |
|
|
|
|
| (nil) | train | | | 100 | | |
|
|
|
|
| (nil) | train | | | | 100 | |
|
|
|
|
| runway | | | | | | |
|
|
|
|
| runway | | | 100 | | | |
|
|
|
|
| runway | | | | 100 | | |
|
|
|
|
| runway | | | | | 100 | |
|