***Simple Reliability Slot Calculator Example*** ---- 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 intelligibly without some background of the correspondent. Thanks,[gold] ---- <> ---- [gold] Here is an eTCL script on to estimate reliability. For the push buttons, the recommended procedure is push testcase and fill frame, change first three entries a,b,c with always a>b, push solve, and then push report. Report allows copy and paste from console. ---- In planning any software, there is a need to develop testcases to test the software. Always r(1)>r(2x)&r(3x) for a valid answer. Testcase 1. %|quantity|number|units|% &| hours: | 8760.|hours|& &|r. coefficient:| .059|none|& &|population | 400 |none|& &| reliability :| 0.12651935228817204 |none|& &| 2x redundacy|0.23703155807292542 |none|& &| 3x redundacy|0.04397101189506697 |none|& ---- ***ScreenShots Section*** [Simple Reliability Slot Calculator Example screen1.png] ---- ***References:*** * http://src.alionscience.com/pdf/RedundancyEquations.pdf * http://en.wikipedia.org/wiki/Reliability_engineering * http://www.xppower.com/pdfs/Reliability.pdf * http://theriac.org/DeskReference/viewDocument.php?id=219 ---- ****Appendix Code**** ****appendix TCL programs and scripts **** ---- ****Pretty Print Version *** ====== # autoindent from ased editor # Estimate of Reliability # written on Windowws XP on eTCL # working under TCL version 8.5.6 and eTCL 1.0.1 # gold on TCL WIKI , 1jun2011 frame .frame -relief flat -bg aquamarine4 pack .frame -side top -fill y -anchor center set names {{} {hours: } {r. coefficient: } {population:} { reliability:} {2x. redundacy:} {3x. redundacy:} { 0:}} foreach i {1 2 3 4 5 6 7} { label .frame.label$i -text [lindex $names $i] -anchor e entry .frame.entry$i -width 35 -textvariable side$i grid .frame.label$i .frame.entry$i -sticky ew -pady 2 -padx 1 } proc about {} { set msg "Calculator for Reliability . from TCL WIKI, written on eTCL " tk_messageBox -title "About" -message $msg } proc pi {} {expr acos(-1)} proc strat5 { xx1 } { global side1 side2 side3 global side4 side5 side6 side7 set ss side1 set tt $side2 set xxx [ expr { $side1*[pi]/180. } ] set tt [ expr { -1.*$side1*$side2*$side3*.00001} ] set side4 [ expr { exp($tt) } ] set side5 [ expr { 1.-(1.-$side4)*(1.-$side4) } ] set side6 [ expr { $side4*$side4*$side4+3.*$side4*$side4*(1.-$side4)} ] set side7 [ expr { exp($tt) } ] return $side4 } proc calculate { } { global colorwarning global colorback global answer2 answer3 global side1 side2 side3 side4 side5 side6 side7 set answer2 5 set answer2 [ strat5 $side3 ] set side4 $answer2 } proc fillup {aa bb cc dd ee ff gg} { .frame.entry1 insert 0 "$aa" .frame.entry2 insert 0 "$bb" .frame.entry3 insert 0 "$cc" .frame.entry4 insert 0 "$dd" .frame.entry5 insert 0 "$ee" .frame.entry6 insert 0 "$ff " .frame.entry7 insert 0 "$gg " } proc clearx {} { foreach i {1 2 3 4 5 6 7} { .frame.entry$i delete 0 end } } proc reportx {} { console show; global side1 side2 side3 global side4 side5 side6 side7 puts "hours: $side1 " puts "r. coefficient: $side2 " puts "population $side3 " puts " reliability : $side4 " puts " 0: $side5 " puts "0: $side6 " puts "0: $side7 " } frame .buttons -bg aquamarine4 ::ttk::button .calculator -text "Solve" -command { calculate } ::ttk::button .test2 -text "Testcase1" -command {clearx;fillup 8760. .059 400. .12 .23 .04 1.} ::ttk::button .test3 -text "Testcase2" -command {clearx;fillup 8760. .059 700. .026 .05 .002 1.} ::ttk::button .test4 -text "Testcase3" -command {clearx;fillup 8760. .050 1000. .0125 .024 .0004 1.} ::ttk::button .clearallx -text clear -command {clearx } ::ttk::button .about -text about -command about ::ttk::button .cons -text report -command { reportx } ::ttk::button .exit -text exit -command {exit} pack .calculator -in .buttons -side top -padx 10 -pady 5 pack .clearallx .cons .about .exit .test4 .test3 .test2 -side bottom -in .buttons grid .frame .buttons -sticky ns -pady {0 10} . configure -background aquamarine4 -highlightcolor brown -relief raised -border 30 wm title . "Reliability" ====== [gold] This page is copyrighted under the TCL/TK license terms, [http://tcl.tk/software/tcltk/license.html%|%this license]. <> Numerical Analysis | Toys | Calculator | Mathematics| Example| Toys and Games | Games | Application | GUI ---- <> Development | Concept| Algorithm | Statistics