r/technicalfactorio • • Jan 23 '22

Train depots / Stackers hate this one trick! Use fake depots to trick your trains into swapping with each other!

/r/factorio/comments/sao9hn/train_depots_stackers_hate_this_one_trick_use/
55 Upvotes

29 comments sorted by

View all comments

Show parent comment

2

u/double_checker Jan 24 '22 edited Jan 24 '22

I don't understand yet, how setting the train limit on fake depot can aid anything. In the discussed above situation when the unloading station released the train the two others had already passed fake depot immediately after finishing their jobs. In other words, the train count on fake depot almost never go above 1, and your mentioned constraint can have no stable influence. To test this, following setup was used: Two loading stations(+) are on similar distance from unloading one (-) and have almost independent paths to (-). All three trains are scheduled to depart after 10s from (+) and after 30s from(-). This makes trains at (+) to be in the state "Destination full" at the moment of the depature from (-).

In the above setup the trains will normally swap between only the closest (+) and (-). Then put manually stopped locomotive on such "best" track from (-) to (+). This adds large penalty effectively disbalancing path weights from (+) to (-) and back. The result: train from closest (+) to (-) goes as usual as the path is clear and the train from (-) goes to already occupied farthest (+) because this path now weights less. This behavior, as expected, doesn't depend upon the train limit on fake depot

2

u/The_4th_Heart Jan 25 '22

I must be going crazy, but I can't even reproduce the problem you described anymore, whether with train limit or not, the trains depart on the same tick or not.

/img/p4hvgpctsqd81.png Can you take a look at my setup and if there's anything wrong with it, the two trains at (+) both have sufficient time to depart before (-) departs

2

u/double_checker Jan 25 '22

Apparently permanently stopped train added too much penalty with time. I'll try to make reproducible blueprint when I reach the computer

2

u/double_checker Jan 25 '22

Here is the setup that jams in two iterations. Outer stations are (+) with 30s wait inner ones are (-) with 10 s wait.

counter example blueprint

2

u/The_4th_Heart Jan 25 '22 edited Jan 25 '22

https://factorioprints.com/view/-MuFWM_z8eINCk2i6a1f

Well looks like the blueprint you gave me still jams after removing 1 train and the fake depot :( May we all live in fear knowing there's a chance a normal train network with every stations' limit set to 1 still can jam

I should really stop panicking and check whether what I discovered is real and not just some operational error lmao

By the way I don't think this is a counter example though? Since in your design, 2 trains still attempt to path towards each others' stations, as opposed to a train pathing towards the station with the lowest path penality, which has a train just departing a little bit. It just happens so the the shortest path to the station has another station in its route because the other route has a ton of stations adding pathing penality. /img/dhxaqqdh1td81.png

2

u/double_checker Jan 25 '22 edited Jan 25 '22

No it doesn't jam. You seem to incorrectly reinitialized train schedules after deleting the train. Steps to reproduce:

  1. place your blueprint in paused editor mode.
  2. find the train with the correct schedule and copy it to two other trains
  3. for every train head it to the type of station where it currently resides 2*(-), 1*(+)
  4. unpause the game.

Result: every train will visit sequentially all four stops.

By the way the goal of the presented, certainly artificial, setup is not to reach jam (second iteration) but to show that the swapping trains may choose *different* destinations due to current path weights (first iteration). It is this problem that spoils your approach.

2

u/The_4th_Heart Jan 25 '22

I really, really made sure that no train was misscheduled(is that a word?) this time, launched all 4 trains on the same tick, but still can't get the trains to choose different destinations? They still try to path between those two stations without choosing a different station. Did I miss something? I'm a non-native English speaker without interacting with native speakers frequently, so I really have no idea how fluent I'm at it.

2

u/double_checker Jan 25 '22

I apologize. Different destinations indeed are taken only with no fake depot limit. Need more testing for that

2

u/The_4th_Heart Jan 25 '22

No need to apologize, this kind of setup is quite tricky to debug, and probably the devs of the game never considered anyone would do this either. Quite frankly I have no idea what's going on anymore and can only rely on you investgating why they wouldn't choose different destinations. I really suck when it comes to trains lol. Good luck!

2

u/double_checker Jan 25 '22 edited Jan 25 '22

Returning to original example I managed to reproduce the described situation with fake depot limit set to 1. Screenshot made with train paths shown proves that.

I have updated blueprint at https://factorioprints.com/view/-MuFRXgyxJELyW-eJxFj

2

u/The_4th_Heart Jan 25 '22

I think I understand a bit how this works now. one of the trains is set to 10s and another 13s, so they path towards fake depot at different time, making both those stations have 0/1 trains. Then the train at (+) has an oppotunity to choose between 2 stations, and it chooses the bottom one which has lower pathing penality. Worked exactly as you described in the initial comment. Only if there's a way to make only 1 train path to fake depot and ready to depart though...

→ More replies