Console program for spare parts from poisson distribution at 95%C

This page is under development. Comments are welcome, but please load any comments in the comments section at the bottom of the page. Please include your wiki MONIKER in your comment with the same courtesy that I will give you. Its very hard to reply understandably without some background of the correspondent. Thanks,gold


gold Here is an eTCL console program for spare parts in warranty period based on poisson distribution, lamda=1. Calculate spare parts in warranty period for 95% confidence level (eg. > 95%C). Calculations estimate spare parts or spare drives for a cloud backup system. This report references both the poisson and normal distributions, as implemented in TCL.

Pseudocode and Equations

     #pseudocode can be developed from rules of thumb.
     #pseudocode: some problems can be solved by proportions (rule of three), to some order of magnitude
     #pseudocode: enter quantity1,  quantity2, quantity3 and expected output (quantity4) for testcases.
     #pseudocode: enter time in years, number of remaining items
     #pseudocode: output fraction of (remaining items) over (items at time zero)
     #pseudocode: ouput remaining items as fraction or percent
     #pseudocode: output fraction of (quantity4 ) over ( quantity1 at time zero)
     #pseudocode: output fraction of (quantity2) * (quantity3 ) over (quantity1 at time zero)
     #pseudocode: outputs should be in compatible units.
     #pseudocode: rules of thumb can be 3 to 15 percent off, partly since g..in g..out.
     #pseudocode: need test cases > small,medium, giant
     #pseudocode: need testcases within range of expected operation.
     #pseudocode: are there any cases too small or large to be solved?

Testcases Section

Testcase 1

table 1printed in tcl wiki format
quantity value comment, if any
testcase number:1 test of calculator lower limits
400.0 :MTBF mean time between failures in hours warranty of parts, supplied with problem
2.0 :n quantity deviceswarning!, testing lower_limit_N>10
0.003534:lambda= failure rate per hoursupplied with problem
1.4 :expected failures on one part during warranty periodsupplied with problem
16.0 :time interval dayswarning!, testing lower_limit_days>90
1.645 :95%C percentile ref. normal distribution
0.04566 :answers:MTBF in years
2190.0 :AFR annualized failure rate percent/year small lifetime gives many failures in year
1.920 :average failures from prorated AFR over time interval
4 :home brew solution spares from poisson, 95%C percentile supplied with problem
4.199 :required spares from normal distribution over time intervalround up to 5
4 or 5 :95%C spares from both poisson and normal d. seem reasonably close
4 ot 5 > 1.4 :95%C spares > expected5 failures in 16 day interval 95%c spares about 3*failures

textbook table solution gives 4 spares warranty=400 hours 1.4 failures in 400 hours 0.003534 f/hr 16 days interval MTTF=283 hours
from real_life problem poi. & nor. distributions from CRC rubber & textbook tables
probability of X row >>> p(0) p(1) p(2) p(3) p(4)
textbook poisson cdf,L=1 .3679 .7358 .9197 .9810 .9963
textbook poisson pdf,L=1 .3679 .3679 .1839 .0613 .0153
textbook normal cdf,S=1 .5000 .8413 .9773 .9987 1.0
textbook normal pdf,S=1 .3989 .2420 .0540 .0044 .0001
solution of 4 spares > 95% 4 spares col. ^^^^
% difference in cum. curves 14.3% 6.2% 1.8% 0.37%


Testcase 2


Testcase 3


References:

  • Stat

Appendix Code

appendix TCL programs and scripts

        # pretty print from autoindent and ased editor
        # written on Windows XP on eTCL
        # working under TCL version 8.6.2 and_or eTCL 1.0.1
        # gold on TCL WIKI, 5nov2014
        # Console program for spare parts in warranty period
        # based on poisson distribution, lamda=1
        # calculate spare parts for 95% confidence level (eg. > 95%C).  
        package require Tk
        namespace path {::tcl::mathop ::tcl::mathfunc}
        console show
        proc poissionx {warranty_hours failure_rate_hours percentile} {
        set parts_prob 0
        set percentile_factor [* $percentile 1.E-2 ]          
        foreach item { 1 2 3 4 5 6 7 8 9 10 } {
         set exponent [* $warranty_hours $failure_rate_hours -1. ]
            set parts_prob [+ $parts_prob [exp $exponent ] ]
            puts "spares $item prob.  $parts_prob   /n
            product warranty_hours  $warranty_hours /n
            failure_rate_per_hours $failure_rate_hours MTTF=1/L=283 hours /n
            average failures across warranty period is 400/283 or 1.4 /n
            simple replacement would rounded 1.4 or 2 spares at approx. 50%C /n
            additional spares needed for 95%C "
            if { $parts_prob > $percentile_factor } { return $item } }               
            return  0 }
        puts " poission spare parts from home_brew [ poissionx 400. 0.003534 95  ]  "
        puts " 4 spares are required for above 95 percent confidence level "
   

gold This page is copyrighted under the TCL/TK license terms, this license .

Comments Section

Please place any comments here, Thanks.