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 with no-stop orders are AVOIDING platforms instead of passing them non-stop #4648

Closed
DorpsGek opened this issue Jun 16, 2011 · 5 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)

Comments

@DorpsGek
Copy link
Member

bugmenot opened the ticket and wrote:

Suppose we have the following railroad scheme:

A -------- === ------- C
B

where:
"-" single track
"A", "C" single platforms
"=", "B" double track section equipped with 4 two-way generic signals on exits AND platform on the one of tracks

Now trains given orders to go from "A" to "C" non-stop WILL NOT use passing track with platform and WILL WAIT until track without platform will be available.

This makes impossible to build realistic low-traffic single track railroads with passing track sections to allow multiple trains travel on the single track railroad.

Reported version: 1.1.1
Operating system: Windows


This issue was imported from FlySpray: https://bugs.openttd.org/task/4648
@DorpsGek
Copy link
Member Author

bugmenot wrote:

webscript ate whitespace, should look as:
A -------- ==B== ------- C


This comment was imported from FlySpray: https://bugs.openttd.org/task/4648#comment10009

@DorpsGek
Copy link
Member Author

michi_cc wrote:

You've probably hit an corner case related to pathfinder penalties. Depending on the
actual track and signal configuration (e.g. number of curves, length of platforms etc.),
the blocked track can still be considered "better" than the free station. This can be
fixed by repducing yapf.rail_station_penalty.

Load the save, open the in-game console and enter the following (the 600 is just a
guess by me, depending on the actual configuration, you might have to try different
values):

set yapf.rail_station_penalty 600


This comment was imported from FlySpray: https://bugs.openttd.org/task/4648#comment10010

@DorpsGek
Copy link
Member Author

MrJones wrote:

But considering the trains can now pass without stopping at the platform, shouldn't the pathfinding for the affected trains not add any train station penalty when the trains aren't required to stop? (as opposed to normal stopping trains which still need to take this into account)

Also if another station-free route is blocked with another train, it shouldn't be that hard to pick its route and compare where it overlaps with the wanted route of the current waiting train, and then calculating how long it needs to leave this overlapping phase. Now if you additionally calculate how long the train station route and the blocked non train station route need in time to get through and the estimated waiting time to get the "shorter" (station free route) is longer than the win, can't it just not wait and take the other?

Or has OpenTTD no mechanisms implemented that return an actual amount of seconds which a train roughly needs to get through a specific passage? That could be very helpful in such corner cases to make decent pathfinding decisions.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4648#comment10013

@DorpsGek
Copy link
Member Author

Rubidium wrote:

The pathfinder has no concept of time, i.e. it won't look into the future to see how long something takes. If it would have such a concept it would become significantly more complex computationally.

For example, you'd have to calculate the route the train will be taking based on the routes other trains will be taking. Furthermore you must predict how long the trains will be at the platform, which requires predicting the amount of generated cargo as well as any other changes such as the arrival of other trains. When you start doing this you'll pretty soon get into dependency loops between vehicles.

The avoidance of stations by pathfinder penalties has been put there so vehicles not stopping at the station will take one of the nearby routes around the station. If you don't like that behaviour, just tweak the pathfinder settings to your likings.

Given the amount of time it has taken for someone to file a report about this, and the amount of times people complained about trains going through a station instead of the bypass makes me think that the former case is less likely to be the predominant view on how trains should behave, and thus what should be the default pathfinder setting.

The pathfinder settings are put there to give the user a lot of control over the decision of the pathfinder, but it is impossible to make one that does exactly what the all users want it to do. With the default settings it does the best thing for the vast majority of cases and users.


This comment was imported from FlySpray: https://bugs.openttd.org/task/4648#comment10014

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Won't fix

Can be fixed by changing the pathfinder setting


This comment was imported from FlySpray: https://bugs.openttd.org/task/4648

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) labels Apr 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/)
Projects
None yet
Development

No branches or pull requests

1 participant