From a971c2ef374712629fbb19ca63a6b457f3b57e86 Mon Sep 17 00:00:00 2001 From: "Daniel J. Hofmann" Date: Thu, 18 May 2017 16:25:04 +0200 Subject: [PATCH] Applies max turn weight for turns onto restricted weights: no need for custom penalty --- profiles/car.lua | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/profiles/car.lua b/profiles/car.lua index f7bac1bf8..f37562c3a 100644 --- a/profiles/car.lua +++ b/profiles/car.lua @@ -30,9 +30,6 @@ local profile = { speed_reduction = 0.8, traffic_light_penalty = 2, u_turn_penalty = 20, - restricted_penalty = 3000, - -- Note^: abstract value but in seconds correlates approximately to 50 min - -- meaning that a route through a local access way is > 50 min faster than around -- Note: this biases right-side driving. -- Should be inverted for left-driving countries. @@ -413,7 +410,7 @@ function turn_function (turn) if properties.weight_name == 'routability' then -- penalize turns from non-local access only segments onto local access only tags if not turn.source_restricted and turn.target_restricted then - turn.weight = profile.restricted_penalty + turn.weight = properties.max_turn_weight; end end end