Only required items on belts
Posted: Sat Mar 26, 2016 10:02 am
Hi,
i really like factory designs using a single belt for multiple types of items. Yet, all designs i have seen put more items on a belt than necessary, which requires manual fine tuning to avoid one type of item blocking the belt.
Ideally, i would like to have exactly as many items on a belt as are required. This would also allow belts to not be cyclic.
I'm not sure yet, if that is possible to achieve with the features the game provides right now. However, i would like to share my ideas on the topic and would like to hear your oppinion and ideas on how to proceed.
My design assumes that there are smart chests per item type, producer, and consumer. I will refer to a chest providing items as source, and a chest used as immediate input to an assembling machine as sink. Each sink has a buffer of say 10 items. Sources and sinks are connected via belts and the belts should never contain more items than are missing in the sink to fill up the buffer.
Now, each time some item is taken from a sink chest we will decrement some counter. If this counter is negative, then items from the source are taken and placed on the belt. Each time an item is taken from a source, the same counter is incremented. This ensures that there are never items on the belt that are not required at some sink.
The problem is that in the current state of the game an inserter will not output a signal that we can use to know that something was taken or put into a chest.
We can approximate this missing feature via the following circuit (also implemented in the factory prototype shown in the image above):
In this schematic view of the circuit, i visualized combinators via circles. Inputs are always on the left and outputs on the right. The empty circle represents a combinator that simply outputs its input. They are used to delay a signal such that in the next combinator we can catch differences of the chest's storage count. The last combinator (A+B) represents the counter. If the counter's value is negative, a smart inserter is activated that takes items from the source chest.
This circuit works in theory, but has one practical problem. If an item is put into a source chest and another item is taken from the chest at the same time we will not observe a difference and therefore not update the counter. Nevertheless, an item was placed on the belt.
I have not yet figured out how to avoid these cases, but thought about using a clock. On a high clock value inserters putting items to a chest are activated, on a low clock value inserters taking items are activated. I guess this should avoid that items are taken and put to a chest at the same time. Unfortunately, this increases the complexity of the factory design a lot.
Glad to hear your oppinion, ideas, and feedback.
i really like factory designs using a single belt for multiple types of items. Yet, all designs i have seen put more items on a belt than necessary, which requires manual fine tuning to avoid one type of item blocking the belt.
Ideally, i would like to have exactly as many items on a belt as are required. This would also allow belts to not be cyclic.
I'm not sure yet, if that is possible to achieve with the features the game provides right now. However, i would like to share my ideas on the topic and would like to hear your oppinion and ideas on how to proceed.
My design assumes that there are smart chests per item type, producer, and consumer. I will refer to a chest providing items as source, and a chest used as immediate input to an assembling machine as sink. Each sink has a buffer of say 10 items. Sources and sinks are connected via belts and the belts should never contain more items than are missing in the sink to fill up the buffer.
Now, each time some item is taken from a sink chest we will decrement some counter. If this counter is negative, then items from the source are taken and placed on the belt. Each time an item is taken from a source, the same counter is incremented. This ensures that there are never items on the belt that are not required at some sink.
The problem is that in the current state of the game an inserter will not output a signal that we can use to know that something was taken or put into a chest.
We can approximate this missing feature via the following circuit (also implemented in the factory prototype shown in the image above):
In this schematic view of the circuit, i visualized combinators via circles. Inputs are always on the left and outputs on the right. The empty circle represents a combinator that simply outputs its input. They are used to delay a signal such that in the next combinator we can catch differences of the chest's storage count. The last combinator (A+B) represents the counter. If the counter's value is negative, a smart inserter is activated that takes items from the source chest.
This circuit works in theory, but has one practical problem. If an item is put into a source chest and another item is taken from the chest at the same time we will not observe a difference and therefore not update the counter. Nevertheless, an item was placed on the belt.
I have not yet figured out how to avoid these cases, but thought about using a clock. On a high clock value inserters putting items to a chest are activated, on a low clock value inserters taking items are activated. I guess this should avoid that items are taken and put to a chest at the same time. Unfortunately, this increases the complexity of the factory design a lot.
Glad to hear your oppinion, ideas, and feedback.