a-b-street / abstreet

Transportation planning and traffic simulation software for creating cities friendlier to walking, biking, and public transit
https://a-b-street.github.io/docs/
Apache License 2.0
7.63k stars 339 forks source link

Starter project: Improve traffic signal heuristics #8

Open dabreegster opened 4 years ago

dabreegster commented 4 years ago

I can't find data about how Seattle traffic signals are actually timed right now. So for the moment, I'm automatically generating a policy for every intersection. There are a bunch of different policies for different types of intersections (for a 4-way, should there be 2 phases with no protected left turn or 4 phases with protected left turns?). Every phase is hardcoded to 30 seconds right now. A nice project contained to one layer of the code (just the map model) would be to improve these heuristics. For example, roads have a rank (primary > secondary > residential) from OpenStreetMap, so probably bigger roads should have longer durations.

Ex policy: https://github.com/dabreegster/abstreet/blob/573edbd13e5aa4bedba0bd819d3d7b32dba11b59/map_model/src/traffic_signals.rs#L247

jraymakers commented 4 years ago

In the absence of specific data about traffic signals in Seattle, perhaps some techniques from a standard manual could be implemented. For example, the "Signal Timing Manual - Second Edition" (http://www.trb.org/Publications/Blurbs/173121.aspx). I've only skimmed this, but Chapters 5-7 appear to have lots of useful data.

JavedNissar commented 4 years ago

Wouldn't this be resolved by #91 ?

dabreegster commented 4 years ago

Partly. Signal configuration seems to be at least two orthogonal problems:

Both of these bugs kind of conflate these two things. Help needed on both.

dabreegster commented 3 years ago

Still relevant, and hopefully a good starter project. We've gotten much better at grouping movements into stages, but we're still always hardcoding the timing to 30s.

ciphx commented 1 month ago

Hello @dabreegster , is this issue still open and can I pick it up? What would be a good starting point?

dabreegster commented 1 month ago

Sure, still open. There hasn't been active development on A/B Street in a while, but this is still a reasonably self-contained area. The code is at https://github.com/a-b-street/abstreet/blob/main/map_model/src/make/traffic_signals/mod.rs.