Need your help to optimize a buffer zone

Don't know how to use a machine? Looking for efficient setups? Stuck in a mission?
Binoculars
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Wed Dec 02, 2020 6:17 pm
Contact:

Need your help to optimize a buffer zone

Post by Binoculars »

Hello Factorian friends,

The text below will be translated from French to English using Google Translate.

Image


I've created a buffer that I'm not entirely satisfied with. Ideally, I'd like the chests to empty equally and synchronously. My creation works when the buffer input is no longer powered, but not when the input or output are intermittent. This means that some chests, especially the first two, no longer contain the same number of items as the others.

My creation includes an inactivity detector (middle left in the image). I had the idea of ​​adding this, but I don't know how to incorporate it into this creation. If it helps, I'll leave it here. I've also added an alternator at the output so that you (at least those who will participate) can see how the inserters behave at the output.

I thank in advance anyone who helps me. Please be indulgent, my skills with logic circuits are quite limited.
Attachments
Factorio.png
Factorio.png (1.4 MiB) Viewed 539 times
Tertius
Smart Inserter
Smart Inserter
Posts: 1282
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Need your help to optimize a buffer zone

Post by Tertius »

Don't build a buffer as bypass. Instead, build just the buffer. Fill a bunch of chests with your input belt(s), balanced.
And add inserters that pull items balanced from the chests and create the outgoing belt(s) from that. Every item is always put into the chests, then taken out again. No bypass. This way the chests get fuller or emptier automatically, depending on if the outgoing belt removes more than the input provides or vice versa.

Example:
06-05-2025, 23-40-25.png
06-05-2025, 23-40-25.png (63.97 KiB) Viewed 505 times
Binoculars
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Wed Dec 02, 2020 6:17 pm
Contact:

Re: Need your help to optimize a buffer zone

Post by Binoculars »

Thanks for your feedback Tertius, but that's not what I want to achieve. I don't actually use a buffer zone in my factory, but it allows me to better present a future project, which is more complex, but which notably requires that boxes are emptied fairly. Loading boxes fairly at the entrance is relatively easy, even with my limited skills. Unloading is governed by broader parameters, and I can't figure this out.
robot256
Smart Inserter
Smart Inserter
Posts: 1201
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Need your help to optimize a buffer zone

Post by robot256 »

You can always add a bypass route instead of having the buffer directly in series between input and output.

You need to identify the reasons for the uneven unloading before you can fix it. Tertius's example solves one issue, which is that the inserters placing items farther from the exit will unload faster, since the belt is less crowded and there is more empty space for them to fill up. Since each inserter places items at the input of a balancer, they get used evenly no matter how full or backed up the outpuy belt is.

The second issue, which Tertius's example does not yet address, is that each crate is being emptied onto just one lane of the belt. When the consumer uses one lane more than the other, crates feeding that lane will be emptied faster. The solution is to put a lane balancer at the output of the buffer. This way, for every two items drawn by the left lane, one will come from a left-side crate and one will come from a right-side crate.

In conclusion, circuits are not needed if you have space to place splitters/balancers and a lane balancer on the output.
Nidan
Filter Inserter
Filter Inserter
Posts: 315
Joined: Sat Nov 21, 2015 1:40 am
Contact:

Re: Need your help to optimize a buffer zone

Post by Nidan »

Does a combined madzuri loader & unloader suffice? If not, why?
Binoculars
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Wed Dec 02, 2020 6:17 pm
Contact:

Re: Need your help to optimize a buffer zone

Post by Binoculars »

Nidan wrote: Fri Jun 06, 2025 2:06 am Does a combined madzuri loader & unloader suffice? If not, why?
Excuse me Nidan, what exactly is a Madzuri Charger? Is it a creation that allows you to uniformly empty a set number of chests?
Tertius
Smart Inserter
Smart Inserter
Posts: 1282
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Need your help to optimize a buffer zone

Post by Tertius »

If you need lane balancing at the output and even chest unloading, you can append lane balancers:
The input is already balanced, because the input inserters are always able to consume more than can be delivered.
06-06-2025, 09-20-55.png
06-06-2025, 09-20-55.png (323.21 KiB) Viewed 388 times
About mechanical balancing, see raynquists balancer compilation (I consider this an essential resource): https://github.com/raynquist/balancer/b ... r_book.txt
Binoculars
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Wed Dec 02, 2020 6:17 pm
Contact:

