In a game with my friend Riithi, he built a pretty cool smelting setup for Iron and Copper, and called it the OmniSmelter. It responded dynamically to demand, and smelted only what was needed. He called it the OmniSmelter, but I kept renaming his stations to MultiSmelter, because it didn't do Steel or Brick. The rest of the story is obvious
I started thinking about building this thing a long time ago, but I recently bit down hard and spent the better part of four days perfecting it. A good part of that was building the train stations for it with their own logic, but I'll leave those to your imagination. For now, I proudly present: The OmniSmelter!
I'm using this smelting layout:
This is a previously existing design, that allows the smelters to sit between rows of beacons, and each be hit by 8 of them. This gives them a 9.4 crafting speed and 20% productivity bonus. I added extra lights and power poles to maximize the amount of wires i can run. More on that later
Three of these basic units lead to rows of 12 smelters with beacons and a bunch of logic stuff on either side:
A full input belt can be smelted by 14.2(ish) smelters, so most people who use this design build rows of 14 or 15 smelters. However, that requires a double output belt, because of the productivity bonus. I needed the space, and considering this is a dynamically switching build, I's not expected to work at maximum throughput anyway. 12 Ovens do, however, produces a pretty much filled output belt when maximally beaconed.
Build the smeltery up of as many rows as you want. The above screenshot shows 4 lanes, servicing 4-wagon trains, but you can set up any amount you want. Also, while each lane is by design always autonomously operating, you can make it react to individual or collective triggers, or set them up in pairs or groups. If you are servicing a station that takes both 8- and 4-wagon trains, you could build 12 rows, where the first four wagons are served by double rows and the last four by single rows. Go wild!
Each row needs 4 channels on a wire to operate autonomously. Up to about 200-300 channels exist (without mods), so that should satisfy even the most megalomaniacal setups. If not, multiplexing is your thing, good luck.
Now we get to the fun part! I made this logic board for myself to keep track of wtf I was doing, and typed some explanations for this post:
All that (bar the Supply/Demand triggers) is crammed into the right and left side of the lane. If you want to recreate that manually, good luck not crossing wires :p
A little more explanation for those who care:
There's four main wires, that DO NOT CROSS. Any of these contaminates, the system locks up. This was a major headache in the design phase, as I just kept running out of options for combinators to cleanly take in the signal i wanted to feed it. Spending as much time with them as I have, I named the wires.
- The Big Red Wire. This one carries the S-signal, the input counter outputs, and the input inserter control values. It basically tracks the status of the batch, and it was the first main line I set up. I consider it the aorta of the build.
- The Z-line. This one started out very large, but kept decreasing in size as I moved more functionality to the Junk Line. It's still pretty important though, as it picks the next batch to produce and stores the mode of the machine.
- The Junk Line. This one contains a variety of signals, and everytime i needed to send something new around, I tended to use this. Combinators connected to it aren't allowed to do 'anything' or 'everything' operations. It even ended up storing the Z-value once the clock is stopped, but doesn't hold the actual clock. I did merge in the Red signal though, which used to be on it's own wire before.
- The Supply and Demand wire. This thing spans the entire smeltery, crosses between lanes, and will also extend out to the surrounding factory to detect supply/demand. As a result, this one is green, all the others are red.
How to use
Cool! I want it! How do I use it?
So what does the smeltery really DO? Here's the list:
- it reads supply/demand for a batch, and starts that.
- The input belt for that recipe opens up and floods the input.
- Each input inserter takes exactly (S) units of input from the belt, the oven cooks it, etc, PROFIT!
- As soon as ALL input inserters have moved (S) inputs, the input belt is stopped, and the drain belt opens for 11 seconds, cleaning it up.
- The smeltery then checks the supply/demand for the next recipe. (so if it has just finished a batch for recipe B, it'll check C first, then D, then A, then B again)
Starting the beast
Once it runs, it runs perfectly, but since all the logic for the thing is cyclical, it needs a little kickstart. That's why i included a little pushbutton pulse generator on the input side. You can connect it with a GREEN wire to the Z-clock like so:
I recommend not connecting it until it is needed, and disconnecting it after use, as it can seriously mess up the system when used by accident. You'll need to drop a single iron ore on the floor as pictured, and then rotate the inserter until it moves the ore. This will set the Z-clock to a value, tricking the lane into thinking it has triggered on one of the recipes. It'll then immediately produce a batch of that recipe (regardless of supply/demand) and then be ready for normal operation. The lights stay red during this initial batch.
S is the batch size, and as such rather important to the operation of the machine. It can be set however you like though. Simply change the value in the constant combinator on the input side of the lane, and everything will adjust accordingly!
You'll want to pick a value for yourself, depending on the lane's place in the factory. Some considerations:
- S must be a multiple of 2 for Brick not to leave any residue, and a multiple of 5 for Steel. If you want to make maximum use of productivity bonus, use multiples of 5 smelting operations. This leads to all S-values divisible by 10 working, divisible by 50 being optimal.
- The larger you set your S, the less time (relatively) the lane spends switching between modes, and the higher it's total output will be. It'll also produce less waste through the drain line to be recycled.
- Each batch processes 12*S ore. So for S=1000, you get (without pord/with prod) 12.000/14.400 Iron/Copper Plate, 2400/2880 Steel, or 6000/7200 Brick.
- S can be dynamic! You can easliy set up a system that detects the mode of the lane, and then dynamically adjusts the S-value on the Big Red Line to adjust for exact demand and/or supply values. There would be a good amount of logic needed to pick the correct value, but nothing impossible. If you do this, I'd recommend keeping the value in the constant combinator at 50, detect the lane's mode on the Junk Line, and inject an extra multiple of 50 onto the Big Red Line according to your parameters. An extra row of combinators on the input side can probably accomplish all this without too much trouble.
On the supply side it takes 4 different inputs, for each of the outputs.
You'll want to balance the inputs between the rows, and make sure they don't run out. If an input belt runs dry, the smelter will sit there until it picks back up and it can finish the batch. It won't jam as such, but it won't switch over to another resource either. Setting a large enough buffer on the supply triggers should make sure that never happens. Another consideration is that it has a tendancy to drain the right side of the belt more than the left, so you'll want to balance for that.
There's 4 triggers for each smelter lane, one for each resource. So, if the copper ore buffer is large enough, send (1) on channel 2, and the smelter will know copper is a valid mode to go into.
On the output side it spits out two belts.
The bottom one is pretty self-explanatory, it's the output lane. You collect it, dump it in chests, and if there's enough, you stop sending the demand trigger (same channel and value as the supply one).
The top one is the drain. Each time the lane completes a cycle, it has to flush out the input belt. So, mixed raw ore is spit out here, a max of 400 each time. You'll need to build a small recycling setup to catch this and re-insert it to the top. Should be relatively simple, and a fun build to do, so I leave that to your imagination
One possible way for the lane to lock up is if the drain gets backed up. If this happens, the machine will keep running, but the next batch might leave a residue in some of the ovens. This WILL lock up those ovens until you manually clear that residue, after which it can move on. I have thought of a way to prevent this from happening, but that's a 1.1 feature of the build.
I'll include three blueprints. One of the logic board, one of a single lane, completely vanilla, and one example 4-lane setup in creative mode to let you see it in operation.
Some extra remarks on what'I'm happy with
First of all, with some tinkering, you can make the think look like a proper microwave oven on the map view:
Secondly, it's fairly robust. Every time I messed up a wire or a signal, it seems to have the tendency to kick right back into gear once the rogue signal is removed or the misplaced inputs are cleared. Aside from total annihilation, I believe it can survive quite a bit of misuse.
Third: it works with red belts and no modules/beacons also, so it can be built fairly early on to be upgraded later. I would not attempt to place it without robots though, getting all the wires right is going to be a massive PITA. However, this means I actually get to build it for the first satellite base in the railworld I was playing before I went down this rabbithole. Hurray!