KirkMcDonald / kirkmcdonald.github.io

Simple web-based calculator for the game Factorio.
Apache License 2.0
595 stars 150 forks source link

Add ability to specify target rate as function of input item rate #38

Open KirkMcDonald opened 7 years ago

KirkMcDonald commented 7 years ago

For example, the ability to specify a rate of advanced circuits based on an input rate of electronic circuits. The user could enter a rate of 800 green circuits/minute, and the calculator would produce a solution for 400 red circuits/minute.

There are some limitations on how this could be combined with using multiple build targets, but with a single target, this can be trivially solved by producing a solution for the target item at an arbitrary rate (e.g. 1/second), and multiplying by the ratio between the input item's rate in that solution, and its desired rate.

When there are multiple build targets, this would only work when there is a constant ratio between the chosen input item and its corresponding build target. (I.e. it can't pass through a multiple-recipe item, although it can be such an item.)