Re: Need your help to optimize a buffer zone

Post by Binoculars »

Thank you, Tertius, but as mentioned earlier, I mainly need to fairly clear the coffers for another project. I'm requesting this in the form of a stamp because it's easier to present it that way.

In any case, I wasn't aware of the projects you shared, so I'm keeping these.

I think my project is missing little to be fully functional.
Tertius
Smart Inserter
Smart Inserter
Posts: 1282
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Need your help to optimize a buffer zone

Post by Tertius »

Binoculars wrote: Fri Jun 06, 2025 7:31 am I mainly need to fairly clear the coffers for another project. I'm requesting this in the form of a stamp because it's easier to present it that way.
I'm sorry, but I don't understand these sentences. What do you mean with "...for another project" and "form of a stamp"? Why will the proposed setups not work as you requested? Did you try them?
Binoculars
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Wed Dec 02, 2020 6:17 pm
Contact:

Re: Need your help to optimize a buffer zone

Post by Binoculars »

Tertius wrote: Fri Jun 06, 2025 7:45 am
Binoculars wrote: Fri Jun 06, 2025 7:31 am I mainly need to fairly clear the coffers for another project. I'm requesting this in the form of a stamp because it's easier to present it that way.
I'm sorry, but I don't understand these sentences. What do you mean with "...for another project" and "form of a stamp"? Why will the proposed setups not work as you requested? Did you try them?
Please excuse me, this must be a translation error (Google Translate, I'm French).

I have a larger project that requires the chests to empty evenly. I had the idea of ​​creating a buffer zone to run different tests, but I couldn't get the desired result.

I tried my designs. They work perfectly if the output is smooth. But if the output were to intermittently block, the chests start to empty differently from each other.
Tertius
Smart Inserter
Smart Inserter
Posts: 1282
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Need your help to optimize a buffer zone

Post by Tertius »

An even unload is ensured for my examples in the second post. No matter how uneven the unloading is performed. Just one lane, complete block, slow, fast. All the chests will be empty within the same second. No circuit control required. That's because of the balancers at the output.
Binoculars
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Wed Dec 02, 2020 6:17 pm
Contact:

Re: Need your help to optimize a buffer zone

Post by Binoculars »

Tertius wrote: Fri Jun 06, 2025 9:15 am An even unload is ensured for my examples in the second post. No matter how uneven the unloading is performed. Just one lane, complete block, slow, fast. All the chests will be empty within the same second. No circuit control required. That's because of the balancers at the output.
I tried your creations. First of all, thank you for sharing. However, the chests do not contain exactly the same number of items.

I know this may seem like a surprising request, but for my upcoming creation, it is imperative that the chests contain the same number of items, all the time.
Tertius
Smart Inserter
Smart Inserter
Posts: 1282
Joined: Fri Mar 19, 2021 5:58 pm
Contact:

Re: Need your help to optimize a buffer zone

Post by Tertius »

Exactly the same amount? Not even 1 item off? That's a very hard constraint. I recommend you revisit your greater approach in general to not have this constraint. What are you trying to do? I don't have an idea where such a constraint would be required or useful.

What you can do is exactly control the amount of items an inserter is moving. Dynamically set a stack size and the inserter will grab exactly that amount. Use this to exactly control the movement of items to where you want to have it (that part you didn't show yet). Don't control some chest in the queue before that, instead control the inserter that's moving the items to the machinery that wants the exact amount - the machine where the exact amount really matters.
But chests are just big heaps, usually it's irrelevant if there are 10 items more or less in them.
robot256
Smart Inserter
Smart Inserter
Posts: 1201
Joined: Sun Mar 17, 2019 1:52 am
Contact:

Re: Need your help to optimize a buffer zone

Post by robot256 »

Binoculars wrote: Fri Jun 06, 2025 9:35 am
Tertius wrote: Fri Jun 06, 2025 9:15 am An even unload is ensured for my examples in the second post. No matter how uneven the unloading is performed. Just one lane, complete block, slow, fast. All the chests will be empty within the same second. No circuit control required. That's because of the balancers at the output.
I tried your creations. First of all, thank you for sharing. However, the chests do not contain exactly the same number of items.

I know this may seem like a surprising request, but for my upcoming creation, it is imperative that the chests contain the same number of items, all the time.
Okay, that sounds like a very difficult requirement not usually associated with a buffer system. In a buffer, typically you specify a limit for how unbalanced the chests can become before the circuitry slows down one or more chests to allow the others to catch up. This ensures maximum throughput most of the time.

So what you want is not actually a buffer, but an item counter/computer. To keep the chest contents EQUAL at EVERY tick, you can't rely on measuring the imbalance and correcting it after the fact. You will need to time the inserter swings so they all move simultaneously with the same number of items, so that the contents of each chest can be predicted exactly.

Obviously this begs the question of why such a strict requirement is necessary. With a broader understanding of your goal, we might be able to help you simplify the requirement. But I also understand the fun of Factorio is doing things a certain way just because you want to.
Binoculars
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Wed Dec 02, 2020 6:17 pm
Contact:

Re: Need your help to optimize a buffer zone

Post by Binoculars »

Tertius wrote: Fri Jun 06, 2025 9:52 am Exactly the same amount? Not even 1 item off? That's a very hard constraint. I recommend you revisit your greater approach in general to not have this constraint. What are you trying to do? I don't have an idea where such a constraint would be required or useful.

What you can do is exactly control the amount of items an inserter is moving. Dynamically set a stack size and the inserter will grab exactly that amount. Use this to exactly control the movement of items to where you want to have it (that part you didn't show yet). Don't control some chest in the queue before that, instead control the inserter that's moving the items to the machinery that wants the exact amount - the machine where the exact amount really matters.
But chests are just big heaps, usually it's irrelevant if there are 10 items more or less in them.
I'm aware that this constraint is particularly difficult to circumvent, which is why I'm turning to this forum, whose members' skills are far superior to mine.

I'm looking to create a system that uses a specific number of resources to power assembly machines in particular.

I'd thought about doing this, but unfortunately, I don't think I know exactly how to do it. I'd also considered adding a combiner that would force the inserters to all activate at the same time, but again, my skills are limited.
Binoculars
Long Handed Inserter
Long Handed Inserter
Posts: 87
Joined: Wed Dec 02, 2020 6:17 pm
Contact:

Re: Need your help to optimize a buffer zone

Post by Binoculars »

robot256 wrote: Fri Jun 06, 2025 9:57 am
Binoculars wrote: Fri Jun 06, 2025 9:35 am
Tertius wrote: Fri Jun 06, 2025 9:15 am An even unload is ensured for my examples in the second post. No matter how uneven the unloading is performed. Just one lane, complete block, slow, fast. All the chests will be empty within the same second. No circuit control required. That's because of the balancers at the output.
I tried your creations. First of all, thank you for sharing. However, the chests do not contain exactly the same number of items.

I know this may seem like a surprising request, but for my upcoming creation, it is imperative that the chests contain the same number of items, all the time.
Okay, that sounds like a very difficult requirement not usually associated with a buffer system. In a buffer, typically you specify a limit for how unbalanced the chests can become before the circuitry slows down one or more chests to allow the others to catch up. This ensures maximum throughput most of the time.

So what you want is not actually a buffer, but an item counter/computer. To keep the chest contents EQUAL at EVERY tick, you can't rely on measuring the imbalance and correcting it after the fact. You will need to time the inserter swings so they all move simultaneously with the same number of items, so that the contents of each chest can be predicted exactly.

Obviously this begs the question of why such a strict requirement is necessary. With a broader understanding of your goal, we might be able to help you simplify the requirement. But I also understand the fun of Factorio is doing things a certain way just because you want to.
robot256, you probably have the same approach to Factorio as I do, namely setting goals and sticking to them.

My goal, in addition to the one mentioned above, is to perfectly manage my base's power consumption. If all the arms activate simultaneously, it's easier to compensate for consumption spikes.

In Factorio, I like it when the machines activate simultaneously and consume and produce an equal number of resources. Don't ask me why, because I think we all set our own goals in this game. Some want to build the largest base, others want lights that impress the uninitiated. I simply want to optimize everything, even if I sometimes have to call on the skills of others.
Post Reply

Return to “Gameplay Help”