How come I need 0.7 electric mining drills to produce 18.75 iron plates a minute using a stone furnance?



  • I was trying to ratio-out a small iron plate making factory. I used https://kirkmcdonald.github.io/calc.html#tab=graph&data=1-1-19&furnace=stone-furnace&items=iron-plate:r:75/4 which indicated that I need 0.7 electric mining drills in order to feed 1 stone furnace:

    calculator showing 0.7 drills needed

    This is equivalent to saying I need a mining drill running at 70 percent speed to feed 1 stone furnace (you can't reduce the speed of anything in Factorio though). A stock electric mining drill can harvest 0.5 items a second (or 1 item every 2 seconds, or 30 items a minute). A stone furnace can smelt a single iron ore in 3.2 seconds, thus 18.75 iron ore a minute. But, "0.7" electric mining drills means it should harvest 21 ore a minute, yet this calculator says 18.75. If I did my math right, I should only need .625 of an electric mining drill since 18.75/30 = 0.625 items a minute.

    Are belts being factored in somehow? The calculator also shows belts, but I am not understanding how they are being factored in exactly (if at all). The yellow belts can move 900 items a minute (15 a second).

    calculator showing the items/belts/factories

    Note: I am ignoring the coal portion of this. It shouldn't matter anyway for my question.

    Why do I need 0.7 electric mining drills instead of 0.625 to feed 1 stone furnace in order to make iron plates?



  • The code for rounding can be found https://github.com/KirkMcDonald/kirkmcdonald.github.io/blob/6f09d7d774e0644d69310019de6a0698173f4467/rational.js#L40 .

    I've reproduced the significant portion below.

    toDecimal: function(maxDigits, roundingFactor) {
        if (maxDigits == null) {
            maxDigits = 3
        }
        if (roundingFactor == null) {
            roundingFactor = new Rational(bigInt(5), bigInt(10).pow(maxDigits+1))
        }
    
    var sign = ""
    var x = this
    if (x.less(zero)) {
        sign = "-"
        x = zero.sub(x)
    }
    x = x.add(roundingFactor)
    

    With maxDigits equal to 1, roundingFactor will be set to 0.05, unless otherwise specified. After adding the roundingFactor, the value 0.625 becomes 0.675, so it will be 0.7 rounded to one decimal place.

    If you expand the decimal places to 3 in the settings, it produces the correct answer: Calculator Settings

    Calculator Output

    I speculate1 that this is done so that the calculator will always show you more than what is needed if a perfect ratio is not available. If the factory said that 0.6 would work, you would find that 60% uptime is insufficient to feed your design, which is not good.

    For what it's worth, you can have 0.7 of a miner. According to the https://wiki.factorio.com/Electric_system#Consumption , when enough electricity is not available machine slow down to only consume what is possible. An underfed miner could work at 70% capacity.

    Additionally, you may intentionally set up a duty cycle with https://wiki.factorio.com/Circuit_network .

    Both of these cases are exceptionally rare and questionably useful, but the calculator is not opinioned on how you should solve (or benefit from) non-integer quantities of machines. There are possibly use cases that may benefit from a machine working only part of the time.

    More likely what this is useful for is to tell you how much the machines will be working. Your single furnace will be running 100% of the time. The miner will not be able to be on 100% of the time, it's output will eventually back up. So this calculator tells you that you only need one miner, but it will only be on 62.5% of the time, which will effect how much power you need to build.

    This is the same result, but analyzed from the opposite end of the problem.

    At the end of the day, it makes sense for the calculator to just tell you the truth without putting you in a spot where you will make mistakes, while not forcing an opinion on what you should think about non-integer values.


    1 I could be wrong on this, I didn't write the code and I don't see any comments that clear up the intent.


Log in to reply
 


Suggested Topics

  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2
  • 2