Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Modal Comfort Metrics (WCI and LTS)

1. Overview

In active transportation planning, shortest-distance or fixed-speed routing over all legally permissible streets often overestimates real-world walking and cycling accessibility. Many streets that are technically open to pedestrians or cyclists lack sidewalks or bike lanes and carry high-speed vehicle traffic.

BAMBAM computes and applies two roadway comfort metrics:

  • Walking Comfort Index (WCI): An integer score in the range \([-6, 9]\) (where higher scores indicate greater pedestrian comfort) computed for every edge in the walk network. WCI combines:
    • Walkability: Presence of dedicated sidewalks or footways vs. shared roadway shoulders.
    • Traffic Speed Comfort: Posted or adjacent vehicle operating speeds.
    • Cycleway Buffer Comfort: Presence of adjacent bike lanes or buffers separating pedestrians from motor vehicles.
    • Intersection Control Comfort: Presence of traffic signals or stop signs at the upstream vertex. In BAMBAM, WCI is used as a route constraint: edges with a WCI below a user-specified comfort threshold are excluded from walking trips.
  • Level of Traffic Stress (LTS): A classification from LTS 1 (lowest stress, suitable for all ages and abilities, such as separated paths or buffered bike lanes) to LTS 4 (highest stress, high-speed multi-lane traffic) computed for every edge in the bike network based on cycling facility protection, street one-way status, and vehicle speeds. In BAMBAM, LTS is used as a traversal speed modifier: high-stress links apply a percentage speed penalty (or impedance) to reflect cyclist route preferences and delays.

2. Setup

1. Compute WCI and LTS (bambam_build_open_data.sh)

Stage 10 (modal-metrics) of script/bambam_build_open_data.sh computes walk/wci.csv.gz and bike/lts.csv.gz from the imported network’s complete edge and vertex tables:

./script/bambam_build_open_data.sh \
  --extent-file query/denver_470_buffer.txt \
  --output-dir denver_buf \
  --from-stage modal-metrics \
  --to-stage modal-metrics

(If denver_buf has not been built yet, omit --from-stage modal-metrics and run --to-stage network first, or invoke bambam_util modal_metric directly:)

./rust/target/release/bambam_util modal_metric \
  --modal-metric WCI \
  --network-dir denver_buf \
  --mode walk \
  --output-file denver_buf/walk/wci.csv.gz

./rust/target/release/bambam_util modal_metric \
  --modal-metric LTS \
  --network-dir denver_buf \
  --mode bike \
  --output-file denver_buf/bike/lts.csv.gz

2. Configure WCI and LTS in bambam.toml

Update denver_buf/bambam.toml to attach the wci constraint model to the walk topology and the lts traversal model to the bike topology:

  1. Add the wci constraint model to the walk [[search]] section:

    ###
    ### WALK TOPOLOGY
    ###
    [[search]]
    traversal.type = "combined"
    traversal.models = [
        { type = "distance", distance_unit = "miles" },
        { type = "fixed_speed", name = "walk", speed = 5.0, speed_unit = "kph" },
        { type = "time", time_unit = "minutes" },
        { type = "multimodal", this_mode = "walk", available_modes = ["walk", "bike", "drive"] }
    ]
    
    constraint.type = "combined"
    constraint.models = [
        { type = "wci", wci_input_file = "walk/wci.csv.gz" },
        { type = "multimodal", this_mode = "walk", available_modes = ["walk", "bike", "drive"] }
    ]
    
  2. Add the lts traversal model to the bike [[search]] section (placed after fixed_speed and before time so time uses the LTS-adjusted edge_speed):

    ###
    ### BIKE TOPOLOGY
    ###
    [[search]]
    traversal.type = "combined"
    traversal.models = [
        { type = "distance", distance_unit = "miles" },
        { type = "fixed_speed", name = "bike", speed = 16.0, speed_unit = "kph" },
        { type = "lts", lts_input_file = "bike/lts.csv.gz", speed_unit = "kph", mapping = { "1" = { type = "percent_penalty", percent = 100.0 }, "2" = { type = "percent_penalty", percent = 90.0 }, "3" = { type = "percent_penalty", percent = 70.0 }, "4" = { type = "percent_penalty", percent = 40.0 } } },
        { type = "time", time_unit = "minutes" },
        { type = "multimodal", this_mode = "bike", available_modes = ["walk", "bike", "drive"] }
    ]
    
  3. Inject wci_threshold for queries (e.g., requiring a minimum WCI score of 0):

    [[plugin.input_plugins]]
    type = "inject"
    format = "key_value"
    write_mode = "overwrite"
    key = "wci_threshold"
    value = 0
    

3. Run BAMBAM

cd denver_buf

../rust/target/release/bambam \
  --config-file bambam.toml \
  --query-file ../query/denver_extent.json

3. What Happens

  1. Spatial Context Calculation (modal-metrics stage):
    • When computing WCI and LTS, bambam_util modal_metric loads not only the target mode’s edges (walk/edges-complete.csv.gz or bike/edges-complete.csv.gz) and intersection controls (vertices-complete.csv.gz), but also indexes sibling modal edge lists in a spatial R-tree so sidewalks and cycleways inherit speed and buffer context from adjacent roadways.
  2. WCI Filtering on Walk Searches:
    • During walk tree expansion, the wci constraint model checks each candidate edge’s score in walk/wci.csv.gz. Any link with \(\text{WCI} < \text{wci\_threshold}\) is rejected, restricting pedestrian travel sheds to comfortable walking infrastructure.
  3. LTS Speed Scaling on Bike Searches:
    • During bike tree expansion, the fixed_speed model first sets the base cycling speed (\(16\text{ km/h}\)), and the lts traversal model scales that speed by the configured percentage for the link’s LTS rating (e.g., \(100\%\) of base speed on LTS 1 paths, down to \(40\%\) on high-stress LTS 4 arterials) before link travel time is calculated.