Unusual circuit behavior for Kovarex Design
Posted: Tue Feb 12, 2019 11:35 pm
While developing uranium processing setups I've stumbled across a curiosity as best or a bug at worst. I want to post it here for others to review instead of jumping to the bug conclusion.
While trying many different Kovarex techniques/designs that pulse an inserter once every processing cycle I would run into the issue that the inserter tasked with removing a single U-235 would sometimes not fire correctly. This would lead to U-235 being wasted because it was essentially stored in the Centrifuge(s) vs propagating towards other operations.
The general design elements are:
1. A single filter inserter set for U-238 only and stack size to 1 adds U-238 into a Centrifuge and is controlled/enabled (from a distance. IE outside of the Kovarex design itself). (This part works.)
2. A single filter inserter set for U-235 only, stack size to 1, enable when U-235 is less than 80, and pulse read hand adds U-235 into a Centrifuge and its pulsed output is fed into an arithmetic combinator memory cell (if I have my terms correct). This circuit's job automatically fills a Centrifuge with only 80 U-235 to allow continuous operation, but without storing (wasting) additional U-235. (This part works.)
3. From what I can tell, the fastest way to feed the output back into the input is a series of 3 stack inserters and 2 chests. These 3 inserters and 2 chests are wired together with the inserters set to hold read hand. The idea being that from start to finish a signal is on the circuit no matter where items reside in the loop. (This part works.)
It is this signal I have been trying to use to control the final filter inserter.
4. The final filter inserter is set for U-235, stack size to 1, and activate when Green signal is greater then 0 (In the blueprint, I also have pulse read hand set to monitor it's moved U-235 count. Changing this has had no effect on the issue.). I have also tried an Everything is less than 1 and Everything is equal to 0 setting on this inserter. I have used up to 3 combinators to transform the read signals from design element 3 to pulse the inserter. They are chained together in various ways to pulse only once with the first one reading the Anything or Everything signal from design element 3. (Some work most of the time, but none of them continued to work consistently.)
Here's where things seem buggy. By changing the first combinator input from Everything/Anything to U-235 suddenly design element 4 works consistently. It's as if Anything and Everything signals are processed at different times than the item signals(?). Another peculiarity is that using both the Anything signal with two combinators (I assume this means at least a 1 tick delay if not 2 from processing cycle to hand being (dis)enabled.) and the Everything signal with a single combinator (I assume this also results in at least a 1 tick delay.) results in excess U-235 (because of the above mentioned problem with the pulsed inserter not firing). Furthermore, exactly the same Centrifuge positions in each column acquire the same quantity of excess U-235; however, the amount and which position varies between blueprint pastes.
The questions are:
1. Why does the Anything signal design fail, but simply changing Anything to U-235 succeeds (They are the exact same circuit design the only difference is the Anything signal accounts for the transfer of the 2 x U-238.)?
2. Why doesn't the Everything signal work, and why does it result in the same pattern of excess U-235 as a two combinator Anything circuit?
As verbose as I've been I know I haven't explained everything. I'm hoping the below blueprint will fill in the gaps. It uses the Creative mod, but it isn't required. You'll have to supply the U-238 and seed U-235 yourself if you use vanilla Factorio. Creative also allows you to 100x the speed which might make waiting more tolerable. (Of course, I imagine most of you reading this already know all of that.)
While trying many different Kovarex techniques/designs that pulse an inserter once every processing cycle I would run into the issue that the inserter tasked with removing a single U-235 would sometimes not fire correctly. This would lead to U-235 being wasted because it was essentially stored in the Centrifuge(s) vs propagating towards other operations.
The general design elements are:
1. A single filter inserter set for U-238 only and stack size to 1 adds U-238 into a Centrifuge and is controlled/enabled (from a distance. IE outside of the Kovarex design itself). (This part works.)
2. A single filter inserter set for U-235 only, stack size to 1, enable when U-235 is less than 80, and pulse read hand adds U-235 into a Centrifuge and its pulsed output is fed into an arithmetic combinator memory cell (if I have my terms correct). This circuit's job automatically fills a Centrifuge with only 80 U-235 to allow continuous operation, but without storing (wasting) additional U-235. (This part works.)
3. From what I can tell, the fastest way to feed the output back into the input is a series of 3 stack inserters and 2 chests. These 3 inserters and 2 chests are wired together with the inserters set to hold read hand. The idea being that from start to finish a signal is on the circuit no matter where items reside in the loop. (This part works.)
It is this signal I have been trying to use to control the final filter inserter.
4. The final filter inserter is set for U-235, stack size to 1, and activate when Green signal is greater then 0 (In the blueprint, I also have pulse read hand set to monitor it's moved U-235 count. Changing this has had no effect on the issue.). I have also tried an Everything is less than 1 and Everything is equal to 0 setting on this inserter. I have used up to 3 combinators to transform the read signals from design element 3 to pulse the inserter. They are chained together in various ways to pulse only once with the first one reading the Anything or Everything signal from design element 3. (Some work most of the time, but none of them continued to work consistently.)
Here's where things seem buggy. By changing the first combinator input from Everything/Anything to U-235 suddenly design element 4 works consistently. It's as if Anything and Everything signals are processed at different times than the item signals(?). Another peculiarity is that using both the Anything signal with two combinators (I assume this means at least a 1 tick delay if not 2 from processing cycle to hand being (dis)enabled.) and the Everything signal with a single combinator (I assume this also results in at least a 1 tick delay.) results in excess U-235 (because of the above mentioned problem with the pulsed inserter not firing). Furthermore, exactly the same Centrifuge positions in each column acquire the same quantity of excess U-235; however, the amount and which position varies between blueprint pastes.
The questions are:
1. Why does the Anything signal design fail, but simply changing Anything to U-235 succeeds (They are the exact same circuit design the only difference is the Anything signal accounts for the transfer of the 2 x U-238.)?
2. Why doesn't the Everything signal work, and why does it result in the same pattern of excess U-235 as a two combinator Anything circuit?
As verbose as I've been I know I haven't explained everything. I'm hoping the below blueprint will fill in the gaps. It uses the Creative mod, but it isn't required. You'll have to supply the U-238 and seed U-235 yourself if you use vanilla Factorio. Creative also allows you to 100x the speed which might make waiting more tolerable. (Of course, I imagine most of you reading this already know all of that.)