Fixing test for opposite directions
This commit is contained in:
parent
b069725df0
commit
7b4b7232fc
@ -1,4 +1,4 @@
|
|||||||
@routing @opposite @todo
|
@routing @opposite
|
||||||
Feature: Separate settings for forward/backward direction
|
Feature: Separate settings for forward/backward direction
|
||||||
|
|
||||||
Background:
|
Background:
|
||||||
@ -7,13 +7,13 @@ Feature: Separate settings for forward/backward direction
|
|||||||
@smallest
|
@smallest
|
||||||
Scenario: Going against the flow
|
Scenario: Going against the flow
|
||||||
Given the node map
|
Given the node map
|
||||||
| a | b |
|
| a | b | c | d |
|
||||||
|
|
||||||
And the ways
|
And the ways
|
||||||
| nodes | highway |
|
| nodes | highway |
|
||||||
| ab | river |
|
| abcd | river |
|
||||||
|
|
||||||
When I route I should get
|
When I route I should get
|
||||||
| from | to | route | distance | time |
|
| from | to | route | distance | time |
|
||||||
| a | b | ab | 100m | 10s |
|
| a | d | abcd | 300 +- 1m | 30s |
|
||||||
| b | a | ab | 100m | 20s |
|
| d | a | abcd | 300 +- 1m | 55s |
|
||||||
|
@ -56,6 +56,12 @@ function way_function (way, numberOfNodesInWay)
|
|||||||
way.speed = speed_profile[highway] or speed_profile['default']
|
way.speed = speed_profile[highway] or speed_profile['default']
|
||||||
end
|
end
|
||||||
|
|
||||||
|
if(highway == "river") then
|
||||||
|
local temp_speed = way.speed;
|
||||||
|
way.speed = temp_speed*3/2
|
||||||
|
way.backward_speed = temp_speed*2/3
|
||||||
|
end
|
||||||
|
|
||||||
if oneway == "no" or oneway == "0" or oneway == "false" then
|
if oneway == "no" or oneway == "0" or oneway == "false" then
|
||||||
way.direction = Way.bidirectional
|
way.direction = Way.bidirectional
|
||||||
elseif oneway == "-1" then
|
elseif oneway == "-1" then
|
||||||
|
Loading…
Reference in New Issue
Block a user