Learn

Scenario mechanics and calculations

Traffic Lab is a simplified planning simulator. These formulas are meant to make assumptions transparent, not to replace calibrated transport modelling, engineering design or official approvals.

1. Scenario edits

Each scenario edit stores an intervention type, selected road, geometry, length, lane count, one-way setting, road class and cost properties.

Supported edits include new roads, flyovers, underpasses, lane additions/removals, bus lanes, no-parking controls, signal timing changes, one-way conversions, roundabouts, closures and road deletion.

2. Edited road graph

The simulation creates a temporary edited graph from the loaded OpenStreetMap-derived Delhi NCR road graph. Existing-road edits adjust lane count, directional rules, effective capacity or closure status. New-road/flyover/underpass edits create scenario-only links drawn by the user; they are not treated as existing real roads.

3. Segment context

Before each run, the engine precomputes context for every road segment:

  • midpoint and bounding box
  • assigned Delhi pincode polygon, adult population and density
  • matched Delhi traffic priors such as Ashram, ITO, Dhaula Kuan, Anand Vihar and Kalindi Kunj
  • connected intersection ids and T-point/crossing complexity
  • capacity class and render importance

4. OD demand

Pincode population does not directly color roads red. It produces trip demand. The model generates deterministic origin-destination pairs from pincode adult population and zone roles.

OD volume = originProduction
  × destinationAttraction
  × timeProfileMultiplier

Morning demand moves from residential pincodes toward office, education, commercial and transit zones. Evening demand reverses toward residential zones. Weekend/evening demand increases market and leisure attraction.

5. Capacity and V/C ratio

Congestion is based on volume divided by effective capacity.

V/C ratio = volumePerHour / effectiveCapacityPerHour

Effective capacity responds to lanes, highway type, one-way status, bridge/tunnel friction, intersections/T-points, traffic priors, weather, event mode and scenario edits.

<0.45       free
0.45-0.70   light
0.70-0.90   moderate
0.90-1.10   heavy
1.10-1.35   severe
>1.35       gridlock

6. Waiting time

Waiting time is calculated from weighted segment pressure, not simply from road length. High V/C segments, intersection friction and signal-like penalties increase waiting. New links reduce waiting only when they divert demand away from constrained approaches without overloading downstream segments.

waitingLoad = Σ(demandUnits × congestionPressure^1.42 × signalPenalty)
totalWaitingTimeMin = waitingLoad × planningFactor

7. Speed, jams and commute

Speed uses a BPR/logistic speed-flow curve so speed collapses smoothly near and above capacity instead of dropping linearly.

speedRatio = BPR(v/c) × logisticQueueCollapse(v/c)
segmentSpeed = freeFlowSpeed × speedRatio

Jams are counted from high congestion/V-C bands. Commute time combines base travel time, pressure and scoped demand size.

8. Accident risk

Risk begins from each segment's base accident score and is adjusted by scenario effects. General capacity expansion can add merge/conflict risk; parking control, bus priority and roundabouts can reduce conflict exposure.

9. Cost

totalCost = constructionCost + landCost
landCost = privateDisplacementSqm × circleRatePerSqm × 1.35

Construction cost depends on intervention type, length/quantity, lane count, area multiplier and disruption multiplier. Land cost is added for new corridors and grade-separated work where private displacement is estimated.

10. Improvement score

The before/after improvement score combines visible metrics:

  • Speed gain: 35%
  • Waiting reduction: 35%
  • Jam reduction: 20%
  • Risk reduction: 10%

11. City score

The broader city score includes mobility, safety, environment, equity, budget efficiency, construction disruption, induced-demand risk, land-use compatibility and political acceptability. It intentionally does not reward car speed alone.

12. Current sources

Current road geometry is derived from OpenStreetMap/Overpass and rendered over OpenStreetMap raster tiles. Pincode polygons and adult-population values inform demand production. Delhi traffic priors are curated planning priors, not live traffic. Cost and land displacement values are rough scenario estimates.

The traffic road colors on the map come from V/C ratio and speed-flow degradation. The optional population heat layer is separate and does not directly set road traffic colors.