Traffic simulation patch
This commit is contained in:
parent
a35eea8878
commit
91c809e05c
22 changed files with 1595 additions and 83 deletions
125
misc/profiles2/car-traffic_analysis.brf
Normal file
125
misc/profiles2/car-traffic_analysis.brf
Normal file
|
|
@ -0,0 +1,125 @@
|
|||
#
|
||||
# Car-Routing is experimantal !!!
|
||||
#
|
||||
# DO NOT USE FOR ACTUAL NAVIGATION
|
||||
#
|
||||
# Turn restrictions are missing, leading to wrong routes
|
||||
#
|
||||
|
||||
---context:global
|
||||
|
||||
assign downhillcost 0
|
||||
assign downhillcutoff 0
|
||||
assign uphillcost 0
|
||||
assign uphillcutoff 0
|
||||
|
||||
assign validForCars 1
|
||||
|
||||
assign pass1coefficient 0.
|
||||
assign pass2coefficient -1
|
||||
|
||||
---context:way # following code refers to way-tags
|
||||
|
||||
|
||||
assign turncost = 0
|
||||
|
||||
assign initialcost switch route=ferry 20000 0
|
||||
|
||||
|
||||
#
|
||||
# calculate logical car access
|
||||
#
|
||||
assign caraccess
|
||||
switch motorcar=
|
||||
switch motor_vehicle=
|
||||
switch vehicle=
|
||||
switch access=
|
||||
switch or highway=motorway highway=motorway_link 1
|
||||
switch or highway=trunk highway=trunk_link 1
|
||||
switch or highway=primary highway=primary_link 1
|
||||
switch or highway=secondary highway=secondary_link 1
|
||||
switch or highway=tertiary highway=tertiary_link 1
|
||||
switch highway=unclassified 1
|
||||
switch route=ferry 1
|
||||
switch or highway=residential highway=living_street 1
|
||||
switch highway=service 1
|
||||
0
|
||||
or access=yes or access=permissive or access=designated access=destination
|
||||
or vehicle=yes or vehicle=designated vehicle=destination
|
||||
or motor_vehicle=yes or motor_vehicle=permissive or motor_vehicle=designated motor_vehicle=destination
|
||||
or motorcar=yes or motorcar=permissive or motorcar=designated motorcar=destination
|
||||
|
||||
assign accesspenalty
|
||||
switch caraccess
|
||||
0
|
||||
10000
|
||||
|
||||
assign onewaypenalty
|
||||
switch switch reversedirection=yes
|
||||
switch oneway=
|
||||
junction=roundabout
|
||||
or oneway=yes or oneway=true oneway=1
|
||||
oneway=-1
|
||||
10000
|
||||
0.0
|
||||
|
||||
|
||||
assign ispaved or surface=paved or surface=asphalt or surface=concrete surface=paving_stones
|
||||
|
||||
|
||||
assign costfactor
|
||||
|
||||
add max onewaypenalty accesspenalty
|
||||
|
||||
switch and highway= not route=ferry 10000
|
||||
|
||||
switch or highway=motorway highway=motorway_link 1
|
||||
switch or highway=trunk highway=trunk_link 1
|
||||
switch or highway=primary highway=primary_link 1.2
|
||||
switch or highway=secondary highway=secondary_link 1.6
|
||||
switch or highway=tertiary highway=tertiary_link 2.0
|
||||
switch highway=unclassified 2.5
|
||||
switch route=ferry 5.67
|
||||
switch highway=bridleway 5
|
||||
switch or highway=residential highway=living_street 3.5
|
||||
switch highway=service 3.5
|
||||
switch or highway=track or highway=road highway=path
|
||||
switch tracktype=grade1 5
|
||||
switch ispaved 5
|
||||
30
|
||||
10000
|
||||
|
||||
assign trafficsourcedensity =
|
||||
if highway=residential|living_street then 1
|
||||
else if and maxspeed=30|50 highway=tertiary|secondary|primary then 1
|
||||
else 0
|
||||
|
||||
assign istrafficbackbone
|
||||
if greater costfactor 9999 then false
|
||||
else if highway=motorway|motorway_link then true
|
||||
else false
|
||||
|
||||
---context:node # following code refers to node tags
|
||||
|
||||
#
|
||||
# calculate logical car access to nodes
|
||||
#
|
||||
assign caraccess
|
||||
switch motorcar=
|
||||
switch motor_vehicle=
|
||||
switch vehicle=
|
||||
switch access=
|
||||
switch barrier=gate 0
|
||||
switch barrier=bollard 0
|
||||
switch barrier=lift_gate 0
|
||||
switch barrier=cycle_barrier 0
|
||||
1
|
||||
or access=yes or access=permissive or access=designated access=destination
|
||||
or vehicle=yes or vehicle=permissive or vehicle=designated vehicle=destination
|
||||
or motor_vehicle=yes or motor_vehicle=permissive or motor_vehicle=designated motor_vehicle=destination
|
||||
or motorcar=yes or motorcar=permissive or motorcar=designated motorcar=destination
|
||||
|
||||
assign initialcost
|
||||
switch caraccess
|
||||
0
|
||||
1000000
|
||||
7
misc/profiles2/dummy.brf
Normal file
7
misc/profiles2/dummy.brf
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
---context:global # following code refers to global config
|
||||
---context:way # following code refers to way-tags
|
||||
|
||||
assign costfactor
|
||||
switch and highway= not route=ferry 100000
|
||||
|
||||
---context:node # following code refers to node tags
|
||||
201
misc/profiles2/fastbike-lowtraffic.brf
Normal file
201
misc/profiles2/fastbike-lowtraffic.brf
Normal file
|
|
@ -0,0 +1,201 @@
|
|||
#
|
||||
# A fastbike could be a racing bike or a speed pedelec.
|
||||
# But also at night or in rainy whether you might want
|
||||
# to fallback to this one.
|
||||
#
|
||||
# Structure is similar to trekking.brf, see this for documenation.
|
||||
#
|
||||
|
||||
---context:global # following code refers to global config
|
||||
|
||||
# Use the following switches to change behaviour
|
||||
# (1=yes, 0=no):
|
||||
|
||||
assign consider_elevation 1 # set to 0 to ignore elevation in routing
|
||||
assign allow_steps 1 # set to 0 to disallow steps
|
||||
assign allow_ferries 1 # set to 0 to disallow ferries
|
||||
assign ignore_cycleroutes 0 # set to 1 for better elevation results
|
||||
assign stick_to_cycleroutes 0 # set to 1 to just follow cycleroutes
|
||||
assign avoid_unsafe 0 # set to 1 to avoid standard highways
|
||||
|
||||
assign forceSecondaryData 1
|
||||
|
||||
assign validForBikes 1
|
||||
|
||||
# the elevation parameters
|
||||
|
||||
assign downhillcost switch consider_elevation 60 0
|
||||
assign downhillcutoff 1.5
|
||||
assign uphillcost 0
|
||||
assign uphillcutoff 1.5
|
||||
|
||||
---context:way # following code refers to way-tags
|
||||
|
||||
assign any_cycleroute or route_bicycle_icn=yes or route_bicycle_ncn=yes or route_bicycle_rcn=yes route_bicycle_lcn=yes
|
||||
assign nodeaccessgranted or any_cycleroute lcn=yes
|
||||
|
||||
assign ispaved or surface=paved or surface=asphalt or surface=concrete surface=paving_stones
|
||||
assign isunpaved not or surface= or ispaved or surface=fine_gravel surface=cobblestone
|
||||
|
||||
assign turncost 90
|
||||
|
||||
assign initialcost switch route=ferry 10000 0
|
||||
|
||||
#
|
||||
# calculate logical bike access
|
||||
#
|
||||
assign bikeaccess =
|
||||
if any_cycleroute then true
|
||||
else if bicycle= then
|
||||
(
|
||||
if vehicle= then
|
||||
(
|
||||
if access= then not or motorroad=yes highway=footway
|
||||
else if access=private|no then false
|
||||
else true
|
||||
)
|
||||
else not vehicle=private|no
|
||||
)
|
||||
else not bicycle=private|no|dismount
|
||||
|
||||
#
|
||||
# calculate logical foot access
|
||||
#
|
||||
assign footaccess =
|
||||
if bikeaccess then true
|
||||
else if bicycle=dismount then true
|
||||
else if foot= then
|
||||
(
|
||||
if access= then not motorroad=yes
|
||||
else if access=private|no then false
|
||||
else true
|
||||
)
|
||||
else not foot=private|no
|
||||
|
||||
#
|
||||
# if not bike-, but foot-acess, just a moderate penalty,
|
||||
# otherwise access is forbidden
|
||||
#
|
||||
assign accesspenalty =
|
||||
if bikeaccess then 0
|
||||
else if footaccess then 6
|
||||
else 100000
|
||||
|
||||
#
|
||||
# handle one-ways. On primary roads, wrong-oneways should
|
||||
# be close to forbidden, while on other ways we just add
|
||||
# 4 to the costfactor (making it at least 5 - you are allowed
|
||||
# to push your bike)
|
||||
#
|
||||
assign oneway
|
||||
switch oneway=
|
||||
junction=roundabout
|
||||
or oneway=yes or oneway=true oneway=1
|
||||
assign onewaypenalty
|
||||
switch switch reversedirection=yes oneway oneway=-1
|
||||
switch or cycleway=opposite or cycleway=opposite_lane or cycleway=opposite_track oneway:bicycle=no 0
|
||||
switch or highway=primary highway=primary_link 50
|
||||
switch or highway=secondary highway=secondary_link 30
|
||||
switch or highway=tertiary highway=tertiary_link 20
|
||||
6.0
|
||||
0.0
|
||||
|
||||
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 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
|
||||
|
||||
assign trafficpenalty =
|
||||
if hascycleway then multiply -1 max -0.3 multiply -1 trafficpenalty0
|
||||
else trafficpenalty0
|
||||
|
||||
assign costfactor
|
||||
|
||||
add max onewaypenalty accesspenalty
|
||||
add trafficpenalty
|
||||
|
||||
switch and highway= not route=ferry 100000
|
||||
|
||||
switch or highway=motorway highway=motorway_link 100000
|
||||
switch or highway=proposed highway=abandoned 100000
|
||||
switch or highway=trunk highway=trunk_link 10
|
||||
switch or highway=primary highway=primary_link 1.2
|
||||
switch or highway=secondary highway=secondary_link 1.1
|
||||
switch or highway=tertiary highway=tertiary_link 1.0
|
||||
switch highway=unclassified 1.1
|
||||
switch highway=pedestrian 10
|
||||
switch highway=steps 1000
|
||||
switch route=ferry 5.67
|
||||
switch highway=bridleway 5
|
||||
switch highway=cycleway|footway 1.3
|
||||
switch or highway=residential highway=living_street switch isunpaved 10 1.2
|
||||
switch highway=service switch isunpaved 10 1.2
|
||||
switch or highway=track or highway=road or highway=path highway=footway
|
||||
switch tracktype=grade1 switch isunpaved 3 1.2
|
||||
switch tracktype=grade2 switch isunpaved 10 3
|
||||
switch tracktype=grade3 10.0
|
||||
switch tracktype=grade4 20.0
|
||||
switch tracktype=grade5 30.0
|
||||
switch bicycle=designated 1.3
|
||||
switch ispaved 2.0 100.0
|
||||
10.0
|
||||
|
||||
---context:node # following code refers to node tags
|
||||
|
||||
assign defaultaccess
|
||||
switch access=
|
||||
1 # add default barrier restrictions here!
|
||||
switch or access=private access=no
|
||||
0
|
||||
1
|
||||
|
||||
assign bikeaccess
|
||||
or nodeaccessgranted=yes
|
||||
switch bicycle=
|
||||
switch vehicle=
|
||||
defaultaccess
|
||||
switch or vehicle=private vehicle=no
|
||||
0
|
||||
1
|
||||
switch or bicycle=private or bicycle=no bicycle=dismount
|
||||
0
|
||||
1
|
||||
|
||||
assign footaccess
|
||||
or bicycle=dismount
|
||||
switch foot=
|
||||
defaultaccess
|
||||
switch or foot=private foot=no
|
||||
0
|
||||
1
|
||||
|
||||
assign initialcost
|
||||
switch bikeaccess
|
||||
0
|
||||
switch footaccess
|
||||
300
|
||||
1000000
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
---lookupversion:10
|
||||
---minorversion:4
|
||||
---minorversion:5
|
||||
---readvarlength
|
||||
|
||||
---context:way
|
||||
|
|
@ -498,6 +498,14 @@ ramp:wheelchair;0000000439 no
|
|||
ramp:luggage;0000000162 no
|
||||
ramp:luggage;0000000054 yes automatic manual
|
||||
|
||||
estimated_traffic_class;0000000001 1
|
||||
estimated_traffic_class;0000000001 2
|
||||
estimated_traffic_class;0000000001 3
|
||||
estimated_traffic_class;0000000001 4
|
||||
estimated_traffic_class;0000000001 5
|
||||
estimated_traffic_class;0000000001 6
|
||||
estimated_traffic_class;0000000001 7
|
||||
|
||||
---context:node
|
||||
|
||||
highway;0001314954 bus_stop
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue