Back to guides
4
8 min

AI for Transportation & Traffic Engineering

Traffic Demand Forecasting, Pavement Deterioration Modelling, and Accident Hot-Spot Analysis

Traffic Demand Forecasting with Heterogeneous Vehicle Mix

Traffic demand forecasting for highways has a complication that simple models ignore: the vehicle mix. A rural interstate carries passenger cars, pickups, recreational vehicles, single-unit trucks, combination trucks (3-S2 and longer), and the occasional overweight permit load that counts as multiple standard axle loads. The Highway Capacity Manual (HCM) uses passenger-car equivalents (PCE) to convert the mix, but the conversion factors are sensitive to grade and free-flow conditions — a heavy truck on a 6% upgrade at 45 mph has a very different capacity impact than the same truck on level terrain.

Open data/traffic-count-data.csv in the code panel. Each row is a classified traffic count: station_id, date, hour, direction, vehicle_class (motorcycle/passenger_car/pickup_van/single_unit_truck/bus/combination_truck/rv/other), count, speed_mph, headway_sec, route_number, facility_type, terrain.

Dynamic PCE Estimation

HCM PCE factors (passenger car = 1.0, with truck equivalents that rise on grades) are tabulated averages that hide significant variance. A regression model trained on speed-flow-density data from 100+ continuous-count stations estimates effective PCE as a function of volume-to-capacity ratio:

Vehicle ClassHCM PCE (level)AI-Estimated PCE (V/C < 0.5)AI-Estimated PCE (V/C > 0.8)
Motorcycle1.00.61.0
Pickup / van1.01.01.3
Single-unit truck1.51.32.5
Combination truck2.52.24.5
Bus1.51.42.0

The key insight: slow or large vehicles have disproportionately higher capacity impact at high V/C ratios because they create platoons and reduce passing opportunities. Using dynamic PCE instead of static factors changes the capacity analysis conclusion (i.e., the year when widening is needed) by 2-4 years on two-lane and constrained facilities.

Trip Generation and Growth Forecasting

For new highway projects (NEPA-stage planning and design), traffic demand forecasting uses:

Short-term (1-5 years): Trend extrapolation
  - Historical AADT growth rates from DOT count programs (1-3% for interstates, 0.5-2% for state routes)
  - Adjusted for GDP elasticity (traffic growth / GDP growth ≈ 0.8-1.1 for freight, 0.6-1.0 for passenger)

Long-term (5-20 years): Travel demand model with AI calibration
  - Trip generation: f(population, employment, household income, vehicle ownership) per TAZ
  - Trip distribution: gravity model with impedance function calibrated on observed OD data
  - ML calibration: Random Forest learns the residual between four-step model prediction and actual counts
  - Key features: competing routes (parallel free facility), transit availability, fuel price index

On 30 projects where forecasts could be compared with actual traffic (5+ years post-opening), the ML-calibrated model had MAPE of 18% — versus 32% for the standard gravity model and 25% for trend extrapolation. The improvement is driven by learning the "diversion effect" — traffic that shifts from parallel routes to the new facility, which standard models consistently underpredict.

Pavement Deterioration Modelling: PCI, IRI, and Rutting

Pavement management is the largest single maintenance expenditure for state DOTs. The decision: when to overlay, when to reconstruct, and where to allocate limited maintenance budgets. These decisions require deterioration prediction — forecasting future pavement condition from current condition, traffic loading, climate, and pavement structure.

Open data/pavement-condition-data.csv — columns: section_id, survey_date, milepost, pavement_type (flexible/rigid/composite), thickness_mm, subgrade_resilient_modulus, drainage_condition, climate_zone, cumulative_esal (equivalent single axle loads), pci (0-100), iri_m_km (International Roughness Index), rut_depth_mm, cracking_area_pct, pothole_count_per_km, last_overlay_date, last_overlay_thickness_mm.

IRI Prediction Model

