Helfima / helmod

Factorio Mod
149 stars 64 forks source link

[SeaBlock] Unable to calculate Slag → Slurry → Sludge → Ore+Slag loop #432

Closed EdwardMcCants closed 1 year ago

EdwardMcCants commented 1 year ago

After researching Mechanical Refining (early Seablock technology), the production loop that I was trying to calculate was the Slag → Slurry → Sludge → Ore+Slag loop which uses Slag as both an input and an output (without any internal use). (This is possibly complicated by the sulfur loop, but I've gotten that part to balance so that helmod give me the rate of sulfur gain). I tried various ways of arranging the various machines and blocks but could get the Slag output to zero (without causing Slurry or Sludge to be created instead).

Workaround: Change the % rate for the Slag consumption machine(s) to 125%. This value comes from the sum of an infinite geometric series and relies soling on getting a 20% return of slag. 1/(1 - 0.2) = 1/(0.8) = 1.25 → 125%.

KiwiHawk commented 1 year ago

Sounds like it is working as expected. By default, recipes will be scaled to meet demand from lines above them. To handle loops, either set percentages yourself (like you did). Or enable matrix solver to calculate and set the percentages for you. I would advise keeping blocks that use matrix solver small.

image

If you see anything which you don't think is working correctly, please do post a screenshot here!