compute turn penalties in lua profiles

This commit is contained in:
Emil Tin
2013-02-23 08:33:33 +01:00
committed by DennisOSRM
parent 53af4ee39f
commit f9abfbf68a
7 changed files with 95 additions and 15 deletions
+3 -3
View File
@@ -58,6 +58,6 @@ Feature: Bike - Handle ferry routes
| abcd | | ferry | yes | 1:00 |
When I route I should get
| from | to | route | time |
| a | d | abcd | 3600s +-1 |
| d | a | abcd | 3600s +-1 |
| from | to | route | time |
| a | d | abcd | 3600s +-10 |
| d | a | abcd | 3600s +-10 |
+33
View File
@@ -0,0 +1,33 @@
@routing @bicycle @turn_penalty
Feature: Turn Penalties
Background:
Given the profile "turnbot"
Scenario: Bike - turns should incur a delay that depend on the angle
Given the node map
| c | d | e |
| b | j | f |
| a | s | g |
And the ways
| nodes |
| sj |
| ja |
| jb |
| jc |
| jd |
| je |
| jf |
| jg |
When I route I should get
| from | to | route | time | distance |
| s | a | sj,ja | 39s +-1 | 242m +-1 |
| s | b | sj,jb | 30s +-1 | 200m +-1 |
| s | c | sj,jc | 29s +-1 | 242m +-1 |
| s | d | sj,jd | 20s +-1 | 200m +-1 |
| s | e | sj,je | 29s +-1 | 242m +-1 |
| s | f | sj,jf | 30s +-1 | 200m +-1 |
| s | g | sj,jg | 39s +-1 | 242m +-1 |