osrm-backend/features/car/maxspeed.feature

66 lines
3.6 KiB
Gherkin
Raw Normal View History

@routing @maxspeed @car
Feature: Car - Max speed restrictions
2014-03-27 13:22:04 -04:00
When a max speed is set, osrm will use 2/3 of that as the actual speed.
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 | |
2014-03-27 13:22:04 -04:00
| bc | trunk | 60 |
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 | speed |
| a | b | ab | 85 km/h |
| b | c | bc | 40 km/h +- 1 |
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 | |
2014-03-27 13:22:04 -04:00
| bc | residential | 90 |
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 | speed |
| a | b | ab | 25 km/h |
| b | c | bc | 60 km/h +- 1 |
2013-08-29 13:29:13 -04:00
Scenario: Car - Forward/backward maxspeed
2014-03-27 13:22:04 -04:00
Given a grid size of 100 meters
2013-08-29 13:29:13 -04:00
Then routability should be
| highway | maxspeed | maxspeed:forward | maxspeed:backward | forw | backw |
| primary | | | | 65 km/h | 65 km/h |
| primary | 60 | | | 40 km/h | 40 km/h |
| primary | | 60 | | 40 km/h | 65 km/h |
| primary | | | 60 | 65 km/h | 40 km/h |
| primary | 15 | 60 | | 40 km/h | 10 km/h +- 1 |
| primary | 15 | | 60 | 10 km/h +- 1| 40 km/h |
| primary | 15 | 30 | 60 | 20 km/h | 40 km/h |
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 | |