# *** Running profile v2 - road and path running *** # # A rework of brouter_running_profile.brf. Same intent - avoid traffic, avoid # stopping, prefer even surfaces, keep it flat - but with the cost mechanics # rebuilt. The original is left untouched; the substantive changes are: # # 1. uphillcostfactor is derived from costfactor instead of being the constant # 2.5. As a constant it *replaced* the way cost on every climb, so a # primary road with no pavement cost 2.50 uphill against 13.00 on the flat # - 5x cheaper - and on any sustained climb every way type collapsed to the # same number. The profile was blind to what you were running on exactly # where it was making its biggest decisions. # # 2. Traffic lights are actually avoided now. The original only matched # `highway=crossing` + `crossing=traffic_signals`, so a plain junction # signal - `highway=traffic_signals`, which is most of them - cost nothing. # # 3. Access is checked before the traffic-light branch. The original returned # the signal penalty first, so a crossing tagged foot=no cost 700 instead # of being blocked. # # 4. consider_river and consider_forest default to false. When the estimate # tag is absent they charged their *maximum* (2 and 1), so every way in the # country picked up a flat +3 that discriminated between nothing: the # spread from the best way to a primary road was 3.3x instead of 10x. # Turn them on only after checking those tags exist in your region, with # processUnusedTags = true. # # 5. Surface, smoothness and terrain are multipliers, and the ones that # describe the same property are combined with max rather than multiplied. # Added penalties are proportionally brutal on the cheap ways and barely # felt by the expensive ones, which quietly reorders the way classes. # # 6. Nothing is excluded that you could actually run on. sac_scale=hiking is # a T1 walking path - the original banned it outright. Trunk roads and # steps are priced high rather than forbidden, because an exclusion cannot # be traded against anything and strands the router at short gaps. # # Every number is a parameter and can be edited in BRouter-Web's profile panel. ---context:global # following code refers to global config assign validForFoot = true assign validForBikes = false # ============================================ # MOST COMMONLY ADJUSTED SETTINGS # ============================================ # --- Stopping ------------------------------------------------------------- assign avoid_traffic_lights = true # %avoid_traffic_lights% | Avoid traffic signals | boolean assign traffic_signal_penalty = 700 # %traffic_signal_penalty% | Cost (in m) of a traffic signal, at a junction or a crossing | number assign crossing_penalty = 60 # %crossing_penalty% | Cost (in m) of an unsignalled road crossing | number assign consider_crossings = true # %consider_crossings% | Charge more where the road being crossed is a big one | boolean # --- Traffic -------------------------------------------------------------- assign consider_traffic = true # %consider_traffic% | Consider estimated motor traffic | boolean assign no_sidewalk_penalty = 1.6 # %no_sidewalk_penalty% | Extra cost multiplier for a road with no pavement | number assign road_initialcost = 150 # %road_initialcost% | One-off cost (in m) for stepping onto a road with no pavement | number # --- Surface -------------------------------------------------------------- # Multipliers, not additions. 1.0 = as good as asphalt. assign gravel_multiplier = 1.4 # %gravel_multiplier% | Cost multiplier on gravel | number assign softground_multiplier = 1.2 # %softground_multiplier% | Cost multiplier on ground / dirt / earth. Easy on the joints, so barely penalised | number assign cobblestone_multiplier = 1.6 # %cobblestone_multiplier% | Cost multiplier on cobblestone / sett - uneven, rolls ankles | number assign sand_multiplier = 3.0 # %sand_multiplier% | Cost multiplier on sand | number assign iswet = true # %iswet% | Assume wet conditions, so mud-prone surfaces get worse | boolean assign wet_multiplier = 2.0 # %wet_multiplier% | Extra multiplier on mud-prone surfaces when wet | number # --- Ankle safety --------------------------------------------------------- # A hard block, not a penalty: nothing can outweigh it, so it will refuse to # route rather than send you over one bad stretch. That is the point, but it # means routing can fail where the only link is rough. See the note in the # way section for exactly what it blocks and what it cannot see. assign avoid_ankle_risk = false # %avoid_ankle_risk% | Completely block ankle-turning terrain: loose or uneven stone (rock, pebblestone, cobblestone, sett), mud, smoothness bad or worse, sac_scale mountain_hiking or harder, rutted tracks (grade4/5), and paths with bad or no visible tread. Only sees ways that carry those tags | boolean # Stricter still, for coming back from an injury: nothing but firm, even # ground. Blocks every surface except asphalt, concrete, paved, paving stones, # fine gravel and compacted - so no loose gravel, no dirt, no grass, no roots. # Untagged ways are judged by type: an untagged footway or cycleway is assumed # surfaced, an untagged path or track is assumed not. Use together with # avoid_ankle_risk, not instead of it. assign require_even_surface = false # %require_even_surface% | Firm even ground only - blocks loose gravel, dirt, grass and untagged paths as well. For returning from injury | boolean # --- Hills ---------------------------------------------------------------- assign consider_elevation = true # %consider_elevation% | Favour flat routes | boolean assign uphillcost = 180 # %uphillcost% | Cost per metre climbed | number assign uphillcutoff = 1.5 # %uphillcutoff% | Gradients below this percent are not counted | number assign downhillcost = 100 # %downhillcost% | Cost per metre descended - descents are what hurt knees | number assign downhillcutoff = 3.0 # %downhillcutoff% | Gradients below this percent are not counted | number assign uphill_multiplier = 2.5 # %uphill_multiplier% | Way cost multiplied by this on sustained climbs | number assign downhill_multiplier = 1.8 # %downhill_multiplier% | Way cost multiplied by this on sustained descents | number # --- Turns ---------------------------------------------------------------- assign turncost_base = 120 # %turncost_base% | Cost (in m) of a 90-degree turn. The stock value is 90; raise it for longer straights and fewer decisions | number # --- What to keep off the route ------------------------------------------- assign allow_steps = true # %allow_steps% | Allow steps. Usually fine on foot, and sometimes the only way through | boolean assign steps_cost = 6 # %steps_cost% | Cost of steps when allowed | number assign allow_ferries = false # %allow_ferries% | Allow ferries | boolean assign trunk_cost = 60 # %trunk_cost% | Cost of a trunk road with no pavement. High rather than forbidden, so a short gap can still be crossed | number # ============================================ # LESS COMMON SETTINGS # ============================================ assign require_lit = false # %require_lit% | Strongly prefer lit ways, for running in the dark | boolean assign unlit_multiplier = 2.0 # %unlit_multiplier% | Cost multiplier on unlit ways when require_lit is set | number assign consider_noise = true # %consider_noise% | Prefer quiet routes | boolean # These two charge their MAXIMUM when the estimate tag is missing, which in # regions without the data means a flat surcharge on every single way and no # discrimination at all. Check the tags exist before switching them on. assign consider_river = false # %consider_river% | Prefer routes along rivers and lakes. Only useful where estimated_river_class exists in the data | boolean assign consider_forest = false # %consider_forest% | Prefer routes through forest and parks. Only useful where estimated_forest_class exists in the data | boolean assign consider_town = false # %consider_town% | Bypass built-up areas | boolean assign add_beeline = false # %add_beeline% | Enable beeline on distant start/end points | boolean # ============================================ # ELEVATION MODEL # ============================================ assign downhillcost = if consider_elevation then downhillcost else 0 assign uphillcost = if consider_elevation then uphillcost else 0 assign elevationpenaltybuffer = 3 # %elevationpenaltybuffer% | Elevation (m) buffered before any cost applies | number assign elevationmaxbuffer = 8 # %elevationmaxbuffer% | Above this buffer (m) full elevation cost applies | number assign elevationbufferreduce = 1.0 # %elevationbufferreduce% | Rate (slope %) at which the buffer converts to cost | number # ============================================ # ENGINE SETTINGS # ============================================ # Kinematic parameters. BRouter's model is built for bikes, so the travel # times it produces on foot are indicative only - the routing itself does not # depend on them. assign totalMass = 75 # %totalMass% | Runner mass (kg), for travel time | number assign maxSpeed = 15 # %maxSpeed% | Maximum speed (km/h), for travel time | number assign S_C_x = 0.4 # %S_C_x% | Drag coefficient times area (m^2), for travel time | number assign C_r = 0.04 # %C_r% | Rolling resistance, for travel time | number assign bikerPower = 250 # %bikerPower% | Average power (W), for travel time | number # pass1coefficient / pass2coefficient are deliberately not set. The original # set pass2coefficient = 0 with a comment saying that disables the second pass, # but the developers' guide says a value < 0 disables a pass - 0 would instead # set the heuristic to zero, which is plain Dijkstra and slower, not faster. # Rather than guess, leave both at the engine defaults. assign turnInstructionMode = 1 # %turnInstructionMode% | Mode for generated turn instructions | [0=none, 1=auto-choose, 2=locus-style, 3=osmand-style, 4=comment-style, 5=gpsies-style, 6=orux-style, 7=locus-old-style] assign turnInstructionCatchingRange = 40 # %turnInstructionCatchingRange% | Distance (m) within which turn instructions are merged | number assign turnInstructionRoundabouts = true # %turnInstructionRoundabouts% | Special instructions for roundabouts | boolean assign considerTurnRestrictions = false # %considerTurnRestrictions% | Turn restrictions rarely apply on foot | boolean assign processUnusedTags = false # %processUnusedTags% | Set true to list every tag present in the data, to check which estimates your region actually has | boolean ---context:way # following code refers to way-tags # classifier constants assign classifier_none = 1 assign classifier_ferry = 2 assign classifier_road = 3 # # --------------------------------------------------------------------------- # What you are running on # --------------------------------------------------------------------------- # assign is_offroad = highway=footway|path|pedestrian|cycleway|steps|track|bridleway assign has_sidewalk = or sidewalk=yes|both|left|right or sidewalk:both=yes or sidewalk:left=yes sidewalk:right=yes assign isresidentialorliving = or highway=residential|living_street living_street=yes assign any_hiking_route = if route_hiking_iwn=yes then true else if route_hiking_nwn=yes then true else if route_hiking_rwn=yes then true else if route_hiking_lwn=yes then true else if route_foot_nwn=yes then true else if route_foot_lwn=yes then true else if route_foot_rwn=yes then true else false assign nodeaccessgranted = if any_hiking_route then true else highway=footway|path|pedestrian # # --------------------------------------------------------------------------- # Surface. Note this is a runner's ranking, not a cyclist's: fine gravel and # compacted are as good as asphalt and easier on the joints, dirt and grass # are barely penalised, and the things that get punished are the ones that # turn an ankle or swallow a foot. # --------------------------------------------------------------------------- # assign is_mudprone = surface=ground|dirt|earth|grass|mud|clay|unpaved assign surface_multiplier = if ( surface= ) then 1.0 else if ( surface=asphalt|concrete|paved ) then 1.0 else if ( surface=fine_gravel|compacted ) then 1.0 else if ( surface=paving_stones|grass_paver ) then 1.15 else if ( surface=wood ) then 1.3 else if ( surface=ground|dirt|earth|unpaved ) then softground_multiplier else if ( surface=grass|clay ) then 1.4 else if ( surface=gravel ) then gravel_multiplier else if ( surface=metal ) then 1.5 else if ( surface=sett|cobblestone ) then cobblestone_multiplier else if ( surface=pebblestone ) then 1.8 else if ( surface=rock|stone ) then 2.5 else if ( surface=mud ) then 2.5 else if ( surface=sand ) then sand_multiplier else 1.3 assign wet_surface_multiplier = if ( and iswet is_mudprone ) then wet_multiplier else 1.0 assign smoothness_multiplier = if ( smoothness= ) then 1.0 else if ( smoothness=excellent|very_good|good ) then 1.0 else if ( smoothness=intermediate|medium ) then 1.1 else if ( smoothness=bad|poor|rough ) then 1.6 else if ( smoothness=very_bad|robust_wheels|high_clearance|off_road_wheels ) then 2.2 else if ( smoothness=horrible|very_horrible ) then 4.0 else if ( smoothness=impassable ) then 10000 else 1.0 # sac_scale describes walking terrain, so unlike in a bike profile it is the # right signal here. T1 (hiking) is an ordinary walking path and is what a # runner wants; only the grades that genuinely need hands and equipment are # out of reach. mtb:scale is deliberately ignored - it grades bike # technicality, which says little about whether a way runs well. assign terrain_multiplier = if ( sac_scale=alpine_hiking|demanding_alpine_hiking|difficult_alpine_hiking ) then 10000 else if ( sac_scale=demanding_mountain_hiking ) then 20 else if ( sac_scale=mountain_hiking ) then 6 else if ( sac_scale=hiking|T1-hiking|yes ) then 1.3 else if ( trail_visibility=no|horrible ) then 15 else if ( trail_visibility=bad ) then 6 else if ( trail_visibility=intermediate ) then 2 else if ( informal=yes ) then 1.5 else 1.0 # tracktype is often the only surface hint a forest track carries assign tracktype_multiplier = if ( tracktype= ) then 1.0 else if ( tracktype=grade1 ) then 1.0 else if ( tracktype=grade2 ) then 1.1 else if ( tracktype=grade3 ) then 1.4 else if ( tracktype=grade4 ) then 1.8 else if ( tracktype=grade5 ) then 2.2 else 1.0 # # Ankle safety. Everything above is a penalty that can be traded off against # distance; this is a wall. It gathers the tags that mean "you can put a foot # wrong here" - loose or uneven stone, mud, poor smoothness, real mountain # terrain, rutted tracks, and paths with no visible tread. # # Two honest limits. It can only block ways that are *tagged*: an unmapped # rocky trail with no surface, smoothness or sac_scale is invisible to it and # will still be routed. And because it is an exclusion, no detour is too long # to avoid it - if the only link out of somewhere is cobbled, routing will # fail rather than take it. # assign ankle_risk = or surface=rock|stone|pebblestone|sett|cobblestone|mud or smoothness=bad|poor|rough|very_bad|horrible|very_horrible|impassable|robust_wheels|high_clearance|off_road_wheels or sac_scale=mountain_hiking|demanding_mountain_hiking|alpine_hiking|demanding_alpine_hiking|difficult_alpine_hiking|yes or trail_visibility=bad|horrible|no tracktype=grade4|grade5 assign ankle_multiplier = if ( and avoid_ankle_risk ankle_risk ) then 10000 else 1.0 # # The stricter layer: firm, even ground only. An untagged way cannot be # judged by its surface, so it is judged by its type instead - a footway or # cycleway with no surface tag is almost always surfaced, a path or track # with no surface tag almost always is not. # assign is_even_surface = surface=asphalt|concrete|paved|paving_stones|fine_gravel|compacted assign even_surface_multiplier = if ( not require_even_surface ) then 1.0 else if ( is_even_surface ) then 1.0 else if ( not surface= ) then 10000 else if ( highway=path|track|bridleway ) then 10000 else 1.0 # surface, smoothness, tracktype and terrain are four competing answers to # "how rough is this underfoot", so they combine with max. Multiplying them # counts one fact four times. Wetness and lighting are independent dimensions, # so those multiply. The ankle block joins the max group, where 10000 wins # over anything else by construction. assign roughness_multiplier = max surface_multiplier max smoothness_multiplier max tracktype_multiplier max terrain_multiplier max ankle_multiplier even_surface_multiplier assign lit_multiplier = if ( and require_lit not lit=yes|24/7|automatic|sunset-sunrise ) then unlit_multiplier else 1.0 assign condition_multiplier = multiply roughness_multiplier multiply wet_surface_multiplier lit_multiplier # # --------------------------------------------------------------------------- # Surroundings. Multipliers as well, and capped where you are already off the # carriageway - traffic beside a footpath is a reason to pick between two # footpaths, not a reason to leave the footpath. # --------------------------------------------------------------------------- # assign traffic_multiplier switch consider_traffic switch estimated_traffic_class= 1.0 switch estimated_traffic_class=1|2 1.1 switch estimated_traffic_class=3 1.25 switch estimated_traffic_class=4 1.5 switch estimated_traffic_class=5 1.8 switch estimated_traffic_class=6|7 2.2 1.0 1.0 assign traffic_multiplier = if is_offroad then min 1.1 traffic_multiplier else if has_sidewalk then min 1.5 traffic_multiplier else traffic_multiplier assign noise_multiplier switch consider_noise switch estimated_noise_class= 1.0 switch estimated_noise_class=1 1.05 switch estimated_noise_class=2 1.1 switch estimated_noise_class=3 1.2 switch estimated_noise_class=4 1.3 switch estimated_noise_class=5 1.4 switch estimated_noise_class=6 1.5 1.0 1.0 assign noise_multiplier = if is_offroad then min 1.15 noise_multiplier else noise_multiplier assign environment_multiplier = multiply traffic_multiplier noise_multiplier # The estimate-based preferences below are additive because they express a # *pull* toward something rather than a property of the way. They are off by # default: with the tag absent they charge their maximum, which is a flat # surcharge on everything and no discrimination at all. assign no_river_penalty switch consider_river switch estimated_river_class= 2 switch estimated_river_class=1 1.3 switch estimated_river_class=2 1 switch estimated_river_class=3 0.7 switch estimated_river_class=4 0.4 switch estimated_river_class=5 0.1 switch estimated_river_class=6 0 0 0 assign no_forest_penalty switch consider_forest switch estimated_forest_class= 1 switch estimated_forest_class=1 0.5 switch estimated_forest_class=2 0.4 switch estimated_forest_class=3 0.25 switch estimated_forest_class=4 0.15 switch estimated_forest_class=5 0.1 switch estimated_forest_class=6 0 0 0 assign town_penalty switch consider_town switch estimated_town_class= 0 switch estimated_town_class=1 0.5 switch estimated_town_class=2 0.9 switch estimated_town_class=3 1.2 switch estimated_town_class=4 1.3 switch estimated_town_class=5 1.4 switch estimated_town_class=6 1.6 0 0 # # --------------------------------------------------------------------------- # Turn cost. The original said it minimised turns but left the stock 90. # --------------------------------------------------------------------------- # assign turncost = if junction=roundabout|circular then 0 else turncost_base # # --------------------------------------------------------------------------- # Access # --------------------------------------------------------------------------- # assign defaultaccess = if access= then not motorroad=yes else if access=private|no then false else true assign footaccess = if foot= then defaultaccess else not foot=private|no|use_sidepath assign accesspenalty = if footaccess then 0 else 10000 # # One-ways essentially never bind on foot, so no cost is applied. badoneway is # still computed because the voice-hint bitmask below reads it. # assign badoneway = if reversedirection=yes then if oneway= then junction=roundabout else oneway=yes|true|1 else oneway=-1 assign onewaypenalty = 0.0 # # --------------------------------------------------------------------------- # Initial costs, charged once when the classifier changes. Stepping onto a # road with no pavement costs something regardless of how briefly. # --------------------------------------------------------------------------- # assign is_exposed_road = and highway=primary|primary_link|secondary|secondary_link|tertiary|tertiary_link|unclassified|trunk|trunk_link not has_sidewalk assign initialclassifier = if route=ferry then classifier_ferry else if is_exposed_road then classifier_road else classifier_none assign initialcost = if ( equal initialclassifier classifier_ferry ) then 10000 else if ( equal initialclassifier classifier_road ) then road_initialcost else 0 # # --------------------------------------------------------------------------- # Base cost per highway type. Surface is no longer folded in here - it is the # condition multiplier above - so these are "what kind of way is this". # --------------------------------------------------------------------------- # assign costfactor_highway = if ( route=ferry ) then ( if allow_ferries then 8 else 10000 ) else if ( highway=steps ) then ( if allow_steps then steps_cost else 500 ) else if ( highway=footway ) then 1.0 else if ( highway=pedestrian ) then 1.0 else if ( highway=path ) then 1.1 else if ( highway=cycleway ) then 1.3 else if ( highway=track ) then 1.4 else if ( highway=bridleway ) then 1.8 else if ( isresidentialorliving ) then ( if has_sidewalk then 1.4 else multiply 1.4 no_sidewalk_penalty ) else if ( highway=service ) then ( if has_sidewalk then 1.7 else multiply 1.7 no_sidewalk_penalty ) else if ( highway=unclassified ) then ( if has_sidewalk then 2.0 else multiply 2.0 no_sidewalk_penalty ) else if ( highway=tertiary|tertiary_link ) then ( if has_sidewalk then 2.5 else multiply 2.5 no_sidewalk_penalty ) else if ( highway=secondary|secondary_link ) then ( if has_sidewalk then 3.5 else multiply 3.5 no_sidewalk_penalty ) else if ( highway=primary|primary_link ) then ( if has_sidewalk then 5.0 else multiply 5.0 no_sidewalk_penalty ) else if ( highway=trunk|trunk_link ) then ( if has_sidewalk then 8.0 else trunk_cost ) else if ( highway=road|corridor ) then 2.0 else 3.0 # # --------------------------------------------------------------------------- # The cost factor # --------------------------------------------------------------------------- # assign costfactor if ( and highway= not route=ferry ) then 10000 # motorways are not runnable and generally not legal on foot else if ( highway=motorway|motorway_link ) then 10000 else if ( highway=proposed|abandoned|construction|raceway|services|bus_stop|elevator|via_ferrata ) then 10000 else min 9999 add town_penalty add no_forest_penalty add no_river_penalty add max onewaypenalty accesspenalty multiply costfactor_highway multiply condition_multiplier environment_multiplier # # Derived from costfactor, never constant. A constant here replaces the way # cost on every slope, which flattens every way type to the same number # exactly where the profile is working hardest. # assign uphillcostfactor = min 9999 multiply costfactor uphill_multiplier assign downhillcostfactor = min 9999 multiply costfactor downhill_multiplier # # --------------------------------------------------------------------------- # way priorities used for voice hint generation # --------------------------------------------------------------------------- # assign priorityclassifier = if ( highway=motorway ) then 30 else if ( highway=motorway_link ) then 29 else if ( highway=trunk ) then 28 else if ( highway=trunk_link ) then 27 else if ( highway=primary ) then 26 else if ( highway=primary_link ) then 25 else if ( highway=secondary ) then 24 else if ( highway=secondary_link ) then 23 else if ( highway=tertiary ) then 22 else if ( highway=tertiary_link ) then 21 else if ( highway=unclassified ) then 20 else if ( isresidentialorliving ) then 8 else if ( highway=service ) then 6 else if ( highway=footway|pedestrian ) then 10 else if ( highway=path ) then 8 else if ( highway=cycleway ) then 6 else if ( highway=track ) then if tracktype=grade1 then 6 else 4 else if ( highway=bridleway|road ) then 4 else if ( highway=steps ) then 2 else 0 assign isbadoneway = badoneway assign isgoodoneway = if reversedirection=yes then oneway=-1 else if oneway= then junction=roundabout else oneway=yes|true|1 assign isroundabout = junction=roundabout assign islinktype = highway=motorway_link|trunk_link|primary_link|secondary_link|tertiary_link assign isgoodforcars = if greater priorityclassifier 6 then true else if ( or isresidentialorliving highway=service ) then true else if ( and highway=track tracktype=grade1 ) then true else false assign classifiermask add isbadoneway add multiply isgoodoneway 2 add multiply isroundabout 4 add multiply islinktype 8 multiply isgoodforcars 16 assign dummyUsage = or smoothness= or surface= or lit= or sidewalk= or sac_scale= or tracktype= or trail_visibility= route_hiking_iwn= ---context:node # following code refers to node tags assign defaultaccess = if ( access= ) then true else if ( access=private|no ) then false else true assign footaccess = if foot= then defaultaccess else not foot=private|no # # Barriers. Almost everything is passable on foot; only things you genuinely # cannot walk through are blocked. # assign barrier_penalty = if ( barrier= ) then 0 else if ( barrier=fence|wall|hedge|ditch|spikes|sally_port ) then 1000000 else if ( barrier=gate|lift_gate|swing_gate|sliding_gate|door|footgate ) then ( if footaccess then 20 else 1000000 ) else if ( barrier=stile|kissing_gate|turnstile|full-height_turnstile|horse_stile ) then 25 else if ( barrier=cycle_barrier|chicane|block|bollard|chain|rope|cattle_grid|kerb ) then 0 else 10 # # Stopping. The original matched only crossing=traffic_signals and so missed # every plain junction signal, which is most of them. # assign stop_penalty = if ( not avoid_traffic_lights ) then 0 else if ( or highway=traffic_signals or crossing=traffic_signals traffic_signals=signal ) then traffic_signal_penalty else if ( or highway=crossing crossing=uncontrolled|zebra|marked|unmarked|island|yes ) then crossing_penalty else if ( highway=stop|give_way ) then 5 else 0 assign crossing_class_penalty switch consider_crossings switch estimated_crossing_class= 0 switch estimated_crossing_class=0|1 0 switch estimated_crossing_class=2 30 switch estimated_crossing_class=3 70 switch estimated_crossing_class=4 120 switch estimated_crossing_class=5 180 switch estimated_crossing_class=6 250 0 0 assign railway_penalty = if railway=level_crossing then 60 else 0 # # Access is tested FIRST. In the original the traffic-light branch returned # before this, so a crossing tagged foot=no cost 700 instead of being blocked. # assign initialcost = if not footaccess then 1000000 else ( add barrier_penalty add stop_penalty add crossing_class_penalty railway_penalty )