CitiesSkylinesMods / TMPE

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

Traffic using one lane on highways #112

Closed originalfoo closed 5 years ago

originalfoo commented 5 years ago

I've seen a couple of reports of this issue, but posters never came back with further details. Until now...

Blitzred I'd like to play around more with the features, but I noticed that as soon as I enable this mod all my highway 4 way interchanges started having backups due to every vehicle trying to merge into the far left lane at one specific point. leaving the other 2-3 lanes on the right open. When I disable lane changes for that segment the backup just moves to one before it then.

Only highway assests are some of Timboh's interchanges, though the first one uploaded is one I built using basic highway. Before enabling TMPE was averaging between 82-86% traffic flow, drops to 70% due to the highways and everyone trying to just use the left lane. This causes backups well past screenshot edge.

3fa5etw

Industrial loop, connects the highway to the main interchange

myacbvf

2 seperate instances of vehicles trying to merge over in the interchange causes backups; despite the slight break upper left there's a jam going out the screen. Before enabling mod this interchange, along with a couple underground side passages, had very heavy traffic that still managed to flow smooth - maybe I need to add some express lanes around it.

Temporary Workarounds

For some possible solutions, see: Troubleshooting Guide

originalfoo commented 5 years ago

Asked for savegame.

originalfoo commented 5 years ago

Save game: https://steamcommunity.com/sharedfiles/filedetails/?id=1669928738

krzychu124 commented 5 years ago

I've loaded that save and I really have no idea why those vehicles are trying to change lane it these places.

I've enabled advanced AI and at first it looked like it helped but after some time even if I set it to the max, still at some places almost all vehicles were still trying to switch to that only one specific lane (dunno why)

originalfoo commented 5 years ago

Looking at the screenshots, is traffic just trying to find shortest route? Maybe we could relax that requirement on highways?

krzychu124 commented 5 years ago

Enabling Highway rules could greatly help to resolve that issue but at some road connections an effect will be much worse due to changed merge and diverge rules. I suggest to rethink of these connections and follow hints from wiki while building new connections

VictorPhilipp commented 5 years ago

Looking at the screenshots, is traffic just trying to find shortest route? Maybe we could relax that requirement on highways?

This should not be the case. For vehicle routes path-finding always calculates with the average segment length. float prevLength = (prevLaneType != NetInfo.LaneType.PublicTransport) ? prevSegment.m_averageLength : prevLane.m_length;

VictorPhilipp commented 5 years ago

@krzychu124 @aubergine10 What were you trying to fix with the addition of isStockUturnPoint? grafik Ah, I think I found it: https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/issues/86#issuecomment-466471137 (this code is erroneous and contributes to this issue)

VictorPhilipp commented 5 years ago

grafik another error

VictorPhilipp commented 5 years ago

I fixed the issue but removed the isStockUturnPoint part. Could you please tell me what the problem was? I found some comments that give some hints but I think there are multiple issues with u-turns that you want to address:

@aubergine10 https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/issues/101#issuecomment-466215944

I guess in that specific situation, vehicles from any lane should be able to u-turn in to any of the lanes in opposite direction.

👍 Ok. Let's fix this.

https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/issues/86#issuecomment-466471137

allow them to choose any outgoing lane from the dead-end node

I think this is the case. Where have you seen any problems with outgoing lane selection?

originalfoo commented 5 years ago

I saw it when inspecting problem with industry areas vs. bus lanes. #85

Specifically, at end of a cul-de-sac (dead-end) road, vehicles were almost always u-turning on to innermost lane, even when they wanted to do near-side turn at the upcoming junction.

The code by @pcfantasy resulted in them more evenly u-turning in to any of the lanes on other side of road (which on busy cul-de-sacs in farming areas, in particular, seemed to also help traffic flow as there was more chance of the lane being empty).

A side effect was that some minor industry problems (#101) were reduced and, for me and @krzychu124, it also seemed to fix #86 (however it's since become obvious there are other issues that were contributing to #86).

VictorPhilipp commented 5 years ago

Ok, I fixed #85 and #101 with https://github.com/krzychu124/Cities-Skylines-Traffic-Manager-President-Edition/pull/233/commits/0cb90e3979058b9be5357302d8178d511c7129d6

Now, u-turns are not enforced to be performed from the innermost lane at dead ends anymore.