[1.1.85] Inserters get stuck when transferring stuff between containers with mixed filters
Posted: Fri Jun 23, 2023 5:28 am
This is an old issue and not specific to any of the newer versions as far as I know.
Imagine you have two cargo wagons. Each wagon has filters set up, where one slot is reserved for copper plates and one slot is reserved for iron plates, all other slots are disabled. The first wagon is full (with one full stack of copper plates, one full stack of iron plates), the second wagon is half-full (~half stack of iron plates, ~half stack of copper plates).
Now imagine you put an inserter (long-handed, obviously) to move stuff from the first wagon to the second one. Most of the time it will top up both the iron and copper plate stack of the second wagon using resources from the first one, but occasionally it will top up say the iron plates stack and then instead of picking up a copper plate it will pick up another iron plate and get stuck, since there's no place for it in the destination.
This problem is much more pronounced if you put a filter to a different kind of item into every wagon slot (say, one slot for iron ore, one slot for iron plates, one slot for iron gears, etc etc) and start moving resources between wagons using long-handed inserters. It's also made worse by high-capacity inserters and if you move stuff in and out of these wagons at the same time either manually or to supply assemblers for examples. However, it does indeed sometimes reproduce with just 2 wagons, 2 resources and 1 inserter.
This setup is useful for creating train/vehicle-based malls for example and all sorts of other things such as mixed train stations.
Expected behaviour:
I expect inserters to never pick up an item if the destination has no room for it. There can be further complications if the destination gets full due to something else topping it up while inserter is "in flight", then the only solution would be to "reserve" space in the destination container as soon as inserter picks up an item, but I'm not sure if that's feasible.
If this issue is hard to reproduce, I can provide an exact screenshot and/or save file.
Imagine you have two cargo wagons. Each wagon has filters set up, where one slot is reserved for copper plates and one slot is reserved for iron plates, all other slots are disabled. The first wagon is full (with one full stack of copper plates, one full stack of iron plates), the second wagon is half-full (~half stack of iron plates, ~half stack of copper plates).
Now imagine you put an inserter (long-handed, obviously) to move stuff from the first wagon to the second one. Most of the time it will top up both the iron and copper plate stack of the second wagon using resources from the first one, but occasionally it will top up say the iron plates stack and then instead of picking up a copper plate it will pick up another iron plate and get stuck, since there's no place for it in the destination.
This problem is much more pronounced if you put a filter to a different kind of item into every wagon slot (say, one slot for iron ore, one slot for iron plates, one slot for iron gears, etc etc) and start moving resources between wagons using long-handed inserters. It's also made worse by high-capacity inserters and if you move stuff in and out of these wagons at the same time either manually or to supply assemblers for examples. However, it does indeed sometimes reproduce with just 2 wagons, 2 resources and 1 inserter.
This setup is useful for creating train/vehicle-based malls for example and all sorts of other things such as mixed train stations.
Expected behaviour:
I expect inserters to never pick up an item if the destination has no room for it. There can be further complications if the destination gets full due to something else topping it up while inserter is "in flight", then the only solution would be to "reserve" space in the destination container as soon as inserter picks up an item, but I'm not sure if that's feasible.
If this issue is hard to reproduce, I can provide an exact screenshot and/or save file.