Open jonmaddock opened 5 years ago
In GitLab by @mkovari on Jul 2, 2019, 19:02
Ryan,
Thanks for this issue - which is very well written and comprehensive. This code was written by @jmorris-uk . We must have had a reason for setting n as an integer, but I can't remember what it was.
In GitLab by @rcarreck on Jul 2, 2019, 16:56
The code to calculate planned unavailability works by calculating $
\frac{downtime}{uptime+downtime}
$ the code that does this is line 466 of availability.f90:this will over or underestimate the planned unavailability when
is not an integer. This is because the code for determining n is
therefore, the uptime, calculated by (n+1)*lifetime_shortest, will be correct if the lifetime_longest and lifetime_shortest are 4 and 2 respectively but not 5 and 2.
The equation will give that for 5 and 2 uptime is 3 shortest_lifetime when it should give 2.5 shortest_lifetime, overestimating the uptime by half of shortest_lifetime
To fix this I propose this code
Line 410:
Line 463:
Line 466: