diff --git a/misc/profiles2/car-fast.brf b/misc/profiles2/car-fast.brf index d7fa23f..a939a6a 100644 --- a/misc/profiles2/car-fast.brf +++ b/misc/profiles2/car-fast.brf @@ -22,9 +22,12 @@ assign p_standby = 250 # Watt # technical parameters assign validForCars = true -assign avoid_toll = false # %avoid_toll% Avoid toll roads, if possible assign pass1coefficient = 1.3 assign turnInstructionMode = 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osmand-style +assign avoid_toll = 1 # %avoid_toll% | Avoid paid roads | boolean +assign avoid_unpaved = 1 # %avoid_unpaved% | Avoid unpaved roads, if possible | boolean +assign avoid_motorways = 1 # %avoid_motorways% | Avoid motorways | boolean + # classifier constants @@ -34,6 +37,15 @@ assign classifier_ferry = 2 ---context:way # following code refers to way-tags +assign is_avoided_toll_road + and avoid_toll toll=yes + +assign ispaved surface=paved|asphalt|concrete|paving_stones +assign isunpaved not or surface= or ispaved or surface=fine_gravel surface=cobblestone +assign is_avoided_unpaved and avoid_unpaved isunpaved +assign is_avoided_motorway and avoid_motorways highway=motorway + + # # calculate logical car access # @@ -172,15 +184,17 @@ assign maxspeed_explicit = if reversedirection=yes then maxspeed_backward else maxspeed_forward assign maxspeed = + if or is_avoided_toll_road + is_avoided_motorway then 0 + else if is_avoided_unpaved then 4 + else min onewayspeedlimit min accessspeedlimit min maxspeed_explicit min maxspeed_implicit min maxspeed_surface maxspeed_tracktype -#assign costfactor = if equal maxspeed 0 then 10000 else 0 -assign costfactor = if equal maxspeed 0 then 10000 #poutnikl push request - else if and avoid_toll toll=yes then 9999 else 0 +assign costfactor = if equal maxspeed 0 then 10000 else 0 assign minspeed = switch highway=motorway|motorway_link|trunk 75 0 @@ -243,11 +257,11 @@ assign caraccess motorcar=yes|permissive|designated|destination assign initialcost = - switch and avoid_toll barrier=toll_booth 1000000 #poutnikl push request + switch and avoid_toll barrier=toll_booth 1000000 switch caraccess 0 1000000 - + assign maxspeed = if or crossing=traffic_signals highway=traffic_signals