Fix side road penalties and add test
This commit is contained in:
parent
2b00d92463
commit
b906f2a628
@ -45,3 +45,9 @@ Feature: Car - speeds
|
||||
| primary | 60 | 47 km/h | 47 km/h |
|
||||
| primary | 60 | 47 km/h | 47 km/h |
|
||||
| primary | 60 | 47 km/h | 47 km/h |
|
||||
|
||||
Scenario: Car - Side road penalties
|
||||
Then routability should be
|
||||
|
||||
| highway | side_road | forw | backw | forw_rate | backw_rate |
|
||||
| primary | yes | 64 km/h | 64 km/h | 14 | 14 |
|
||||
|
@ -327,7 +327,7 @@ function Handlers.handle_penalties(way,result,data,profile)
|
||||
local sideroad_penalty = 1.0
|
||||
data.sideroad = way:get_value_by_key("side_road")
|
||||
if "yes" == data.sideroad or "rotary" == data.sideroad then
|
||||
sideroad_penalty = side_road_multiplier;
|
||||
sideroad_penalty = profile.side_road_multiplier
|
||||
end
|
||||
|
||||
local forward_penalty = math.min(service_penalty, width_penalty, alternating_penalty, sideroad_penalty, forward_hov_penalty)
|
||||
|
Loading…
Reference in New Issue
Block a user