Is there a formula that could be used to determine the optimum mining height if arbitrary values are inputted for each mineral? Assume a 1x2 tunnel is being constructed and ignore potential disruptions (we care only about theoretical). The formula should look something like this: V(Y)=equation. Where V(Y) is the total value when a tunnel is dug at that y-value. Inputs to the equation should be D,R,L,G,I, representing whatever arbitrary values the user wishes to input for each ore.
This equation would be used to determine which Y-value is optimal for that specific user's needs. Therefore, it is not necessary that it calculate some kind of "accurate" value, only that the relative outputs at each Y value be representative of the relative value of the ores. Please include an explanation of the formula, with citations for any ore distribution information.