reliability: reliability

Description Usage Arguments Value Author(s) See Also Examples

View source: R/GeneralG.R

Description

This function executes reliability analysis by limit state function method. Returned object is GeneralTreat class which is inheritted from LSFM class.

Usage

1
reliability(g = "R-S", var = c("R", "S"), dist = c("normal", "normal"), muX = c(200, 100), sigmmaX = c(10, 20))

Arguments

g

character expression of limit state fuction

var

array of variables written in character type

dist

array of distribution type written in character type: one of "normal","lognormal","gumbel","weibull"

muX

array of mean value for variables

sigmmaX

array of sd. value for variables

Value

GetPOF()

returns POF value

GetAlpha()

returns Alpha vector

GetBeta()

returns reliability index

GetDP()

returns Design Points

GetPSF()

returns PSF vector

Author(s)

Shinsuke Sakai

See Also

Returned object is GeneralTreat class which is inheritted from LSFM class. As for public function of LSFM class, see LSFM class by help command.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
#Example1
aa <- reliability()
aa$GetPOF()
aa$GetAlpha()
aa$GetBeta()
aa$GetDP()
aa$GetPSF()
# correct answer  3.872108e-06
#
# Example2
#"Probability, Reliability and Statistical Methods in
#  Engineering Design"
# Achintya Haldar  & Sankaran Mahadevan
#  P.218 Table 7.5, 7.6
g<-"As*fy*d*(1.0-eta*As*fy/b/d/fcd)-M"
var <- c("As","fy","fcd","b","d","eta","M")
muX <- c(1.56, 47.7, 3.5, 8.0, 13.2, 0.59, 326.25)
covX <- c(0.036, 0.15, 0.21, 0.045, 0.086, 0.05, 0.17)
sigmmaX <- muX*covX
dist <- c("normal", "normal", "normal", "normal" ,"normal" ,"normal" ,"normal" )
aa <-reliability(g=g,var=var,dist=dist,muX=muX,sigmmaX=sigmmaX)
a1 <- aa$GetBeta()
dist[7] <- "lognormal"
aa <-reliability(g=g,var=var,dist=dist,muX=muX,sigmmaX=sigmmaX)
a2 <- aa$GetBeta()
dist <- c("lognormal", "lognormal", "lognormal", "lognormal" ,"lognormal" ,"lognormal" ,"normal" )
aa <-reliability(g=g,var=var,dist=dist,muX=muX,sigmmaX=sigmmaX)
a3 <- aa$GetBeta()
dist <- c("lognormal", "lognormal", "lognormal", "lognormal" ,"lognormal" ,"lognormal" ,"lognormal" )
aa <-reliability(g=g,var=var,dist=dist,muX=muX,sigmmaX=sigmmaX)
a4 <- aa$GetBeta()
c(a1,a2,a3,a4)
#expected output
# 3.833028 3.761254 4.387684 4.090647
#Example3
# Checking lack of invariance
aa<-reliability()
bb<-reliability(g="1-R/S")
cc<-reliability(g="log(R)-log(S)")
aa$GetBeta()
bb$GetBeta()
cc$GetBeta()
##########################
#Example in text p.Basic2.30
aa<-reliability( muX = c(400, 300), sigmmaX = c(20, 30))
aa$GetBeta()
#correct answer:  2.773501
#Example in text p.Basic2.37
g<-"Sb*A-P"
var <- c("Sb","A","P")
muX <- c(400, 100*10*10, 3000e3)
sigmmaX <- c(20, 5*10*10, 300e3)
dist <- c("normal", "normal", "normal" )
aa <-reliability(g=g,var=var,dist=dist,muX=muX,sigmmaX=sigmmaX)
aa$GetBeta()
aa$GetAlpha()
aa$GetDP()
#Correct answer
#> aa$GetBeta()
#[1] 2.458772
#> aa$GetAlpha()
#[1]  0.4696243  0.4696243 -0.7476002
#> aa$GetDP()
#[1]     376.906    9422.650 3551453.579
############################
#Example in text p.Basic2.44
aa<-reliability( muX = c(400, 300), sigmmaX = c(20, 30))
aa$GetPSF()
#[1] 0.9230769 1.2307692
############################
#Example in text Basic3.12
dist <- c("lognormal", "normal" )
aa<-reliability(dist=dist, muX = c(40, 25), sigmmaX = c(4, 5))
aa$GetBeta()
aa$GetPOF()
#> aa$GetBeta()
#[1] 2.377765
#> aa$GetPOF()
#[1] 0.008708954

ShinsukeSakai0321/LimitState documentation built on Dec. 26, 2019, 11:31 a.m.