Set priority for FILTER variant inserters to remove from partial stacks before full stacks.
Posted: Thu Jun 04, 2020 7:58 am
Edit: After some discussion of this on discord, I was told that the behavior described below would likely have terrible consequences for performance once the thousands of inserters in a big save got working. I was wondering if it maybe could still be implemented if it was reserved for filter (stack) inserters only? There aren't nearly as many of those around and really those are the only inserters where it matters what stack they remove an item from.
The last issue I face is the following:
As the loading inserters move the bot-delivered surplus into the wagon, the unloading inserters begin their work of balancing the load. This can cause previously filled slots to be freed again. As soon as one of the other items also has its surplus loaded, that surplus will end up in the newly free slot to the left of that item's old full-stack. The unloading inserters next remove that surplus from the full stack, leaving you with two partial stacks that would otherwise make up a whole. It happens only if you fill a wagon with different items.
I cannot think of a way to fix this issue with circuits without reintroducing other issues that are even more disruptive or limit flexibility by an unacceptable degree. If on the other hand inserter behavior was consistent between load and unload, this issue would be gone instantly. I'm in the process of creating a station that can handle the behavior above, and the number of hoops to jump through is quite frankly ridiculous. You end up chasing issues in circles because of the unfortunate implications the current behavior displays when combined with some of their other limitations (such as the inability to set EACH as the stack size control signal).
TL;DR
Inserters currently add first to partial stack, and second to the left-most free slots. But they always remove from the right-most slot, which is an inconsistency.What?
I would like to suggest, that much as inserters first add to partial stacks before considering which new slot to put an item in, they should also first remove from partial stacks, before considering which full-stack to remove items from.Why?
I have built a pretty good and stable smart loading and unloading system. It uses circuitry to solve all kinds of issues related to stack size control and filter setting, as well as keeping track of what's in the wagon and what has been removed.The last issue I face is the following:
As the loading inserters move the bot-delivered surplus into the wagon, the unloading inserters begin their work of balancing the load. This can cause previously filled slots to be freed again. As soon as one of the other items also has its surplus loaded, that surplus will end up in the newly free slot to the left of that item's old full-stack. The unloading inserters next remove that surplus from the full stack, leaving you with two partial stacks that would otherwise make up a whole. It happens only if you fill a wagon with different items.
I cannot think of a way to fix this issue with circuits without reintroducing other issues that are even more disruptive or limit flexibility by an unacceptable degree. If on the other hand inserter behavior was consistent between load and unload, this issue would be gone instantly. I'm in the process of creating a station that can handle the behavior above, and the number of hoops to jump through is quite frankly ridiculous. You end up chasing issues in circles because of the unfortunate implications the current behavior displays when combined with some of their other limitations (such as the inability to set EACH as the stack size control signal).