IRI (International Roughness Index) is the primary ride quality metric reported to the FHWA HPMS. The AASHTOWare Pavement ME (mechanistic-empirical) design procedure uses calibrated transfer functions — a mechanistic-empirical model with nationally and locally calibrated coefficients. The Pavement ME model works well for average conditions but struggles with:

  • Heavy-haul corridors — actual axle loads on permit and energy-sector routes exceed typical ESAL assumptions. Default ESAL distributions under-count these.
  • Freeze-thaw and moisture damage — sections with poor drainage deteriorate 3-5x faster during freeze-thaw cycling. Default moisture models under-represent local conditions.
  • Patching quality — repaired sections often deteriorate faster than the original pavement due to poor compaction and bond coat application.
  • An XGBoost model trained on 5 years of network-level pavement survey data (state DOT, 50,000+ lane-km) predicts IRI at next survey (1-year horizon):

    FeatureSHAP Importance
    current_iri0.28
    cumulative_esal0.18
    drainage_condition0.14
    cracking_area_pct0.12
    pavement_age_since_last_overlay0.10
    **climate_zone** (wet-freeze/dry-freeze/wet-no-freeze/dry-no-freeze)0.08
    subgrade_resilient_modulus0.06
    overlay_thickness_mm0.04

    MAE: 0.4 m/km (median IRI: 3.5 m/km). The model outperforms the default Pavement ME calibration by 35% on local data, primarily because it captures the drainage and heavy-haul effects that the default coefficients underestimate.

    Rutting and Cracking Prediction

    Rutting (primarily in flexible pavements) and cracking (fatigue alligator cracking and thermal transverse cracking) are predicted separately:

  • Rutting: strong correlation with cumulative ESAL, subgrade strength, and binder grade. The model identifies "premature rutting" — sections where rut depth exceeds 15mm within 3 years of overlay — as primarily caused by inadequate binder grade for the traffic and climate (a PG 64-22 used where a PG 70-22 or polymer-modified binder per Superpave is warranted).
  • Cracking: driven by pavement age, thermal cycling (number of days with surface temperature > 60°C and freeze-thaw cycle count), and existing crack density. The model predicts the transition from "isolated cracks" to "interconnected cracking" — the tipping point where patching becomes uneconomical and overlay is required.
  • Accident Hot-Spot Analysis and Countermeasure Prioritization

    The US records roughly 6 million police-reported crashes and over 40,000 traffic fatalities annually (NHTSA FARS). Hot-spot identification has traditionally used a simple frequency threshold — locations with high crash counts over 3 years. This identifies locations but does not quantify risk, predict future crashes, or prioritize countermeasures cost-effectively. The Highway Safety Manual (HSM) introduced predictive methods (Safety Performance Functions) that AI extends.

    Open data/accident-data.json — it contains: accident_id, milepost, route_number, date, time, severity (fatal/incapacitating/non_incapacitating/property_damage_only), vehicle_types_involved, cause_coded (MMUCC classification), road_geometry (straight/curve/intersection/bridge), lighting, weather, surface_condition, speed_limit_mph, median_type, shoulder_width_m, pedestrian_involved.

    Predictive Accident Risk Modelling

    A Poisson regression (or negative binomial for overdispersed data — the HSM SPF form) enhanced with spatial features:

    Features per 500m road segment:
      traffic_volume_aadt
      truck_pct
      road_geometry_score (curvature, gradient, sight distance)
      access_density (driveways + median openings per km)
      pedestrian_activity_index (proximity to land use, transit stops, schools)
      lighting_index (lit/unlit/partially lit)
      median_type (raised/flush/none/cable barrier)
      shoulder_condition (paved/gravel/absent)
      speed_differential (85th percentile speed - speed limit)
      historical_accident_rate (3-year EB-adjusted)
    
    Output: expected_accidents_per_year (with severity distribution)

    The model identifies high-risk segments that have not yet accumulated a high crash count but have the geometric and traffic characteristics of hot spots. On a high-volume freeway corridor, the model identified 12 segments that met the risk threshold but not the historical crash threshold — 8 of these had their first fatal crash within the following 2 years.

    Countermeasure Cost-Effectiveness

    The real value is not just identifying hot spots — it is prioritizing interventions by benefit-cost ratio, using FHWA Crash Modification Factors (CMFs):

    CountermeasureTypical Cost ($K/km)Expected Crash Reduction (CMF)B/C Ratio
    High-friction surfacing at curves25-6015-25%8-15
    Enhanced curve warning / flashers30-8010-20%5-10
    Cable median barrier150-30040-60% (cross-median)4-8
    Grade-separated pedestrian crossing800-150060-80% (pedestrian)2-5
    Realignment (curve correction)2000-500030-50%1-3

    The optimization model allocates a fixed annual Highway Safety Improvement Program (HSIP) budget across hot spots and countermeasure types to maximize total expected crash reduction. Linear programming with predicted crash reduction as the objective and budget + physical feasibility as constraints.

    Vulnerable Road User Considerations

    Pedestrians and cyclists account for a rising share of fatalities but are underrepresented in standard crash models (which focus on vehicle-vehicle crashes). A separate model for vulnerable-road-user crashes incorporates:

  • Intersection conflict points (uncontrolled turns across traffic, permissive left turns)
  • Speed differential between vehicles and pedestrians/cyclists
  • Absence of dedicated bike lanes or sidewalks
  • Night-time visibility (lighting and conspicuity)
  • Key Takeaways

  • Dynamic PCE conversion changes capacity analysis conclusions — static HCM factors underestimate the impact of heavy and slow vehicles at high volume/capacity ratios, potentially advancing the need for widening by 2-4 years.
  • Pavement deterioration models must account for heavy-haul loading and drainage — default Pavement ME calibration underperforms locally. ML models trained on DOT survey data capture the dominant local failure modes.
  • Predictive accident modelling identifies future hot spots — waiting for crashes to accumulate means fatalities occur before intervention. Geometric and traffic features predict risk before the crashes happen.
  • Countermeasure prioritization by B/C ratio maximizes safety investment returns — low-cost interventions (high-friction surfacing, flashers) often have higher B/C ratios than expensive realignments.
  • This is chapter 4 of AI for Civil & Infrastructure (Global).

    Get the full hands-on course — free during early access. Build the complete system. Your projects become your portfolio.

    View course details