From 67f923b96ee565407c326b3ec72176daf43b878a Mon Sep 17 00:00:00 2001 From: quaelnix <122357328+quaelnix@users.noreply.github.com> Date: Mon, 24 Jul 2023 17:00:49 +0200 Subject: [PATCH 1/3] Implement 'allow_steps' and 'allow_ferries' in fastbike.brf --- misc/profiles2/fastbike.brf | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/misc/profiles2/fastbike.brf b/misc/profiles2/fastbike.brf index c303154..8b9fb79 100644 --- a/misc/profiles2/fastbike.brf +++ b/misc/profiles2/fastbike.brf @@ -253,8 +253,8 @@ assign costfactor switch or highway=tertiary highway=tertiary_link 1.0 switch highway=unclassified switch isunpaved 10 1.1 switch highway=pedestrian 10 - switch highway=steps 1000 - switch route=ferry 5.67 + switch highway=steps switch allow_steps 1000 10000 + switch route=ferry switch allow_ferries 5.67 10000 switch highway=bridleway 5 switch highway=cycleway 1.3 switch isresidentialorliving switch isunpaved 10 1.2 From c38a9186fd9ce4c50a8a3a1063678fe079fb5be7 Mon Sep 17 00:00:00 2001 From: quaelnix <122357328+quaelnix@users.noreply.github.com> Date: Mon, 24 Jul 2023 17:01:04 +0200 Subject: [PATCH 2/3] Remove unused profile options --- misc/profiles2/fastbike.brf | 2 -- 1 file changed, 2 deletions(-) diff --git a/misc/profiles2/fastbike.brf b/misc/profiles2/fastbike.brf index 8b9fb79..effeb57 100644 --- a/misc/profiles2/fastbike.brf +++ b/misc/profiles2/fastbike.brf @@ -22,8 +22,6 @@ assign validForBikes = true assign allow_steps = true # %allow_steps% | Set to false to disallow steps | boolean assign allow_ferries = true # %allow_ferries% | set to false to disallow ferries | boolean assign allow_motorways = false # %allow_motorways% | Set to true to allow motorways (useful in Asia / Oceania for example) | boolean -assign ignore_cycleroutes = false # %ignore_cycleroutes% | Set to true for better elevation results | boolean -assign stick_to_cycleroutes = false # %stick_to_cycleroutes% | Set to true to just follow cycleroutes | boolean assign consider_traffic = false # %consider_traffic% | Activate to avoid traffic | boolean assign consider_noise = false # %consider_noise% | Activate to prefer a low-noise route | boolean From 5ccc6ef766e775117e27c5abcde1ff5dfac41865 Mon Sep 17 00:00:00 2001 From: quaelnix <122357328+quaelnix@users.noreply.github.com> Date: Mon, 24 Jul 2023 17:11:14 +0200 Subject: [PATCH 3/3] Exploit constant expression optimization in fastbike.brf --- misc/profiles2/fastbike.brf | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/profiles2/fastbike.brf b/misc/profiles2/fastbike.brf index effeb57..5c9e6a5 100644 --- a/misc/profiles2/fastbike.brf +++ b/misc/profiles2/fastbike.brf @@ -155,6 +155,8 @@ assign hascycleway = not and ( or cycleway= cycleway=no|none ) and ( or cycleway:left= cycleway:left=no ) ( or cycleway:right= cycleway:right=no ) assign trafficpenalty0 = + if consider_traffic then + ( if highway=primary|primary_link then ( if estimated_traffic_class=4 then 0.2 @@ -179,6 +181,8 @@ assign trafficpenalty0 = else 0 ) else 0 + ) + else 0 assign trafficpenalty = if consider_traffic then