MarcioHuser / EfficiencyCheckerMod-SML3

GNU General Public License v3.0
5 stars 5 forks source link

Efficiency Checker calculating wrong? #16

Closed sockenklaus closed 1 year ago

sockenklaus commented 1 year ago

This is an issue that is so simple I feel like i'm getting crazy:

Following setup:

+-------------+
| Miner Mk2   |    
| Normal Coal |----------------+--------ECM 1----------->
+-------------+                |
                               |
+-------------+                |
| Miner Mk2   |                ^
| Normal Coal |----------------+
+-------------+                v
                               |
+-------------+                |
| Miner Mk2   |                |
| Normal Coal |----------------+--------ECM 2------->
+-------------+

ECM 1 and ECM 2 both read:

Injected Input: 225

Shouldn't this be more like 180 items / s each? Each Miner Mk.2 on Normal Coal without any overclocking outputs 120 items / m. 120 * 3 / 2 = 180?

Limited Throughput: 270 (as expected for Belts MK.3)

Required Output: 135 (this corresponds to my smelters after the belts)

MarcioHuser commented 1 year ago

Are both exits connected into something? It does not load ballance, EVER. It will not just "split in two" the middle coal miner because it goes into a splitter, in fact, it will crown DOWN the belts until it finds a Splitter, and then will crawl back UP on the other exists to check what is being added in and consumed out, to discount potential incomes, and also back down further mergers to discount consumption, and so on until exaust. It basicaly assumes the following: miner 1 + miner 2 can go to ECM1. 240 input and 135 output, then miner 2 + miner 3 can go to ECM2. 240 input and 135 output, also So, ECM1 sums up what it can get (miner1 + miner2 = 120 + 120 = 240) and DISCOUNT the potential items that are required to complete ECM2 (135 - 120 = 15) So: miner1 + miner2 - (ECM2 output - miner3) = 120 + 120 - (135 - 120) = 225 Another way around would be miner1 + (miner2 + miner3 - ECM2 output) = 120 + (120 + 120 - 135) = 225. It is the same value, writen differently The same is done on the other ECM

It may sound confusing... because it is. Splitting/Merging adds a LOT of complexity. The earliear versions of the mod would ignore ENTIRELY the other ouputs of splitters, and both would read as 240 in/135 out. And you would wrongly assume you coudl go up to 240/240 on both, wich is not true. So, the more you place consumers on the outputs of the ECMS, the closer they will approch 1:1 ratio simultaneously (the injection of the first reader will decrease by the same amount of the increase of the comsumption added to the second reader).

It is easier to see it working when you place checkers first, and machines later: with no consumers, both will read 240/--. When you add a consumer on any side, that side will read 240/consumption and the OTHER one will read (240-comsumption on the other site)/--. And so on, so on.