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 Class | HCM PCE (level) | AI-Estimated PCE (V/C < 0.5) | AI-Estimated PCE (V/C > 0.8) |
|---|---|---|---|
| Motorcycle | 1.0 | 0.6 | 1.0 |
| Pickup / van | 1.0 | 1.0 | 1.3 |
| Single-unit truck | 1.5 | 1.3 | 2.5 |
| Combination truck | 2.5 | 2.2 | 4.5 |
| Bus | 1.5 | 1.4 | 2.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 indexOn 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:
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):
| Feature | SHAP Importance |
|---|---|
| current_iri | 0.28 |
| cumulative_esal | 0.18 |
| drainage_condition | 0.14 |
| cracking_area_pct | 0.12 |
| pavement_age_since_last_overlay | 0.10 |
| **climate_zone** (wet-freeze/dry-freeze/wet-no-freeze/dry-no-freeze) | 0.08 |
| subgrade_resilient_modulus | 0.06 |
| overlay_thickness_mm | 0.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:
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):
| Countermeasure | Typical Cost ($K/km) | Expected Crash Reduction (CMF) | B/C Ratio |
|---|---|---|---|
| High-friction surfacing at curves | 25-60 | 15-25% | 8-15 |
| Enhanced curve warning / flashers | 30-80 | 10-20% | 5-10 |
| Cable median barrier | 150-300 | 40-60% (cross-median) | 4-8 |
| Grade-separated pedestrian crossing | 800-1500 | 60-80% (pedestrian) | 2-5 |
| Realignment (curve correction) | 2000-5000 | 30-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:
Key Takeaways
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