Recycle Buffering with Barrels

  • Please make sure you are posting in the correct place. Server ads go here and modpack bugs go here

Mirality

New Member
Jul 29, 2019
62
0
0
I currently have a fairly basic recycling setup for excess quarried materials (RP2 filter into tubes into IC2 recyclers). This was keeping up fairly well for quite a while -- I just needed to toss in an extra recycler or an overclocker occasionally as I started producing more power and was able to increase the speed of my quarry.

It's at the point where the actual recycle is almost instantaneous, but I'm still getting issues where the tubes will backstuff and end up backing up my whole network and dump junk items into my overflow chests. The main issue seems to be that items in tubes can only change directions at intersections, so when a stack arrives just slightly too early to a recycler it goes all the way back to the filter and then immediately bounces forwards again, only to repeat the process again later (but now it has more friends along for the ride), eventually backstuffing the filter, which then starts rejecting items back to my sorting machine (then into the overflow chests). In other words, I think my recyclers can keep up, they just can't be reliably fed with the items.

So I want to introduce some buffering into the line -- have the filter dump the items into a buffer inventory that won't fill up, and have the recyclers draw items directly out of that buffer exactly as they're ready for them. I'm just not sure of the best way to do it.

I like the idea of using barrels as the buffer inventory, as there's only a few junk item types and barrels can both hold a decent amount of buffered items and provide a nice visible indication of how full the buffer system is.

