Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traffic using one lane on highways #112

Closed
originalfoo opened this issue Feb 25, 2019 · 11 comments · Fixed by #233
Closed

Traffic using one lane on highways #112

originalfoo opened this issue Feb 25, 2019 · 11 comments · Fixed by #233
Assignees
Labels
BUG Defect detected confirmed Represents confirmed issue or bug DLS Dynamic Lane Selection PATHFINDER Pathfinding tweaks or issues
Milestone

Comments

@originalfoo
Copy link
Member

originalfoo commented Feb 25, 2019

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
Copy link
Member Author

Asked for savegame.

@originalfoo originalfoo added BUG Defect detected awaiting feedback More information required labels Feb 25, 2019
@originalfoo
Copy link
Member Author

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

@originalfoo originalfoo removed the awaiting feedback More information required label Mar 1, 2019
@krzychu124 krzychu124 added the confirmed Represents confirmed issue or bug label Mar 2, 2019
@krzychu124
Copy link
Member

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
Copy link
Member Author

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

@krzychu124
Copy link
Member

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
Copy link
Collaborator

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 VictorPhilipp self-assigned this Mar 13, 2019
@VictorPhilipp
Copy link
Collaborator

VictorPhilipp commented Mar 13, 2019

@krzychu124 @aubergine10 What were you trying to fix with the addition of isStockUturnPoint?
grafik
Ah, I think I found it: #86 (comment) (this code is erroneous and contributes to this issue)

@VictorPhilipp VictorPhilipp added the investigating Issue currently under investigation label Mar 13, 2019
@VictorPhilipp
Copy link
Collaborator

grafik
another error

@VictorPhilipp
Copy link
Collaborator

VictorPhilipp commented Mar 13, 2019

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
#101 (comment)

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.

#86 (comment)

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?

@VictorPhilipp VictorPhilipp added in-progress The problem is being solved currently need feedback and removed investigating Issue currently under investigation labels Mar 13, 2019
@VictorPhilipp VictorPhilipp added this to the 1.10.17 milestone Mar 13, 2019
@originalfoo
Copy link
Member Author

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
Copy link
Collaborator

VictorPhilipp commented Mar 14, 2019

Ok, I fixed #85 and #101 with 0cb90e3

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

krzychu124 added a commit that referenced this issue Mar 14, 2019
…-highways

#112: Cars using only one lane on highways
@VictorPhilipp VictorPhilipp removed the in-progress The problem is being solved currently label Mar 16, 2019
@originalfoo originalfoo added the PATHFINDER Pathfinding tweaks or issues label Aug 12, 2019
@originalfoo originalfoo added the DLS Dynamic Lane Selection label Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
BUG Defect detected confirmed Represents confirmed issue or bug DLS Dynamic Lane Selection PATHFINDER Pathfinding tweaks or issues
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants