cyipt / actdev

ActDev - Active travel provision and potential in planned and proposed development sites
https://actdev.cyipt.bike
7 stars 3 forks source link

Background data causes chunks of traffic in Great Kneighton simulation to stop completely #151

Open hgomersall opened 3 years ago

hgomersall commented 3 years ago

I know congestion in South Cambridge is bad, but I don't think being stationary for 35 minutes is normal (notably around the hospital). I stopped the sim at that point.

dabreegster commented 3 years ago

Gridlock is unfortunately normal in A/B Street. A few lucky maps (like Poundbury) have had special attention to fix the worst bugs there, but Cambridge is more complex and hits different issues. Glancing at a few:

Screenshot from 2021-03-20 11-14-38 https://www.openstreetmap.org/node/554267 The Hills Road roundabout has a bunch of traffic signals around it. Roundabouts are already tough to model. Multiple traffic signals close together are also tough, because the timing needs to be synchronized between them. This spot combines both problems!

Screenshot from 2021-03-20 11-16-43 https://www.openstreetmap.org/node/14913681 The traffic signal at Clarendon and Parkside has poorly guessed heuristics, because the cycletrack partly overlapping the road there technically makes this a 5-way.

Screenshot from 2021-03-20 11-18-47 The geometry at Portugal Place is totally messed up. I actually fixed this in OSM a week ago -- https://www.openstreetmap.org/changeset/100806857 -- but haven't imported fresh OSM data to see if it helps yet.

Getting a map to run without gridlock is very hard, but I can spend a little time working on Cambridge if it's important. Ultimately I need to attract more open source people to the project and get help with some of the hard modelling bits (like auto-timing traffic signals around a roundabout) to make faster progress.

mvl22 commented 3 years ago

Portugal Place is no cycling anyway - but a cycle track is shown.

Hills Road roundabout

NB Known as the "Addenbrooke's roundabout" :)

hgomersall commented 3 years ago

Are the issues predominantly OSM or A/B Street?

hgomersall commented 3 years ago

The Hills Road roundabout has a bunch of traffic signals around it. Roundabouts are already tough to model. Multiple traffic signals close together are also tough, because the timing needs to be synchronized between them.

Is it currently possible to model?

mvl22 commented 3 years ago

Is it currently possible to model?

In my view, almost impossible in OSM for complex junctions - the inability to group junction components is problematic.

See fuller discussion in my State Of The Map talk, e.g. from 15 minutes on and my conclusions at the end:

https://media.ccc.de/v/sotm2019-1038-is-the-osm-data-model-creaking-

dabreegster commented 3 years ago

Portugal Place is no cycling anyway - but a cycle track is shown.

Ah, it's highway=pedestrian but bicycle=dismount. I'll add an exception for this, and likely stop importing this road entirely, since separate footpaths are disabled by default (for similar reasons to separate cyclepaths).

NB Known as the "Addenbrooke's roundabout" :)

Ahhh this one is actually famous, nice! I tried transforming all the signals to stop signs to get rid of the synchronization problem, but it still gridlocks. I made loads of progress unsticking the roundabout in Poundbury; I'll dive into what's going on with this when I get some time.

Are the issues predominantly OSM or A/B Street?

Hard to say -- OSM's model wasn't intended for simulation or for this level of detail. A/B Street often does surface some problems in OSM -- particularly mistagged lanes and lack of turn restrictions. I don't think those are huge culprits in this case. A/B Street's simulation generally suffers when you have short road segments and lots of "intersections", like this: Screenshot from 2021-03-20 14-54-18 And as Martin notes, OSM's general inability to represent complex junctions is part of the problem here.

Is it currently possible to model?

In A/B Street, yes. This particular roundabout is complicated, but it's more or less represented correctly. The two bugs causing gridlock are lack of traffic signal timing and something I've yet to investigate related to the rules for when it's valid to begin a turn across an intersection. You'll notice the vehicles don't stop and get stuck in the middle of the intersection. The dependency cycle is detected: Screenshot from 2021-03-20 14-57-16 and in this case, everyone's supposed to nudge forward anyway, even if they'll get stuck in the intersection, but it's not happening for some reason.

mrd commented 3 years ago

Quite apart from the simulation issues - Addenbrooke's roundabout has three circulatory lanes and that might help sort things out in this case, depending on your lane-changing model (which I understand is still a bit crude).

When I get some time I might also take a look at modifying this demo.

dabreegster commented 3 years ago

Addenbrooke's roundabout has three circulatory lanes and that might help sort things out in this case

It's quite possible more lanes would break the simulation even more. ;) But if OSM doesn't match reality, it'd be awesome to update it. https://www.openstreetmap.org/way/58559114 and similar don't have the lanes tag at all. It was last edited 4 years ago; looks like the new Dutch junction hasn't been tagged.

mvl22 commented 3 years ago

No, the Dutch roundabout, which is the one at the next junction, has been created in glorious detail by yours truly (and subsequently iterated upon).

https://www.openstreetmap.org/#map=19/52.17930/0.14903

I can't remember the lanes layout on the Addenbrooke's roundabout; there have been changes made which may make the current Bing satellite imagery incorrect.

hgomersall commented 3 years ago

The two bugs causing gridlock are lack of traffic signal timing

This was really my question - can complex signal timing be incorporated? It might need someone to sit with a stopwatch at that junction!

Re the need to get contributors, I suspect Cambridge is a good place to start with that. There are plenty of technically competent transport geeks hereabouts.

dabreegster commented 3 years ago

can complex signal timing be incorporated? It might need someone to sit with a stopwatch at that junction!

Depends how it works. We have actuated signals, where a stage lasts a fixed time, plus up to some additional time if there's still demand from that direction. We can also offset a signal relative to another. Hopefully that should cover this particular situation, but I don't know what it's like in person.

I made a feeble attempt last spring to hand-time Seattle's signals in person. It could be done theoretically, but there are complications, particularly: many signals are on different plans at different times of the day or on weekends; and actuated signals are much harder to observe than fixed time. The bugs at this particular roundabout aren't exclusive to the timing; you can use the signal editor to convert them all to stop signs, and it still gets stuck. There's a gridlock bug elsewhere.

I suspect Cambridge is a good place to start with that

Any recommendations for online meetups (maybe a local OSM, GIS, or civic tech group?) that I could solicit people from?