osrm-backend/features/bicycle/turn_penalty.feature

43 lines
1.2 KiB
Gherkin
Raw Permalink Normal View History

2013-02-23 02:33:33 -05:00
@routing @bicycle @turn_penalty
Feature: Turn Penalties
Background:
Given the profile "bicycle"
Given a grid size of 200 meters
2013-02-23 02:33:33 -05:00
2017-05-15 06:46:35 -04:00
Scenario: Bicycle - Turn penalties on cyclability
2017-05-18 08:27:28 -04:00
Given the profile file "bicycle" initialized with
2017-05-15 06:46:35 -04:00
"""
2017-05-18 08:27:28 -04:00
profile.properties.weight_name = 'cyclability'
2017-05-15 06:46:35 -04:00
"""
Given the node map
"""
a--b-----c
|
|
d
e--------f-----------g
/
/
/
h
"""
And the ways
| nodes | highway |
| abc | residential |
| bd | residential |
| efg | residential |
| fh | residential |
When I route I should get
| from | to | distance | weight | # |
| a | c | 900m +- 1 | 216 | Going straight has no penalties |
| a | d | 900m +- 1 | 220.2 | Turning right had penalties |
| e | g | 2100m +- 5| 503.9 | Going straght has no penalties |
| e | h | 2100m +- 5| 515.1 | Turn sharp right has even higher penalties|
2017-05-15 06:46:35 -04:00