modified comment section, maxspeed, added avoid unpaved/motorways
This commit is contained in:
parent
4fede142dc
commit
973dbae703
1 changed files with 20 additions and 6 deletions
|
@ -22,9 +22,12 @@ assign p_standby = 250 # Watt
|
||||||
# technical parameters
|
# technical parameters
|
||||||
|
|
||||||
assign validForCars = true
|
assign validForCars = true
|
||||||
assign avoid_toll = false # %avoid_toll% Avoid toll roads, if possible
|
|
||||||
assign pass1coefficient = 1.3
|
assign pass1coefficient = 1.3
|
||||||
assign turnInstructionMode = 1 # 0=none, 1=auto-choose, 2=locus-style, 3=osmand-style
|
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
|
# classifier constants
|
||||||
|
|
||||||
|
@ -34,6 +37,15 @@ assign classifier_ferry = 2
|
||||||
|
|
||||||
---context:way # following code refers to way-tags
|
---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
|
# calculate logical car access
|
||||||
#
|
#
|
||||||
|
@ -172,15 +184,17 @@ assign maxspeed_explicit =
|
||||||
if reversedirection=yes then maxspeed_backward else maxspeed_forward
|
if reversedirection=yes then maxspeed_backward else maxspeed_forward
|
||||||
|
|
||||||
assign maxspeed =
|
assign maxspeed =
|
||||||
|
if or is_avoided_toll_road
|
||||||
|
is_avoided_motorway then 0
|
||||||
|
else if is_avoided_unpaved then 4
|
||||||
|
else
|
||||||
min onewayspeedlimit
|
min onewayspeedlimit
|
||||||
min accessspeedlimit
|
min accessspeedlimit
|
||||||
min maxspeed_explicit
|
min maxspeed_explicit
|
||||||
min maxspeed_implicit
|
min maxspeed_implicit
|
||||||
min maxspeed_surface maxspeed_tracktype
|
min maxspeed_surface maxspeed_tracktype
|
||||||
|
|
||||||
#assign costfactor = if equal maxspeed 0 then 10000 else 0
|
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 minspeed =
|
assign minspeed =
|
||||||
switch highway=motorway|motorway_link|trunk 75 0
|
switch highway=motorway|motorway_link|trunk 75 0
|
||||||
|
@ -243,11 +257,11 @@ assign caraccess
|
||||||
motorcar=yes|permissive|designated|destination
|
motorcar=yes|permissive|designated|destination
|
||||||
|
|
||||||
assign initialcost =
|
assign initialcost =
|
||||||
switch and avoid_toll barrier=toll_booth 1000000 #poutnikl push request
|
switch and avoid_toll barrier=toll_booth 1000000
|
||||||
switch caraccess
|
switch caraccess
|
||||||
0
|
0
|
||||||
1000000
|
1000000
|
||||||
|
|
||||||
assign maxspeed =
|
assign maxspeed =
|
||||||
|
|
||||||
if or crossing=traffic_signals highway=traffic_signals
|
if or crossing=traffic_signals highway=traffic_signals
|
||||||
|
|
Loading…
Reference in a new issue