Page 1 of 1

Race condition affecting orders when upgrading trains

Posted: 28 Aug 2019 12:03
by lcd_47
I have this setup for depots:

Image

The purpose of it is to send trains to the waypoint instead of sending them directly to depots, so they choose whichever depot they can actually enter when they get there instead of having 97% trains picking the depot on the left and 3% the other one while they're still 300 tiles away. This part works well.

Then I'm trying to upgrade the trains, so I change orders as follows, and I issue the replace command:

Image

This sort of works too, the trains go to the depots and are upgraded etc., but when the line gets crowded some (not all) of the trains that exit the depots seem to forget they went past the waypoint and still want to go there.

Any idea?

Re: Race condition affecting orders when upgrading trains

Posted: 10 Sep 2019 01:41
by odisseus
You can make the train go through a waypoint by issuing an appropriate order, but you cannot make it avoid a waypoint — the train will happily pass through if the way to its next goal happens to be through that waypoint.

However, you can place another waypoint on the track that bypasses the depots, and make the trains choose one of the two waypoints depending on their age. The orders might look like this:

Code: Select all

1. Go to station A
2. Jump to order 5 if age < 2
3. Go via depot waypoint
4. Jump to order 6
5. Go via bypass waypoint
6. Go to station B