8000 Profile: switched consider_traffic from hiking-mountain to fastbike by afischerdev · Pull Request #811 · abrensch/brouter · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Profile: switched consider_traffic from hiking-mountain to fastbike #811

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jul 7, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
43 changes: 7 additions & 36 deletions misc/profiles2/fastbike.brf
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ assign allow_steps = true # %allow_steps% | Set to false to disallow
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 consider_traffic = false # %consider_traffic% | Activate to avoid traffic | boolean
assign consider_traffic = 1 # %consider_traffic% | how do you plan to drive the tour? | [1=as cyclist alone in the week, 0.5=as cyclist alone at weekend, 0.3 =with a group of cyclists, 0.1=with a group of cyclists at week-end, 0.0=do not consider traffic]
assign consider_noise = false # %consider_noise% | Activate to prefer a low-noise route | boolean
assign consider_river = false # %consider_river% | Activate to prefer a route along rivers, lakes, etc. | boolean
assign consider_forest = false # %consider_forest% | Activate to prefer a route in forest or parks | boolean
Expand Down Expand Up @@ -154,43 +154,14 @@ assign >
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
else if estimated_traffic_class=5 then 0.4
else if estimated_traffic_class=6|7 then 0.6
else 0
)
else if highway=secondary|secondary_link then
(
if estimated_traffic_class=3 then 0.2
else if estimated_traffic_class=4 then 0.4
else if estimated_traffic_class=5 then 0.6
else if estimated_traffic_class=6|7 then 1
else 0
)
else if highway=tertiary|tertiary_link then
(
if estimated_traffic_class=2 then 0.1
else if estimated_traffic_class=3 then 0.3
else if estimated_traffic_class=4 then 0.5
else if estimated_traffic_class=5|6|7 then 1
else 0
)
else 0
)
else 0

assign trafficpenalty =
if consider_traffic then
(
if hascycleway then min 0.3 trafficpenalty0
else trafficpenalty0
)
else 0
if estimated_traffic_class=|1|2 then 0
else if estimated_traffic_class=3 then multiply 0.3 consider_traffic
else if estimated_traffic_class=4 then multiply 0.6 consider_traffic
else if estimated_traffic_class=5 then multiply 0.9 consider_traffic
else if estimated_traffic_class=6|7 then multiply 1.5 consider_traffic
else 0

assign isresidentialorliving = or highway=residential|living_street living_street=yes

Expand Down
32 changes: 1 addition & 31 deletions misc/profiles2/hiking-mountain.brf
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ assign consider_noise = false # %consider_noise% | Activate to prefe
assign consider_river = false # %consider_river% | Activate to prefer a route along rivers, lakes, etc. | boolean
assign consider_forest = false # %consider_forest% | Activate to prefer a route in forest or green areas| boolean
assign consider_town = false # %consider_town% | Activate to bypass cities / big towns as far as possible | boolean
assign consider_traffic = 1 # %consider_traffic% | how do you plan to drive the tour? | [1=as cyclist alone in the week, 0.5=as cyclist alone at weekend, 0.3 =with a group of cyclists, 0.1=with a group of cyclists at week-end]

assign shortest_way 0 # 0 as default, duplicate shortest standard profile, SAC access limit ignored for now

Expand Down Expand Up @@ -359,36 +358,7 @@ assign town_penalty
switch estimated_town_class=5 1.4
switch estimated_town_class=6 1.6 99 0

assign trafficpenalty =
# if any_cycleway then 0
# else
if highway=primary|primary_link then
(
if estimated_traffic_class=1|2 then 0
else if estimated_traffic_class=3 then multiply 0.4 consider_traffic
else if estimated_traffic_class=4 then multiply 0.8 consider_traffic
else if estimated_traffic_class=5 then multiply 1 consider_traffic
else if estimated_traffic_class=6|7 then multiply 2 consider_traffic
else multiply 0.6 consider_traffic
)
else if highway=secondary|secondary_link then
(
if estimated_traffic_class=1|2 then multiply 0.1 consider_traffic
else if estimated_traffic_class=3 then multiply 0.3 consider_traffic
else if estimated_traffic_class=4 then multiply 0.7 consider_traffic
else if estimated_traffic_class=5 then multiply 1 consider_traffic
else if estimated_traffic_class=6|7 then multiply 1.5 consider_traffic
else multiply 0.2 consider_traffic
)
else if highway=tertiary|tertiary_link then
(
if estimated_traffic_class=1|2 then multiply 0.1 consider_traffic
else if estimated_traffic_class=3 then multiply 0.2 consider_traffic
else if estimated_traffic_class=4 then multiply 0.5 consider_traffic
else multiply if estimated_traffic_class=5|6|7 then multiply 1 consider_traffic
else 0.1 consider_traffic
)
else 0
assign trafficpenalty = 0

assign costfactor
add town_penalty
Expand Down
0