CitiesSkylinesMods / TMPE

Cities: Skylines Traffic Manager: President Edition
https://steamcommunity.com/sharedfiles/filedetails/?id=1637663252
MIT License
577 stars 85 forks source link

Extend the "automatically apply traffic lights when applicable" policy to allow manual configuration of signaling on each junction type. #1427

Open DrymarchonShaun opened 2 years ago

DrymarchonShaun commented 2 years ago

Describe your idea

In my mind the policy would change to "automatically configure signalling based on junction type" and for each of the following include a drop down menu to choose the default type of signalling (Options I've thought of also listed below.)

The (sane) options I can think of: I Have no idea what half of these signal layouts should actually be named, so names will probably have to change.

Available for all Junction Types

Only Available for Local/Collector & Collector/Arterial Junctions

(To clarify, these would add yield/stop signs on all minor connections within the junction, so going back to the 'Local to Collector' example above, both of the local road connections would have stop or yield signs.)

DrymarchonShaun commented 2 years ago

I would also imagine that the largest connection dictates the rule followed, so if you have a Collector/Collector/local connection, whatever the default is for a Collector/Collector connection would be used, instead of Collector/Local, just to solve any issues that may be caused (So If you have 'stop lights' selected for Collector/Collector junctions, and 'minor stop for major' selected for Collector/Local, it would override the stop sign with the stop lights.)

originalfoo commented 2 years ago

We've pondered this sort of thing in the past and ran in to some difficulties becuse the segments attached to a junction are not always representative of the roads further back from the junction.

For example, if there's a 2+2 road at a junction, is that a collector, or did the user just replace some segments of a 1+1 road with 2+2 road so they could add dedicated turning lanes?

DrymarchonShaun commented 2 years ago

segments attached to a junction are not always representative of the roads further back from the junction.

Hmm. Fair. If someone needed to upgrade that section to add turning lanes, one could argue that they probably are having traffic issues there, and using signalling for that larger segment may not be a bad idea? That or they are probably already adjusting signalling manually and would see the change.

Past that though I would say to an extent that that is the exception rather than the rule. Its also far less work to configure signalling when you add a dedicated turn lane than having to configure every new local to collector connection by hand.

originalfoo commented 2 years ago

One of the workarounds we've used for some of the tools (like lane connectors and lane arrows) is to have multiple configurations available - each use of the shortcut cycles through whatever different options there are for the place where it's being applied. However, that still needs user to decide which set of customisations is best suited so it's not ideal for automatic application.

DrymarchonShaun commented 2 years ago

Actually, I'd say its kind of the intended effect. That's how it works IRL in any instance i can think of. If there's a large amount of traffic in an area to the point where they need to add turn lanes, they are going to also upgrade the signalling in that area; if it was a 4 way stop before adding the turn lanes, they are going to make it a stop light when they add the turn lanes, regardless of what the road is 100 ft prior.

EDIT: Improving legibility.

originalfoo commented 2 years ago

What happens if the road has bus lanes, or asymmetric lanes, etc?

DrymarchonShaun commented 2 years ago

(continued explanation that might make more sense.) If you have a junction like this as a 4 way stop, image you aren't going to leave it as a 4 way stop if you add dedicated turn lanes. image If i'm understanding road hierarchy correctly, by adding those turn lanes, (even if its still only a 2 lane road before the junction) you have still made that the priority movement, and would assign it as such, by either removing the stop sign from that road and leaving the others, or adding an stop light to the junction. image

What happens if the road has bus lanes, or asymmetric lanes, etc?

Good question, I don't have an answer off the top of my head for that one.

DrymarchonShaun commented 2 years ago

After thinking about it, I'd say bus lanes still count as lanes, because they are still designed to carry more traffic than a smaller road without bus lanes could, its just that the extra lanes are specialized. (meaning a road with 2 lanes + 2 bus lanes is still a 4 lane road, and still a collector, as it still can carry more traffic than a 2 lane road. In theory it could move traffic faster than an ordinary 4 lane road in the right conditions.

But, regardless, part of the reason Github issues exist is for everyone to give their input, maybe someone else will have more insight that me on certain things.

BuiIdTheBuilder commented 2 years ago

4-way yield and stop junctions in TM:PE don't work the way they are supposed to, so I don't recommend using them. Even 3 cars is enough for them to deadlock, and the deadlock won't resolve until you give one of the cars priority.

DrymarchonShaun commented 2 years ago

4-way yield and stop junctions in TM:PE don't work the way they are supposed to, so I don't recommend using them. Even 3 cars is enough for them to deadlock, and the deadlock won't resolve until you give one of the cars priority.

hmmm... I guess it would have to give one road priority then. Issue then is what factors should be considered when selecting the priority road?

EDIT: I guess it could be the first / last road added to the junction. (First meaning when you first create the junction, its whatever road you added the junction to, last would be which ever road was last connected to the junction.)

DrymarchonShaun commented 2 years ago

I guess to explain my more specific original reason that made me think of this to begin with is that with the policy as it is currently, any time a junction is added to a collector or arterial, it adds stop lights. Problem is that that means any time a local road connects to a collector, it adds stoplights. For me this ends up causing traffic issues, because every time someone wants to turn onto the collector from any local roads, it stops traffic on the priority movement; the collector. Basically all i really want is the option to have yield/stop signs placed on local -> collector connections to prioritized that collector movement, instead of traffic lights. the two example photos being this and this (Of course, this would also apply to any other local connections within the junction, so if the local road were to continue 'north' that side would also have the yield / stop sign.)

I can't just disable the policy, because then arterial -> collector and collector --> collector connections then don't get lights and then they end up with traffic issues.

originalfoo commented 2 years ago

Regarding deadlock at junctions where all roads have same priority, that's something @krzychu124 is investigating as part of major improvements to traffic handling at junctions - see vids in this long thread (deadlock issue is shown in one of them): https://github.com/CitiesSkylinesMods/TMPE/issues/1229#issuecomment-995324724