Uhm, what??ziron999 wrote:original ratio guess = 0.84
70 solar to every 100 accumulators
70.9(71) to every 100 accumulators is 0.8508 pretty close...honestly it's so minor that 7 to every 10 should be fine even if 0.85 is right.
this is quick programming there is problems...if it can't find the the exact value it will keep looping between the else if's but oh well it works for my purpose.
What are you trying to achieve here??
First of all, the ratio is accum/solar panels being 0.84. Not the other way around.
Secondly, what your program is doing is just guessing and adjusting 2 numbers until one of them is 0.85 * the other. We invented the division operator for that.
Thirdly, you are trying to work out with the ratio of total solar output in kW relative to the total capacity of the accumulators which is not what we want to know. We want to know the number of accumulators / number of panels. Not that it really matters because both of them can be calculated from the other but still...
So am I overlooking something here or what?