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

Trains Maintain Their Lanes (hey that rhymes) #230

Closed
andreharv opened this issue Mar 13, 2019 · 5 comments
Closed

Trains Maintain Their Lanes (hey that rhymes) #230

andreharv opened this issue Mar 13, 2019 · 5 comments
Assignees
Labels
Annoyance Not a bug, but just as annoying confirmed Represents confirmed issue or bug PATHFINDER Pathfinding tweaks or issues
Milestone

Comments

@andreharv
Copy link

The code may already be in here (just needs to be reorganized) but as quad tracks are soon to become a thing, it would be nice to have vehicles (trains in this case) favor the lane they are on rather than switching lanes for a slight distance difference in curves. The exception to this, of course, would be if the placed stops mandated a lane change which would mainly be an issue for quad tracks with central bypass lanes. Otherwise there would be no reason for a lane change as all junctions naturally connect all compatible lanes. I don't remember if the pathfinding is a weighted system but basically this would all be fixed if more 'weight' was added to changing lanes. That way trains would not do it unless there was no other way to reach their endpoint or the speed difference between the lanes outweighed the lane change (which I would imagine would be rare).

@andreharv
Copy link
Author

Ok giving this 2 seconds of thought, it is very similar to #89 Medians. It will operate the same as a road that has medians separating each lane, except at 3+ network junctions.

@originalfoo
Copy link
Member

The issue of vehicles changing lanes for a slightly shorter distance at curves also affects highways in a most annoying manner: #112

@VictorPhilipp
Copy link
Collaborator

Path-finding uses average segment length for cost calculation, not lane length. Your issue must be caused by something else.

@VictorPhilipp VictorPhilipp added the enhancement Improve existing feature label Mar 14, 2019
@VictorPhilipp VictorPhilipp self-assigned this Mar 14, 2019
@VictorPhilipp VictorPhilipp added the in-progress The problem is being solved currently label Mar 14, 2019
@VictorPhilipp
Copy link
Collaborator

@andreharv This only occurs for one-way tracks, correct?
grafik

@VictorPhilipp VictorPhilipp added this to the 1.10.17 milestone Mar 14, 2019
@VictorPhilipp VictorPhilipp added Annoyance Not a bug, but just as annoying confirmed Represents confirmed issue or bug and removed enhancement Improve existing feature labels Mar 14, 2019
VictorPhilipp added a commit that referenced this issue Mar 14, 2019
krzychu124 added a commit that referenced this issue Mar 14, 2019
@andreharv
Copy link
Author

andreharv commented Mar 15, 2019

Yes. This is only an issue on one way tracks and quad tracks (MOM). MOM QuadTracks Build (it's near complete). You can use it to test pathfinding if that helps. I'm sure that if anyone comes out with quad tracks for passenger rail the same logic will apply. It will be a lot easier to see when putting down quad tracks and stations. All the lanes are the same speed except for the bypass station tracks (outer tracks are stations and inner tracks are bypass).

@VictorPhilipp VictorPhilipp removed the in-progress The problem is being solved currently label Mar 16, 2019
@originalfoo originalfoo mentioned this issue Mar 30, 2019
@originalfoo originalfoo added the PATHFINDER Pathfinding tweaks or issues label Aug 12, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Annoyance Not a bug, but just as annoying confirmed Represents confirmed issue or bug PATHFINDER Pathfinding tweaks or issues
Projects
None yet
Development

No branches or pull requests

3 participants