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

Lane changes happen at toll boothes #225

Closed
VictorPhilipp opened this issue Mar 8, 2019 · 12 comments · Fixed by #355
Closed

Lane changes happen at toll boothes #225

VictorPhilipp opened this issue Mar 8, 2019 · 12 comments · Fixed by #355
Assignees
Labels
BUG Defect detected confirmed Represents confirmed issue or bug EXTERNAL Mod conflict or other external factor LANE ROUTING Feature: Lane arrows / connectors PATHFINDER Pathfinding tweaks or issues under-review A pull request has been created and is currently being reviewed
Milestone

Comments

@VictorPhilipp
Copy link
Collaborator

VictorPhilipp commented Mar 8, 2019

Temporary Workaround

Use the lane connector tool, click the toll booth road node(s) and then press Shift+S to set them all "ahead only"


They should not.

@VictorPhilipp VictorPhilipp added the confirmed Represents confirmed issue or bug label Mar 8, 2019
@VictorPhilipp VictorPhilipp added this to the 1.10.17 milestone Mar 8, 2019
@VictorPhilipp VictorPhilipp self-assigned this Mar 8, 2019
krzychu124 added a commit that referenced this issue Mar 8, 2019
@originalfoo
Copy link
Member

@VictorPhilipp Was this still happening recently (likely due to DLS)? If so should this be reopened?

@originalfoo originalfoo changed the title Lane changes happen at tollboothes Lane changes happen at toll boothes Apr 4, 2019
@originalfoo
Copy link
Member

This seems to be most recent change to toll booth lane swapping: 63a653c

@originalfoo
Copy link
Member

Video of issue still happening on v10.18, via @FireController1847

https://www.youtube.com/watch?v=MYdVGrpmJCQ&feature=youtu.be

@originalfoo originalfoo reopened this Apr 4, 2019
@originalfoo
Copy link
Member

Still happening in 10.20

Screenshot_3

@SubaruSVX
Copy link

SubaruSVX commented May 23, 2019

I was the one who had that picture.

My savegame:
https://steamcommunity.com/sharedfiles/filedetails/?id=1736078702

Where this picture was taken - if you spot the three-way interchange that leads into a city area (not the Bork and Heck University one), you should see that cars are piling up and in some cases, changing lanes in the toll booth.

Also, forgive me, but I use Real Time, so there's a rather long wait.

@SubaruSVX
Copy link

Temporary workaround:

This doesn't quite apply to emergency vehicles, but if you were go into the lane connector nodes and press Shift + S where the cars stop in the toll booth, you can get the cars to stay in their lane when they pass the toll booth.

@VictorPhilipp VictorPhilipp modified the milestones: 1.10.17, 10.21 May 27, 2019
@VictorPhilipp VictorPhilipp added the in-progress The problem is being solved currently label May 27, 2019
@originalfoo originalfoo added the BUG Defect detected label May 27, 2019
@VictorPhilipp
Copy link
Collaborator Author

VictorPhilipp commented May 31, 2019

The code that determine (whether the node represents a toll booth or not) / (whether lane changes are possible) is erroneous.
https://github.com/FireController1847/Cities-Skylines-Traffic-Manager-President-Edition/blob/589be86a2a7272622ba22247c5c1b2b5c5f5b4b2/TLM/TLM/Manager/Impl/RoutingManager.cs#L313

A correct way would be to

  1. check whether the transit node is associated with a toll booth
  2. If yes: prohibit lane changes

@VictorPhilipp
Copy link
Collaborator Author

VictorPhilipp commented May 31, 2019

The method I described above would require running a grid search for every road node on every geometry update.

@VictorPhilipp
Copy link
Collaborator Author

VictorPhilipp commented May 31, 2019

Luckily the draw on performance is not significant. Regular vehicles should now stay in their respective lane. Yet emergency vehicles on duty still change lanes at toll boothes. Actually, I think this is something CO has to fix. Their code does not check whether lane changes are allowed/possible (see VehicleAI.FindBestLane). I will ask them on Monday if they are aware of this problem.

@originalfoo
Copy link
Member

So, toll booths are just buildings (with a sub building), for example Twoway Toll Booth Medium 01 which is in category Road:

Twoway Toll Booth Medium 01

and its sub building, Twoway Toll Booth Medium 01 Sub in same category:

Twoway Toll Booth Medium 01 Sub

Can we have a lookup list of nodes, the size of list being whatever the game limit is for nodes, and store the details about nodes in there? One of the details being "is this a toll booth" another detail being "is this straight ahead only" and so on? (or is that what already happens?)

Each time a toll booth building (identified by its AI) is placed, moved or removed, the lookup list gets updated accordingly.

It would be useful to have a consistent 'single source of truth' that the pathfinder can use, to remove as much branching as possible from the decision making code in the pathfinder (and vehicle AIs too if applicable).

@VictorPhilipp
Copy link
Collaborator Author

Routing decisions are already precalculated by RoutingManager. It operates at simulation time (not during path-finding) and updates routing data only if a change in the traffic network is detected.

@VictorPhilipp VictorPhilipp added the EXTERNAL Mod conflict or other external factor label Jun 2, 2019
@VictorPhilipp
Copy link
Collaborator Author

Ok, so CO is aware of the issue with the emergency vehicles. But on the other hand, since TMPE does routing a bit differently we should fix that too.

@VictorPhilipp VictorPhilipp added under-review A pull request has been created and is currently being reviewed and removed in-progress The problem is being solved currently labels Jun 6, 2019
@originalfoo originalfoo added PATHFINDER Pathfinding tweaks or issues LANE ROUTING Feature: Lane arrows / connectors labels 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 EXTERNAL Mod conflict or other external factor LANE ROUTING Feature: Lane arrows / connectors PATHFINDER Pathfinding tweaks or issues under-review A pull request has been created and is currently being reviewed
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants