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

YaPF occasionally sends trains on long pointless routes. #5993

Closed
DorpsGek opened this issue Apr 26, 2014 · 3 comments
Closed

YaPF occasionally sends trains on long pointless routes. #5993

DorpsGek opened this issue Apr 26, 2014 · 3 comments
Labels
flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) question Further information is requested

Comments

@DorpsGek
Copy link
Member

EthanG opened the ticket and wrote:

What the summary says: once in a while YaPF will send a train way out into the wild blue yonder... I mean half way across the map. Sometimes there's a visible cause, sometimes not, but usually this alternate path is far longer than waiting for the obstruction to clear, and sometimes causes bad congestion of its own. Sometimes it's even worse than that, the diversion not even proving to be an alternate path at all, but simply a loop which wastes time and congests lines.

Today I found a very long iron ore train turning to go into a short passenger station. Turns out instead of taking a 9-square path from station to waypoint it has gone on a diversion about 200 squares long with numerous junctions. It will take another 200 squares-long path to get back, and the worst part of it is it will have to go through its originating station again to get to the waypoint! This isn't the first time I've seen a train go far out only to have to go back through the station it just left. In the attached screenshot, I have drawn a red arrow to indicate the train and its direction. The labels show the station it has just left and the waypoint it is "heading for".

Attachments

Reported version: other
Operating system: All


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

Rubidium wrote:

I've looked at the location where it left, ran the game for a while and couldn't see any trains going the wrong way.

However, looking at the station, leaving from the "normal" way is probably not what caused the train to go completely "wrong". I think it went to the side with the shorter platforms, and from there it needed to make a huge loop to get to the waypoint.

Basically, from the drop station it took the C branch via Lindean East then south of Dundon, passing Dunway North and then going over the bridge north east of Accdore South instead of diverging to Accdore Waypoint # 2.

If/when there are many trains waiting on the track towards Accdore Waypoint # 2 and not much is happening on the route via Accdore Waypoint # 3, then the pathfinder penalties might be stacked in such a way that the train goes a different way. For example, it considers the first 10 signals, and the occupation of tracks. These penalties could make the other route with the too short station a viable alternative.

The main problem is that there is not one set of pathfinder penalties or rules that makes every vehicle behave as the person that gave it orders envisions it. Currently we have a set that seems to cause fairly little trouble with pathfinding.

To properly figure out what happened in the instance of that train, we need a savegame that reproduces the misbehaviour. Without it, we cannot see how the pathfinder penalties were, and thus whether we can recommend a different set of penalties for your game.

Finally, you seem to be using custom builds of some sort which might also be messing with the pathfinder in some mysterious way. It is therefore important that the misbehaving train also misbehaves in a clean version of OpenTTD, but please state which version that is exactly.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5993#comment13316

@DorpsGek
Copy link
Member Author

Rubidium closed the ticket.

Reason for closing: Not enough information


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

@DorpsGek
Copy link
Member Author

DorpsGek commented Sep 9, 2014

EthanG wrote:

Sorry for not replying, I thought I had. Thanks for the 10-signals hint, I've been keeping that in mind. I added waypoint orders for the train that had the problem, to direct it onto the A branch. You're right about the current pathfinder rules causing little trouble, there's a lot happening on this map but problems are quite rare.

About custom builds, I'll give the hg revision and date of pull on future reports.


This comment was imported from FlySpray: https://bugs.openttd.org/task/5993#comment13505

@DorpsGek DorpsGek added Core flyspray This issue is imported from FlySpray (https://bugs.openttd.org/) question Further information is requested 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/) question Further information is requested
Projects
None yet
Development

No branches or pull requests

1 participant