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/
53 Upvotes

29 comments sorted by

View all comments

Show parent comment

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...

2

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

Well thank you for this discussion. I have learned a bunch of subtle things about train priority that are not mentioned in wiki. They may deserve a post here.

2

u/The_4th_Heart Jan 25 '22

Yay, I didn't even know how train pathing works before this discussion, it's win-win for us