adjust speeds to universally use 4/5th of the free-flow speed as expected avg speed

- this is a workaround until we get more thourough work done on the cost model
- this is related to #955 and #989
This commit is contained in:
Dennis Luxen
2014-05-09 11:11:14 +02:00
parent 881a57bf8d
commit 3c5b2286a3
3 changed files with 36 additions and 30 deletions
+12 -12
View File
@@ -1,6 +1,6 @@
@routing @maxspeed @car
Feature: Car - Max speed restrictions
When a max speed is set, osrm will use 2/3 of that as the actual speed.
OSRM will use 4/5 of the projected free-flow speed.
Background: Use specific speeds
Given the profile "car"
@@ -17,8 +17,8 @@ When a max speed is set, osrm will use 2/3 of that as the actual speed.
When I route I should get
| from | to | route | speed |
| a | b | ab | 85 km/h |
| b | c | bc | 40 km/h +- 1 |
| a | b | ab | 67 km/h |
| b | c | bc | 48 km/h +- 1 |
Scenario: Car - Do not ignore maxspeed when higher than way speed
Given the node map
@@ -31,21 +31,21 @@ When a max speed is set, osrm will use 2/3 of that as the actual speed.
When I route I should get
| from | to | route | speed |
| a | b | ab | 25 km/h |
| b | c | bc | 60 km/h +- 1 |
| a | b | ab | 20 km/h |
| b | c | bc | 72 km/h +- 1 |
Scenario: Car - Forward/backward maxspeed
Given a grid size of 100 meters
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 |
| primary | | | | 51 km/h | 51 km/h |
| primary | 60 | | | 48 km/h | 48 km/h |
| primary | | 60 | | 48 km/h | 65 km/h |
| primary | | | 60 | 51 km/h | 48 km/h |
| primary | 15 | 60 | | 48 km/h | 15 km/h +- 1 |
| primary | 15 | | 60 | 12 km/h +- 1| 48 km/h |
| primary | 15 | 30 | 60 | 24 km/h | 48 km/h |
Scenario: Car - Maxspeed should not allow routing on unroutable ways
Then routability should be
+14 -14
View File
@@ -8,17 +8,17 @@ Feature: Car - speeds
Scenario: Car - speed of various way types
Then routability should be
| highway | oneway | bothw |
| motorway | no | 90 km/h |
| motorway_link | no | 75 km/h |
| trunk | no | 85 km/h +- 1 |
| trunk_link | no | 70 km/h +- 1 |
| primary | no | 65 km/h +- 1 |
| primary_link | no | 60 km/h |
| secondary | no | 55 km/h +- 1 |
| secondary_link | no | 50 km/h |
| tertiary | no | 40 km/h |
| tertiary_link | no | 30 km/h |
| unclassified | no | 25 km/h |
| residential | no | 25 km/h |
| living_street | no | 10 km/h |
| service | no | 15 km/h |
| motorway | no | 72 km/h |
| motorway_link | no | 60 km/h |
| trunk | no | 67 km/h +- 1 |
| trunk_link | no | 55 km/h +- 1 |
| primary | no | 52 km/h +- 1 |
| primary_link | no | 48 km/h |
| secondary | no | 43 km/h +- 1 |
| secondary_link | no | 40 km/h |
| tertiary | no | 32 km/h |
| tertiary_link | no | 24 km/h |
| unclassified | no | 20 km/h |
| residential | no | 20 km/h |
| living_street | no | 8 km/h |
| service | no | 12 km/h |