Moderator: OpenTTD Developers
What am I and/or the default train AI doing wrong?
These stations and junctions will work all right when there are just a few trains; but, as the train density increases, deadlock becomes more and more likely, and at some point it is guaranteed to happen.
Contrary to Locomotion, the pathfinder in OpenTTD is not smart enough to avoid such situations. If a train needs to pass through a signal block that contains a junction, the train will enter that block even if the next block is occupied. If the train cannot leave the junction quickly, other directions become blocked too.
However, building deadlock-proof networks is surprisingly easy once you understand how path signals work.
A different kind of deadlock can happen if you use a station for both loading and unloading cargo. To avoid it, just use separate stations for loading and unloading.
Use 'path signals'.
Any signal before a junction should be as close as possible to the junction.
Any signal after a junction should be at least the distance of the length of the longest train on the system.
Example train length of ten, distance between junction and first signal after junction 10 squares.
Then it is impossible for a train to block a junction. EDIT: unless it breaksdown.
- L. Spooner Transport, Jun 4th, 2000.sav
- (568.55 KiB) Downloaded 46 times
Then remove all signal after the junctions (as mentioned before) at Wruntfield also reduce the Depots to one.
There may be more, adding more track to try and reduce blockages does not always work, my plan is KISS, Keep It Simple Stupid.
I don't know if it can be easily solved. It seems complicated to me. Certainly, however, this bug is much more likely to occur when 90 turns are on * (red option color). When they are turned off * (green option color), the probability that trains will block in this way is much lower.
There are three saves here
On the first one the train will follow an absurd route and it will block itself on a small loop. On the second, the situation is identical, but the train will travel normal route. On the third - to make it more interesting - the train will wait in the depot until the correct route slows down.
As for what you could do / not do to make the traffic smoother and trains not block each other, I would have a few comments:
0. Enable* the option forbidding trains to perform 90° turns.
1. Where you give full load, trains waiting to enter the station block the route of other trains - there is no place where they could stop without blocking traffic. There are several solutions. The most effective are associated with the use of depot(s).
2. You allow trains to service whenever and wherever they want. If you want traffic to run smoothly, every servicing should be planned. You do not need to designate depots in orders - you can force the service to build routes accordingly.
3. You don't use shared orders - this is a very basic mistake. If you would like to change orders for a group of vehicles you will have to do it for each vehicle separately. With sharing, by changing the orders for one train, you change them for the whole group.
4. You don't use "Go non-stop" orders - this is also a very basic mistake, which can cause a huge mess if cargodist is enabled.
5. Unloading and loading or loading of different goods takes place on the same platforms, which can very quickly lead to blockage or, at best, to reduce production.
6. You build routes with sharp turns that slow down traffic.
7. If you care about keep single-level intersections that you build, it will be difficult to significantly increase the capacity of the line.
Regarding some remarks*... * This is one of the most illogical settings in the game. How can you turn off turning on (green color)? Turning it on should mean allowing and the green color, turning it off: forbiding and the red color, otherwise it will be confusing.
As near as I can tell, my problem seems to come from scaling things up. As long as there's some slack in the system things work fine. As I add more trains, all it takes is a single blockage anywhere, and everything, everywhere becomes completely and permanently blocked with no way to fix it since I use one-way track and you can't add new track underneath trains. The thing which is frustrating me is I can tell there's something fundamental I'm not understanding. Is it that I'm throwing too many trains onto too little track? It's irritating to build new rail beside existing lines, as you have to dismantle all your interchanges to do it, and because you can't add fresh rail underneath trains, you need to send everything to a depot and lose six months of income and risk borderline resources poofing out of existence.
I don't mind challenge, but I get angry when it feels like I'm fighting the game instead of the challenges within the game. Am I just stupid?
A station full with no trains leaving will most often be if a primary industry shut down (so no goods is arriving on the station), or if a station is full of trains trying to pick up a secondary cargo and no trains can enter to deliver the required primary cargo. (For example, an oil refinery with a single station, all tracks occupied by trains trying to pick up goods, so no oil is getting delivered and no goods produced.)
The solution to this is having separate drop-off and pick-up stations, and making sure trains going to one can't (easily) be blocked by trains wanting to go to the other. A good way to ensure that is to not have too many trains. If trains are queuing up in front of a station where they want to pick up cargo, you have too many trains compared to the production level.
Deadlocks in junctions occur if signals are placed such that trains stopping in front of the signals can block switches other trains might need to pass.
The golden rule of path signals is to only place signals where a train would be able to wait without blocking trains going in other directions.
Anyway, when your network gets blocked, the thing to do is examine your stations and junctions, and look for causes.
(And if the game is frustrating you, my best suggestions would be to first pause, save, and take a walk outside. )
It is possible to design a deadlock-proof network by following a set of simple rules, but still adding trains past the limit will decrease the total throughput of the network. The only way to progress from that point is raising the limit by redesigning your network; designing with future expansion in mind is one of the game's challenges.
Users browsing this forum: No registered users and 2 guests