top of page
Search

Simulating pedestrian and vehicle traffic

Writer: Edward
Edward
12 hours ago
3 min read

Ever since the new pedestrian scramble was enabled at the reconfigured intersection of Kirkland Ave and Lake Street, the southbound morning traffic pattern has been noticeably different, with traffic queues backing up through Central Way and up onto Market Street.


I'd thought about and explored traffic modeling with OpenStreetMaps networks and sumo underlying engine in the past. And thought it would be interesting to understand the dynamics of a small traffic-light cycle change on flows.


Jumping to the punchline, below is an example of what crude simulations show as a non-linearity between traffic volumes and traffic-light cycle times. At 2022 traffic levels, the old and new plans differ only modestly, whereas at roughly 2026 levels (~20% more, ~15 min later) the scramble plan tips into the spillback regime that the traffic camera and Google estimates show, while the old plan -- to the extent I'm actually accurately representing its light cycle -- was mostly coping.



Observed averages of Tuesday, Wednesday, and Thursday morning commutes are shown in gray.  The left panel shows camera-derived estimates of how often the Lake Street block is backed up from Kirkland Ave to Central Way, while the middle panel shows Google-derived estimates of full travel times through the southbound corridor from Market Street past Kirkland Ave.  Simulations in the old traffic-light cycles are shown in orange compared to the new cycles in blue -- dashed lines corresponding to the 2022 published traffic counts; solid lines are a slight rescale and shift that better matches observation.
Observed averages of Tuesday, Wednesday, and Thursday morning commutes are shown in gray. The left panel shows camera-derived estimates of how often the Lake Street block is backed up from Kirkland Ave to Central Way, while the middle panel shows Google-derived estimates of full travel times through the southbound corridor from Market Street past Kirkland Ave. Simulations in the old traffic-light cycles are shown in orange compared to the new cycles in blue -- dashed lines corresponding to the 2022 published traffic counts; solid lines are a slight rescale and shift that better matches observation.

Let's talk a bit about some of the components that went into building this up. Firstly, there's a public traffic camera facing southbound from Central Way towards Kirkland Ave that refreshes a about 1/minute. I trained an image model to recognize queued cars and free-flowing cars, as well as waiting pedestrians and the state of the two traffic lights that were visible.



These lights are not on fixed cycles though, so I did a little bit of spot checking to better understand the different types of patterns underlying the once-per-minute snapshot views. Both the pedestrian scramble cycle (dark red) and the East/West cycle (light red) seem to be triggered by pushing buttons or waiting car sensors. So I built a latent model of traffic cycle to be compared to the per-minute camera observations, as well as the state of the stopped and flowing cars visible in the camera.


I also queried Google Routes API on a few different days and compared to their "typical Thursday" expected travel times for this period (see below left), noting that Friday commutes are (as expected) much less busy than Tuesday through Thursday. Google also seems to be picking up on small-timescale variation (see below right) which relates to the filling and clearing up of queued traffic during the 2-to-3-minute light cycles.


The simulation itself started from a network of traffic movements extracted from OpenStreetMap's OSM API in a bounding box. I converted that with SUMO's netconvert utility to turn it into a lane-level network with turn connections and signal nodes -- keeping only driving road types and dropping isolated pieces. I did end up making a few hand corrections, either because netconvert was too aggressive, for some aesthetic reasons in the visualization, or in a few places where the length of turning lane pockets wasn't quite right. Traffic demand of cars and pedestrians on different segments comes directly from temporal smoothing of Kirkland's published November 2022 counts in 15-minute windows, and the simulator draws random arrivals from these rates. Those rates were inflated by 20% and shifted 15 minutes later to get the best fit to the traffic camera and Google routes info as shown below.



Below is a video of the traffic simulation visualization; you can run scenarios and change parameters yourself at this link and contrast to a pre-scramble-intersection scenario at this link.



So anyways, some confirmation of the incoming hypothesis behavior, although still quite a simplification. But this is also an interesting simulation platform on top of which we can ask lots more questions that I never really got to:

  1. These simulations still don't have super realistic representations of the traffic light cycles and how they depend on pedestrian button-pushing behavior and waiting car sensors. And one could definitely explore how different time-dependent cycle timings would change pedestrian and auto waiting times.

  2. Drivers are just following fixed routers rather than being intelligent agents who respond to both current traffic and historical expectations of traffic. In the real world, there's been notable diversion of eastbound traffic along 7th Ave and southbound traffic through the Lakeshore Plaza, the latter probably impacting the sensors at Kirkland Ave.

  3. There's an uncontrolled mid-block pedestrian crossing with quite interesting interactions depending on when in the light cycle the crossings occur. Probably more relevant for afternoon traffic patterns but an interesting dynamical system.

 
 
 

Comments


Post: Blog2_Post

©2020 by Small Ninja. Proudly created with Wix.com

bottom of page