I tried an experiment using the filter direct to the top of a number of barrels, with a Retriever on the bottom network to pull items into the recyclers. This worked decently enough except that (contrary to expectations) instead of all the items of the same type going into one barrel they end up spread out amongst all of them. (I'm assuming that what's going wrong here is that an item sees a barrel with the wrong type of item in it so starts to go past, and then the barrel empties but the item continues on to the following barrel, and then goes into that one instead of doubling back because it's now closer.)

It would probably work if I could dedicate a barrel to each item type, but of course the retriever can't be set to leave one item in the barrel so they end up becoming open market again. Having an input filter on each barrel doesn't seem like a nice solution (and I don't have a lot of vertical space to work in). Diamond pipes are a possibility but I'm not aware of a good way to get items from an RP2 filter into a BC pipe net.

Can anyone think of a good solution that I've missed? Either to ensure that the barrels never completely empty or that the same item type will never end up in multiple barrels even when they start empty. I'm using the DW20 pack.

And no, I don't want to void or lava-dump the items.

(My backup plan is to use routers with some diamond chests, which I think can be made to work how I want, but it loses the easy visibility. I'm also tempted to look into AE, but I'm not sure I'm quite ready for that yet, as I have very little quartz.)
 

Someone Else 37

Forum Addict
Feb 10, 2013
1,876
1,440
168
If you're on Ultimate, then you have Tubestuff at your disposal, with its Buffer. I'm not sure if one Tubestuff Buffer (not to be confused with Redpower's Buffer- you want the one with a chest in the recipe, not wood and iron bars) will be enough for you, as it maxes out at two stacks of items per second. Then again, they're not all that expensive.

The buffer acts sort of like a Redpower Relay, in that it autoejects items. However, it will eject into any adjacent wooden pipe, gold pipe, or basic logistics pipe. It will also emit a redstone pulse when it attempts to eject an item, so you can also place an unprogrammed RP filter to move items into a tube network, if you wish.

In short, have your filter dump items into a Tubestuff Buffer (if not a line of them) with wood or gold pipes adjacent to them, leading to your diamond piped barrels. If you need only one buffer, I'd recommend a gold pipe; if you need a line of buffers, I'd recommend using wood pipes, so you can ensure that the pipes won't insert items back into the buffers.

Alternatively, you might be able to use managers to keep at least one item in each barrel at all times- but putting a manager on the bottom of each barrel would take up exactly the same space as placing a filter on top. And managers are expensive.
 

Mirality

New Member
Jul 29, 2019
62
0
0
As I said, I'm using DW20, so sadly no TubeStuff. I did consider managers, but as you said they're quite spendy -- and I'd need one per barrel plus one for the other end too.
 

b0bst3r

New Member
Jul 29, 2019
2,195
0
1
Above the barrels place an upside down filter with the item you want stored in the barrel, then run the tubes along the top of the filters. The upside down filter only allows that item to pass through it.
 

Omicron

New Member
Jul 29, 2019
2,974
0
0
If you're running the latest version (5.2.1) of the DW20 pack you have Applied Energistics at your disposal. A mystcraft age should let you mine Quartz even in an old savegame.

While that mod can do a lot more for you than being a mere buffer, you can if you want make it do just that. Grab a ME Controller, a ME Chest and a drive (try starting with a 1k, if it's not enough go bigger), some export buses and some cables. Place controller and chest next to each other near the recyclers - the ME Controller needs power anyway and will take EU, so just stick it against the cable powering the recycler. Stick the drive in the chest. Put one export bus on top of every recycler, and tell them to export all the things you expect to be recycling. Use stack mode for fastest item transport. Connect the buses to the ME Chest or Controller with ME cabling, if necessary.

Finally, pipe the recyclable items into the ME Chest.
 

twisto51

New Member
Jul 29, 2019
1,443
0
0
This is easy enough with RP2, I used it in my early biomass and uu-matter production.

What I did was use a retriever to pull from supply. The tube network on the output side of the retriever connects to your recyclers. Somewhere on that network make a branch with a restriction tube and feed that tube to the top of a barrel. When your recyclers are full the material will go to the barrel instead. Connect the bottom of that barrel to the supply side pipe network and make it the closest inventory to the retriever. That way the retriever will pull from your overflow barrel before your supply.

Here is an old picture of an old build for buffering saplings. The pipe going into the floor goes to my sapling storage which is about 20 blocks away from that setup. The key is setting that timer properly. :p

UqNiFlN.jpg
 

b0bst3r

New Member
Jul 29, 2019
2,195
0
1
His problem was not excess but rather the retriever emptying the barrel and being replaced with the next thing that came along.
 

twisto51

New Member
Jul 29, 2019
1,443
0
0
His problem was not excess but rather the retriever emptying the barrel and being replaced with the next thing that came along.

Restriction tubes again, this time with a filter. Put a restriction tube and then an overflow chest on his main storage network. Put a filter on the section of network between the restriction tube and the overflow chest. Set that filter to take cobble, put barrels behind it for cobble storage. Set his recycler network to pull from the bottom of those barrels.

Boom, nothing goes in your cobble barrels except cobble. If they fill up the cobble goes to the overflow chest. He could add a second cobble filter between the first and the overflow chest and have it lava/voidpipe any cobble it gets so no cobble makes it to overflow. Or he could set the second filter to supply the recyclers so that they only get cobble after his main cobble store was full.

Filters are great for one-offs like this when you don't want to rework your entire sort system. Just stick a filter somewhere off the input line before your main sorting and pull out whatever you want for special actions. Make it the same distance from input as your first sorting machine and you can do nifty stuff like smelt exactly half of your incoming iron ingots to refined iron ingots, or half your cobble to smooth stone, half your sand to glass, etc. Just loop your process output back into the beginning of the sort.
 

Mirality

New Member
Jul 29, 2019
62
0
0
Above the barrels place an upside down filter with the item you want stored in the barrel, then run the tubes along the top of the filters. The upside down filter only allows that item to pass through it.
That was the design I meant when I talked about "an input filter on every barrel". It seems like it should work but it's going to be a bit awkward to squeeze into the space I have. But it's sounding like the best option so far, still.

If you're running the latest version (5.2.1) of the DW20 pack you have Applied Energistics at your disposal. A mystcraft age should let you mine Quartz even in an old savegame.
Yes, and I've very recently created a new age for just that purpose, but I haven't gotten all that much quartz from it yet. Maybe I just need to back the speed of my quarry off a bit, but it's actually mining in here that seems to be upsetting my recycling system the most.

Restriction tubes again, this time with a filter. Put a restriction tube and then an overflow chest on his main storage network. Put a filter on the section of network between the restriction tube and the overflow chest. Set that filter to take cobble, put barrels behind it for cobble storage. Set his recycler network to pull from the bottom of those barrels.
The whole point is to take multiple junk item types within the same tube network, especially on the recycler side of the network. I already have the entire recycle network behind a restriction tube (with two restriction tubes before my main overflow chest). The problem is that the recycle network is backstuffing, resulting in junk landing in the main overflow chest without even attempting to enter the recycle network.
 

Mirality

New Member
Jul 29, 2019
62
0
0
That was the design I meant when I talked about "an input filter on every barrel". It seems like it should work but it's going to be a bit awkward to squeeze into the space I have. But it's sounding like the best option so far, still.
Nuts. Tried it but there's still a problem. The retriever will pull more than will actually fit into the recyclers (basically it's not allowing for the travel time of the items, so keeps pulling until the items actually arrive), and the items will bounce back to the bottom of the barrels... and if they happen to be empty at the time then they'll go in, even if it's the "wrong one" according to the filters on top. So I can still end up with four cobble barrels, which isn't what I want. (Only a single stack will go in, but that's enough to break the system.)
 

twisto51

New Member
Jul 29, 2019
1,443
0
0
Don't even have direct connections to the recycle network. Setup a filter for each of your junk items and put it in advance of your sorting for "good" stuff. Then put another filter in front of each overflow barrel on the recycle network to keep the barrels stocked with what you want in them instead of each barrel blocked with the same item.

If you're continually backing up it is probably a sign you need more recyclers or overclockers in the recyclers you do have. One recycler with 5 overclockers in it should handle a single quarry. With four recyclers like that with a relay on top of each I never overloaded them with just multiple quarry output and they were sufficient to run a large tunnelbore and a couple quarries at any given point in time.

Eventually I got tired of all that messy tubework and just installed a bank of cobblegen and a handful of routers. It seems wasteful but with Mystcraft on our server I have infinite mining worlds to "waste". Doing it that way you can just voidpipe the junk before it gets to your base.

Nuts. Tried it but there's still a problem. The retriever will pull more than will actually fit into the recyclers (basically it's not allowing for the travel time of the items, so keeps pulling until the items actually arrive), and the items will bounce back to the bottom of the barrels... and if they happen to be empty at the time then they'll go in, even if it's the "wrong one" according to the filters on top. So I can still end up with four cobble barrels, which isn't what I want. (Only a single stack will go in, but that's enough to break the system.)

That is why if you look at that picture I posted of the fermenter setup the output side of the retriever isn't connected to the bottom of the barrels. You only want the input side of the retriever to be able to access the bottom of the barrels. If your overflow can't get into the recyclers or the barrels it will bounce between the retrievers, barrels, and recyclers until it can. That is also why I mentioned getting the timer set right was the trick, so you minimize how many items you have bouncing around in that segment. You get rid of all these problems by just using routers instead of tubes, btw.
 

Mirality

New Member
Jul 29, 2019
62
0
0
If you're continually backing up it is probably a sign you need more recyclers or overclockers in the recyclers you do have. One recycler with 5 overclockers in it should handle a single quarry. With four recyclers like that with a relay on top of each I never overloaded them with just multiple quarry output and they were sufficient to run a large tunnelbore and a couple quarries at any given point in time.
I have four recyclers each with 4-6 overclockers. I do have a superquarry though (was running at 100 MJ/t), and while I've turned that off for the moment I've been playing with a frame quarry, which is even faster than that.

That is why if you look at that picture I posted of the fermenter setup the output side of the retriever isn't connected to the bottom of the barrels. You only want the input side of the retriever to be able to access the bottom of the barrels. If your overflow can't get into the recyclers or the barrels it will bounce between the retrievers, barrels, and recyclers until it can. That is also why I mentioned getting the timer set right was the trick, so you minimize how many items you have bouncing around in that segment. You get rid of all these problems by just using routers instead of tubes, btw.
That's exactly what I have though.

It goes sorting machine -> restriction tube -> filters on top of barrels -> barrels -> retriever -> recycler. There is no connection between the input and output sides of the retriever except for the retriever itself, or any other loops back. But still at some point the items get backed up on the input side of the retriever and then they go back into the bottom of the barrels, and cause grief. It will eventually sort itself out (because the retriever will pull them out again) but meanwhile the input side of the barrels has gotten backed up too and the sorting machine will start dumping items into the double-restriction-tube section of the network, which I don't want.

Maybe the timer is my problem. I currently have it set pretty fast. (0.4s, I believe.)
 

twisto51

New Member
Jul 29, 2019
1,443
0
0
It can't back up on the input side of the retriever unless there are no valid destinations on the output side. What is not working with the barrel buffer on the output side of the retriever? The design I had for the fermenters the retriever pulled from the output side buffer barrels first if there was anything in them, insuring that it would never pull from the main network unless that buffer barrel had space in it.

Timer is ticking too fast, seems like. I'd slow it way down until the recyclers are starved for material, then incrementally increase it until you find a sweet spot that keeps them near full.
 

twisto51

New Member
Jul 29, 2019
1,443
0
0
Maybe the timer is my problem. I currently have it set pretty fast. (0.4s, I believe.)

Lol, that is definitely too fast.

You need to pull a stack at close to the rate your recycler will consume a stack. If you have multiple recyclers you just divide by the number of recyclers.
 

Mirality

New Member
Jul 29, 2019
62
0
0
I'm not sure what you mean. The barrel buffer is on the input side of the retriever. The retriever is the thing that's pulling items out of the barrels. There aren't any buffers between the retriever and the recyclers -- I was just hoping that the retriever would be smart enough to not pull items when the recyclers were full.

I could probably try sticking in an overflow loop from the recyclers back to the input side of the barrels. That might work, as then there'd always be somewhere for the output of the retriever to go.

Annoyingly it looks like MC has decided to crash every single time I try to adjust that timer, though. :(
 

twisto51

New Member
Jul 29, 2019
1,443
0
0
I'm not sure what you mean. The barrel buffer is on the input side of the retriever. The retriever is the thing that's pulling items out of the barrels. There aren't any buffers between the retriever and the recyclers -- I was just hoping that the retriever would be smart enough to not pull items when the recyclers were full.

I could probably try sticking in an overflow loop from the recyclers back to the input side of the barrels. That might work, as then there'd always be somewhere for the output of the retriever to go.

Annoyingly it looks like MC has decided to crash every single time I try to adjust that timer, though. :(

The retriever doesn't count anything in transit when determining if your recyclers are full. Lol, just put a buffer barrel on the output side of the retriever just like is in the picture I posted. Trust me. :) If you look closely you'll see that the output side of the barrel is the closest inventory to the retriever on the main network and that the input side of the barrel is the furthest inventory on the fermenter side. This config works, I used it for awhile. You'll just need to add more barrels beside that one, one for each material you're recycling.

UqNiFlN.jpg


Be careful clicking timers while holding things. Some things will cause it to crash now and then, other things will cause it to crash every single time. Do it barehanded or remove and replace the timer.
 

brujon

New Member
Jul 29, 2019
496
0
0
Routers are absolutely great for these kinds of builds. Keep in mind my suggestion is kind of very different than what you have right now, but bear with me. It's a good system that you will be able to use for any-size quarries, and have it be easily expandable.

What i'd suggest, is this: Instead of using a tube feeding into a filter that puts the items into tubes going into the recyclers, have the filter put the items you want to recycle inside a buffer chest. Next to this buffer chest, you put a router with the Ejector, Bandwidth, Machine Filter and Speed upgrades. You set the router as follows... It PULLS items from the side where the CHEST is, and then it EJECTS items to the TOP of the side the recyclers are in. With the Bandwidth upgrade, it's capable of pulling stacks at a time, and with the Speed upgrade, it's able to visit all of the machines with no delay. As long as you keep feeding items into the buffer chest, and keep putting the recyclers next to one another, they'll continually get filled with the junk items, continuously producing scrap. Next to the recyclers, you set up another Router, with the Bandwidth, Ejector and Machine Filter upgrade, pulling the items from the BOTTOM of the side where the Recyclers are in, and ejecting them into the TOP of the side where your MassFab is, with the filter set to only allow it to eject to Mass Fabs. This system is pretty robust, i believe a single router is able to keep up with 20+ Recyclers at full speed as long as there is enough material fed into the buffer chest.

If at any point the amount of materials becomes too much for one router to distribute, or if there are materials backlogging even though there are empty recyclers, it's also pretty easy to expand the system. All you gotta do is put two (or more) pneumatic tubes that travel an equal distance to more buffer chests, and put another router connecting that buffer chest to the recyclers. In any case, adding more buffer chests & more routers means you can keep stacking recyclers, and getting more mats. Before this gets cramped and hard to manage, it's already a silly amount of Recyclers...

If you're adamant about the barrels, though, there's one minor tweak you could do that would make it feasible, but that would require all barrels to have one air block above them, so no stacking vertically. Have the filter output into a buffer chest, and use BC to pull the items out, using Emerald Pipes on top of the barrels. Emerald pipes acts as filters themselves, only allowing the type of item you specify to enter the inventory, and as such, all the barrels would keep only their item stocked, ever. Everything else after the barrels can be done as per my suggestion, with two routers configured like i said, and in fact, making it like this arguably makes it easier to add more routers into the system, so it's definitely something to consider. Barrels can be made extradimensional if for some reason EVEN after your recyclers are running you're still having backlogs, but i don't know what kind of monster quarry you'd need to do that...

EDIT: Actually, after thinking about it for a bit, you don't really need the emerald pipes. Adding in a third router with Speed, Bandwidth, THOROUGHNESS and Machine Filter upgrades would solve the barrel issue. The Thoroughness upgrade makes it so that the router visits all the machines that it is able to visit in the network IN ORDER, trying to keep that inventory full at all times. Since Barrels only ever keep one kind of item in their inventory, the Router would distribute only one type of item to each Barrel. Which barrel would hold which thing would of course, vary, as the barrels are emptied and refilled, but they would all only hold one kind of item at a time. The Machine Filter is only there to make it so that the Router only visits the Barrels, and not everything else that is connected.
 

twisto51

New Member
Jul 29, 2019
1,443
0
0
EDIT: Actually, after thinking about it for a bit, you don't really need the emerald pipes. Adding in a third router with Speed, Bandwidth, THOROUGHNESS and Machine Filter upgrades would solve the barrel issue. The Thoroughness upgrade makes it so that the router visits all the machines that it is able to visit in the network IN ORDER, trying to keep that inventory full at all times. Since Barrels only ever keep one kind of item in their inventory, the Router would distribute only one type of item to each Barrel. Which barrel would hold which thing would of course, vary, as the barrels are emptied and refilled, but they would all only hold one kind of item at a time. The Machine Filter is only there to make it so that the Router only visits the Barrels, and not everything else that is connected.

Thoroughness doesn't work that way unless it has been changed. As far as I can tell when it comes to barrels Thorougness only applies to each item/stack of items that comes in. If it gets a stack of pollen Thoroughness will cause it to put the entire stack into one barrel if it can. What Thoroughness will not do is make it go back to that barrel with the next stack. The next stack will go to the next available barrel, not the one that already has pollen in it.

This is why people building router-fed barrel walls either seed each barrel in advance or block every unused barrel in advance.

That said I do agree that routers are definitely the best way to handle this issue. A lot of people see what it takes to actually make a Machine Filter/Item Filter upgrade though and decide they don't want to do routers just yet. :)