robot256 / SpaceTrainNetwork

Factorio mod in Lua to dispatch trains
1 stars 0 forks source link

Stress test bugs #4

Open robot256 opened 2 years ago

robot256 commented 2 years ago
suisseWalter commented 2 years ago

dummy_space_test_extra_train.zip I was somehow able to create a set of trains where they think the stations don't have enough space but they both have enough space. I have a space station with 5 slots and a ground station with 3 slots. and in total 6 trains. that should be more then enough for all of them to move between the two stations. somehow they don't. both ends think that they can't move. It might have been caused by editing the proxy stops while some train have already tried to path to them etc. not sure if you need more info. (and not sure if I can exactly reproduce it.

robot256 commented 2 years ago

Well, the first problem is that there was no proxy stop called "testnauvis" in orbit, so the train in orbit never got registered as waiting to go to the surface.

Second problem is as you suspected. There were multiple trains registered in multiple states for both stops. I actually think it's because there is no schedule condition arriving at the Global Stops, so the train doesn't change states properly as it arrives. It doesn't get removed from the "pathing" or "arriving" state at one stop before getting added to the other stop. Thanks for some more edge cases to test.