Taking stock: deciding what to smelt (log+comb)

Post pictures and videos of your factories.
If possible, please post also the blueprints/maps of your creations!
For art/design etc. you can go to Fan Art.

vanatteveldt
Filter Inserter
Filter Inserter
Posts: 947
Joined: Wed Nov 25, 2015 11:44 am
Contact:

Taking stock: deciding what to smelt (log+comb)

Post by vanatteveldt »

Inspired by @medusalem in the "what modules to put in a smelter" thread (viewtopic.php?f=5&t=13107&start=10), I wanted to have a go at setting up smart logistic smelters.

In the basic setup, the smart inserter simply puts ore in the smelter if the number of plates (in the logistic network) < X, so everything is smelted until all stocks are at X.

However, this doesn't really give priorities: suppose X is 1000, I can have zero copper and 999 iron and it can still decide to smelt iron, even though I really need copper at that moment. Of course, given enough smelting capacity that shouldn't be the problem, but I thought it would be cool to prioritze the lower amount. Moreover, also inspired by the same thread, I want to activate speed beacons only if stocks are low. Since you can't get the logistic stock onto the circuit network without either a mod or connecting all storage chests, I decided to build a switch like this:

Image

This setup has two trigger levels, currently 2000 (high) and 500 (low). The logic I (hopefully) achieved is this:
If any stock is below 500, the system should be in 'urgency' mode (indicated by the yellow light), and it should only smelt the plates that are < 500.
If all stocks are above 500, the system is in 'normal' mode, and it should smelt any plates that are <2000.
If all stocks are above 2000 the system should shut down.

So, there are two measuring chests for each type, with a smart inserter inserting into the chest at logistics >= 2000, and out of the chest at <1900; and similarly for level 500. These chests are connected together and connected to the top decider for each output type (the yellow lines in the diagram below), which outputs yellow 1 if everything < 1. These signals are the all connected to the topmost decider (the cyan lines), which dichotimizes the signal by outputting yellow=1 if yellow>0. This is the 'urgency' signal (yellow lamp)

Image

Then, the 'urgency' signal is connected by green wire to the arithmetic combinator for each type (the green lines in the diagram below), and the ore counters are also connected to this combinator (the red lines). The combinator adds the signals, by summing everything plus zero, and outputs that as blue. This is connected to the bottom decider combinator for each type, which outputs the relevant type (copper/iron/steel) if blue < 2. This is the "please smelt this type" signal, which is on if either there is urgency and stock <500 (both chests are empty, urgency is 1, so sum is 1), or if there is no urgency and stock < 2000 (only right chest is filled, urgency is zero, so sum is 1 again).

Image

In the screenshot you can see I have an iron plate shortage, so the urgency light is on, and iron is requested while copper and steel are not. Steel is 500<X<2000, so it would be requested if urgency is off.

A bit later, the iron shortage was solved, resulting in a situation without urgency, with both iron and steel requested (since they are between 500 and 2000), but no copper needed:

Image

So... can this be done better / more easily / more compact?


(in retrospect, I think I may just connect all output chests to the circuit network anyway, but I thought this was a fun little system for joining the logistic and circuit networks, so I wanted to share)
Post Reply

Return to “Show your Creations”