So this was working fine until tonight.. and all of a sudden good travelling from Larnington Valley to Trendinghattan woods are going around in circles and getting lost.... I did a little bit of expanding tracks in the middle of the route (junction near renhill) but I cannot see any reason that the trains would be refusing to make the journey.
I tried sending all trains to depot to clear up any clogs and upon releasing them again they are lost again.
Help? Thanks
Why are my trains going around in circles?
Moderator: OpenTTD Developers
Why are my trains going around in circles?
- Attachments
-
- Nay March 2021.sav
- (8.29 MiB) Downloaded 72 times
Re: Why are my trains going around in circles?
train jam
- Attachments
-
- Fort Trunwell Transport, 2057-03-08.png
- (2.9 MiB) Not downloaded yet
Re: Why are my trains going around in circles?
Well, because you allow them to.
Your station layout allows trains to wait in unfortunate locations, and doesn't have a clear way in separate from the way out.
I notice you have individual orders for all your trains, instead of using shared orders. Using shared orders makes it much easier to manage your vehicles, and could let you change all of them at once. What I would suggest is also adding a waypoint on the route to Trendinghattan Woods.
Overall, I think your problem is that most of your track is bidirectional instead of unidirectional, and you have crossovers everywhere even places they aren't needed. It confuses the pathfinding.
You should also be careful about having stations shared between loading and unloading trains. You can end up with all the platforms taken up by loading trains, so unloading trains can never get in and unload, and so the loading trains will never get any cargo because the industry can never produce anything without raw material.
Your station layout allows trains to wait in unfortunate locations, and doesn't have a clear way in separate from the way out.
I notice you have individual orders for all your trains, instead of using shared orders. Using shared orders makes it much easier to manage your vehicles, and could let you change all of them at once. What I would suggest is also adding a waypoint on the route to Trendinghattan Woods.
Overall, I think your problem is that most of your track is bidirectional instead of unidirectional, and you have crossovers everywhere even places they aren't needed. It confuses the pathfinding.
You should also be careful about having stations shared between loading and unloading trains. You can end up with all the platforms taken up by loading trains, so unloading trains can never get in and unload, and so the loading trains will never get any cargo because the industry can never produce anything without raw material.
- Attachments
-
- This train is waiting in an unfortunate position
- openttd_2021-05-01_09-42-59.png (101.08 KiB) Viewed 1114 times
-
- This is a straight line with one track per direction, you don't need crossovers (they only cause problems)
- openttd_2021-05-01_10-21-55.png (130.45 KiB) Viewed 1114 times
-
- Changing the station to a Ro-Ro layout lets the trains pathfind better and avoids sharing tracks for ingoing and outgoing trains
- openttd_2021-05-01_10-23-22.png (202.39 KiB) Viewed 423 times
Re: Why are my trains going around in circles?
All the 90 degree turns and two-way loops cause the pathfinder to bail out before it can find a path. This is why so many trains are lost.
You can open the console and type `set pf.yapf.max_search_nodes 20000` (double the default maximum), but you'll need to manually fix the trains that are stuck.
Basically, what jfs said
You can open the console and type `set pf.yapf.max_search_nodes 20000` (double the default maximum), but you'll need to manually fix the trains that are stuck.
Basically, what jfs said
He's like, some kind of OpenTTD developer.
Re: Why are my trains going around in circles?
set pf.yapf.max_search_nodes 20000 did the trick, thank you Is there any reason I can't just set this to 20,000,000? What exactly does it change?
Re: Why are my trains going around in circles?
It changes how far the pathfinder will look for a route to the destination. Raising it can cause the game to use more CPU to route trains, meaning potentially much lower framerates.
The best long-term cure is still to simplify your network so trains don't have so many choices all the time. Make dedicated tracks for each direction instead of both-direction tracks, and avoid crossovers on long stretches of tracks. Using waypoints can also help since the trains don't need to pathfind as far at a time.
The best long-term cure is still to simplify your network so trains don't have so many choices all the time. Make dedicated tracks for each direction instead of both-direction tracks, and avoid crossovers on long stretches of tracks. Using waypoints can also help since the trains don't need to pathfind as far at a time.
Who is online
Users browsing this forum: No registered users and 21 guests