Version: | 1.0.1 |
Date: | 2023-8-26 |
Title: | Fault Trees for Risk and Reliability Analysis |
Description: | Construction, calculation and display of fault trees. Methods derived from Clifton A. Ericson II (2005, ISBN: 9780471739425) <doi:10.1002/0471739421>, Antoine Rauzy (1993) <doi:10.1016/0951-8320(93)90060-C>, Tim Bedford and Roger Cooke (2012, ISBN: 9780511813597) <doi:10.1017/CBO9780511813597>, Nikolaos Limnios, (2007, ISBN: 9780470612484) <doi:10.1002/9780470612484>. |
License: | GPL (≥ 3) |
Copyright: | copyright (c) OpenReliability.org 2015-2022 |
URL: | http://www.openreliability.org/fault-tree-analysis-on-r/ |
LazyLoad: | yes |
Imports: | Rcpp (≥ 0.12.4) |
LinkingTo: | Rcpp, RcppArmadillo |
Author: | David Silkworth [aut], Jacob Ormerod [cre], OpenReliability.org [cph] |
Maintainer: | Jacob Ormerod <jake@openreliability.org> |
NeedsCompilation: | yes |
Suggests: | magrittr |
Packaged: | 2023-08-26 16:29:12 UTC; djs |
Repository: | CRAN |
Date/Publication: | 2023-08-26 17:00:05 UTC |
Fault Trees for Risk and Reliability Analysis
Description
A package for constructing,calculating and displaying fault trees.
Introduction
FaultTree provides functions for building tree structures as dataframe objects. The fault tree incorporates logic nodes (primarily AND and OR) which process input and may direct output "upwards" through the tree structure. Data is entered through component entries. Component event entries may be active (failures immediately revealed) or dormant (failures remain hidden until activation or inspection). The fault tree may also accept pure probability or pure demand input components.
Author(s)
David J. Silkworth
Maintainer: Jacob T. Ormerod <jake@openreliability.org>
References
Ericson, Clifton A. II (2011) Fault Tree Analysis Primer CreateSpace Inc.
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Add an Active Component Event
Description
Modifies an existing fault tree with the addition of an active component event.
Usage
addActive(DF, at, mttf, mttr, display_under=NULL, tag="", label="",
name="",name2="",description="")
Arguments
DF |
A fault tree dataframe such as returned from ftree.make or related add... functions. |
at |
The ID of the parent node for this addition. |
mttf |
The mean time to failure. It is the user's responsibility to maintain constant units of time. |
mttr |
The mean time to repair (restore). It is the user's responsibility to maintain constant units of time. |
display_under |
Optionally, the ID of a sibling event under an OR gate for vertical alignment of the component node in the graphic display. |
tag |
A very short identifying string (typically 5 characters or less) uniquely identifying a basic event for minimal cutset evaluation |
label |
An identifying string for the logic gate. Use of label in ftree.make defines the convention for rest of tree construction. |
name |
A short identifying string (typically less than 24 characters) |
name2 |
A second line, if needed for the identifying string label |
description |
An optional string providing more detail for the basic event. |
Value
Returns the input fault tree dataframe appended with an entry row for the defined component event.
References
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Examples
mytree <-ftree.make(type="or")
mytree <- addActive(mytree, at=1, mttf=3, mttr=12/8760,name="pump failure")
Add a Pure Demand Event
Description
Modifies an existing fault tree with the addition of a pure demand event.
Usage
addDemand(DF, at, mttf, tag="", label="", name="", name2="", description="")
Arguments
DF |
A fault tree dataframe such as returned from ftree.make or related add... functions. |
at |
The ID of the parent node for this addition. |
mttf |
The mean time interval to events. It is the user's responsibility to maintain constant units of time. |
tag |
A very short identifying string (typically 5 characters or less) uniquely identifying a basic event for minimal cutset evaluation |
label |
An identifying string for the logic gate. Use of label in ftree.make defines the convention for rest of tree construction. |
name |
A short identifying string (typically less than 24 characters) |
name2 |
A second line, if needed for the identifying string label |
description |
An optional string providing more detail for the resultant event. |
Value
Returns the input fault tree dataframe appended with an entry row for the defined component event. Note that when a pure demand is used in combination under an AND gate, the result will contain only a conditional fail rate.
References
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Examples
mytree <-ftree.make(type="and")
mytree <- addDemand(mytree, at=1, mttf=1, name="power interruption")
Add a duplicated (repeated) event or entire branch to a fault tree.
Description
Modifies an existing fault tree with the addition of the repeated nodes.
Usage
addDuplicate(DF, at, dup_id=NULL, dup_of=NULL, display_under=NULL,
collapse=FALSE)
Arguments
DF |
A fault tree dataframe such as returned from ftree.make or related add... functions. |
at |
The ID of the parent node for this addition. |
dup_id |
The ID or tag name of a component event or root node of a branch to be repeated in a fault tree. Must provide either dup_id or dup_of. |
dup_of |
Alternative argument for the ID or tag name of a component event or root node of a branch to be repeated in a fault tree. If dup_id is provided, dup_of is ignored. |
display_under |
Optionally, the ID of a sibling event under an OR gate for vertical alignment of only component nodes (MOE, not MOB) in the graphic display. |
collapse |
A logical to determine whether a branch should be collapsed on initial view. |
Details
This function is used to replicate the source event(s), not just copy for a similar item. Both the source and replicated nodes are notated in a MOE column of the fault tree dataframe. This notation will be used by future minimal cut set determination. Additionally, future editing functions can be notified and likely blocked on these items.
Value
Returns the input fault tree dataframe appended with a entry row(s) for the defined component event.
References
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Ericson II, Clifton A. (2011) Fault Tree Analysis Primer CreateSpace Inc.
Examples
mytree <-ftree.make(type="or")
mytree <- addLogic(mytree, at=1, type= "and", name="A and B failed")
mytree <- addProbability(mytree, at=2, prob=.01, name="switch A failure")
mytree <- addProbability(mytree, at=2, prob=.01, name="switch B failure")
mytree <- addLogic(mytree, at=1, type= "and", name="A and C failed")
mytree <- addDuplicate(mytree, at=5, dup_id=3)
mytree <- addProbability(mytree, at=5, prob=.01, name="switch C failure")
Add a Time Dependant, Non-Repairable, Event
Description
Adds a basic component event to a fault tree in which probability of failure is defined by a probability distribution and exposure time.
Usage
addExposed(DF, at, mttf, dist="exponential", param=NULL, display_under=NULL,
tag="", exposure=NULL, label="", name="",name2="", description="")
Arguments
DF |
A fault tree dataframe such as returned from ftree.make or related add... functions. |
at |
The ID or tag name of the parent node for this addition. |
mttf |
The mean time to failure. It is the user's responsibility to maintain constant units of time. |
dist |
The probabilty distribution to be used for defining probability of failure from mttf, and a possible extra parameter. Options for "exponential" and "weibull" have been implemented. |
param |
A vector containing shape and time_shift for weibull exposed events in that order. |
display_under |
Optionally, the ID of a sibling event under an OR gate for vertical alignment of the component node in the graphic display. |
tag |
A very short identifying string (typically 5 characters or less) uniquely identifying a basic event for minimal cutset evaluation |
exposure |
This is to be a seldom-used override of system mission time applicable only to exponentially exposed events. |
label |
An identifying string for the logic gate. Use of label in ftree.make defines the convention for rest of tree construction. |
name |
A short identifying string (typically less than 24 characters) |
name2 |
A second line, if needed for the identifying string label |
description |
An optional string providing more detail for this probability. |
Details
The lambda for exponential definition is taken as 1/mttf, which is the value stored in CFR for the tree node. Weibull distributions have a mean, which differs from the classical scale parameter by a factor determined as gamma(1+1/shape). The weibull scale is determined from the value stored in CFR (as 1/mttf) for the tree node. Additional parameters to fully define the specific distribution of expected failure times are the shape and any time_shift.
Value
Returns the input fault tree dataframe appended with an entry row for the defined failure event.
References
Ericson, Clifton A. II (2011) Fault Tree Analysis Primer CreateSpace Inc.
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Examples
mission_time<-0.5
mytree <-ftree.make(type="or", name="6-month task", name2="incomplete")
mytree <- addExposed(mytree, at=1, mttf=3, name="pump fails",
name2="before completion")
Add a Given Condition
Description
Modifies an existing fault tree with the addition of a 'house' element. House elements signify some underlying condition and can only have probability of 1 (True) or 0 (False. They have traditionally been added to fault trees for clarity of presentation only.
Usage
addHouse(DF, at, prob=1, tag="", label="", name="", name2="", description="")
Arguments
DF |
A fault tree dataframe such as returned from ftree.make or related add... functions. |
at |
The ID of the parent node for this addition. |
prob |
A probability value of 1 or 0 |
tag |
A very short identifying string (typically 5 characters or less) uniquely identifying a basic event for minimal cutset evaluation |
label |
An identifying string for the logic gate. Use of label in ftree.make defines the convention for rest of tree construction. |
name |
A short identifying string (typically less than 24 characters) |
name2 |
A second line, if needed for the identifying string label |
description |
An optional string providing more detail for this condition. |
Value
Returns the input fault tree dataframe appended with an entry row for the defined house element.
References
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Examples
mytree <-ftree.make(type="and", name="Pump Function", name2="Failed")
mytree<-addActive(mytree,at=1,mttf=3,mttr=12/8760, name="Pump")
mytree <- addHouse(mytree, at=1, prob=1, name="Pump Function", name2="Required")
Add a Latent Component Event
Description
Modifies an existing fault tree with the addition of a latent component event.
Usage
addLatent(DF, at, mttf, mttr=NULL, inspect=NULL, risk="mean",
display_under=NULL, tag="", label="",
name="", name2="", description="")
Arguments
DF |
A fault tree dataframe such as returned from ftree.make or related add... functions. |
at |
The ID of the parent node for this addition. |
mttf |
The mean time to failure. It is the user's responsibility to maintain constant units of time. |
mttr |
The mean time to repair (restore). This should only be provided when system remains at risk, while repair is in progress, as it modifies probability by factor "pzero". It is the user's responsibility to maintain constant units of time. |
inspect |
The time interval between inspections for the dormant component. (It will be possible upon future development to enter the string for the named inspection dataframe object. In this case the inspection object will be read to get the inspection interval. An inspection object must be a dataframe with interval and duration columns. If a positive duration value other than zero is found it is taken that the system is at risk during the time of inspection. An unavailable probability calculated as duration/(interval+duration) will be added to the fractional downtime. |
risk |
An opportunity to utilize the "max" risk probability occuring at the end of inspection duration. |
display_under |
Optionally, the ID of a sibling event under an OR gate for vertical alignment of the component node in the graphic display. |
tag |
A very short identifying string (typically 5 characters or less) uniquely identifying a basic event for minimal cutset evaluation |
label |
An identifying string for the logic gate. Use of label in ftree.make defines the convention for rest of tree construction. |
name |
A short identifying string (typically less than 24 characters) |
name2 |
A second line, if needed for the identifying string label |
description |
An optional string providing more detail for the basic event. |
Value
Returns the input fault tree dataframe appended with an entry row for the defined component event.
References
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Examples
mytree <-ftree.make(type="and")
mytree <- addLatent(mytree, at=1, mttf=5,mttr=12/8760,inspect=1/26, name="e-gen set fails")
Add a Logic Gate
Description
Modifies an existing fault tree with the addition of a logic gate.
Usage
addLogic(DF, type, at, reversible_cond=FALSE, cond_first=TRUE, human_pbf=NULL,
vote_par=NULL, tag="", label="", name="", name2="", description="")
Arguments
DF |
A fault tree dataframe such as returned from ftree.make or related add... functions. |
type |
A string signifying the type of logic to be applied. Implemented gate types "or","and","inhibit","conditional" (or "cond"), vote, and "alarm" have been implemented. |
at |
The ID or tag name of the parent node for this addition. |
reversible_cond |
A boolean value used only by the conditional gate type indicating whether repair of the input condition is viable to the model. |
cond_first |
A boolean signifying whether the first child to an INHIBIT, ALARM, or PRIORITY logic gate should be taken as the condition. Alternatively, if FALSE, the second child will be taken as a condition. This is primarily a graphic display issue. |
human_pbf |
A probability of failure for a human to respond as needed to an alarm. This value is only used by the alarm gate. |
vote_par |
A vector of vote parameters as c(k,n) for k of n voting. |
tag |
A very short identifying string (typically 5 characters or less) uniquely identifying a basic event for minimal cutset evaluation |
label |
An identifying string for the logic gate. Use of label in ftree.make defines the convention for rest of tree construction. |
name |
A short identifying string (typically less than 24 characters) |
name2 |
A second line, if needed for the identifying string label |
description |
An optional string providing more detail for the resultant event. |
Value
Returns the input fault tree dataframe appended with an entry row to accept the result of the logic calculation.
References
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Examples
mytree <-ftree.make(type="cond", reversible_cond=TRUE, name="power outage")
mytree<-addLogic(mytree, at=1, type="and", name="neither emergency", name2="generator operable")
mytree<-addLatent(mytree, at=2, mttf=5,mttr=12/8760,inspect=1/26, name="e-gen set fails")
mytree<-addLatent(mytree, at=2, mttf=5,mttr=12/8760,inspect=1/26, name="e-gen set fails")
mytree <- addDemand(mytree, at=1, mttf=1, name="incomming power", name2="interruption")
Add a Pure Probability
Description
Modifies an existing fault tree with the addition of a pure probability.
Usage
addProbability(DF, at, prob, display_under=NULL, tag="",
label="", name="", name2="", description="")
Arguments
DF |
A fault tree dataframe such as returned from ftree.make or related add... functions. |
at |
The ID of the parent node for this addition. |
prob |
A probability value >0 && <1 |
display_under |
Optionally, the ID of a sibling event under an OR gate for vertical alignment of the component node in the graphic display. |
tag |
A very short identifying string (typically 5 characters or less) uniquely identifying a basic event for minimal cutset evaluation |
label |
An identifying string for the logic gate. Use of label in ftree.make defines the convention for rest of tree construction. |
name |
A short identifying string (typically less than 24 characters) |
name2 |
A second line, if needed for the identifying string label |
description |
An optional string providing more detail for this probability. |
Value
Returns the input fault tree dataframe appended with an entry row for the defined probability.
References
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Examples
mytree <-ftree.make(type="and", name="common cause failure", name2="of redundant pumps")
mytree<-addActive(mytree,at=1,mttf=3,mttr=12/8760, name="Pump")
mytree <- addProbability(mytree, at=1, prob=.05, name="common cause", name2="beta factor")
Enter a Probability for an Undeveloped Event
Description
Modifies an existing fault tree with the addition of an undeveloped probability.
Usage
addUndeveloped(DF, at, prob=0, tag="", label="",
name="", name2="", description="")
Arguments
DF |
A fault tree dataframe such as returned from ftree.make or related add... functions. |
at |
The ID or tag name of the parent node for this addition. |
prob |
A probability value >=0 && <1 |
tag |
A very short identifying string (typically 5 characters or less) uniquely identifying a basic event for minimal cutset evaluation |
label |
An identifying string for the logic gate. Use of label in ftree.make defines the convention for rest of tree construction. |
name |
A short identifying string (typically less than 24 characters) |
name2 |
A second line, if needed for the identifying string label |
description |
An optional string providing more detail for this probability. |
Value
Returns the input fault tree dataframe appended with an entry row for the undeveloped probability.
References
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Examples
mytree <-ftree.make(type="and", name="pumping failures")
mytree<-addActive(mytree,at=1,mttf=3,mttr=12/8760, name="Pump Mechanical", name2="Failures")
mytree <- addUndeveloped(mytree, at=1, prob=.05, name="external causes", name2="of pump failure")
Set a gate node for collapsed state on initial rendering.
Description
Modifies an existing fault tree by setting the Collapse field of the selected node to 1.
Usage
applyCollapse(DF, on)
Arguments
DF |
A fault tree dataframe such as returned from ftree.make or related add... functions. |
on |
The ID of the basic element node to be defined uncertain. |
Value
Returns the input fault tree dataframe amended with an entry defining collapsed initial state for the selected node.
References
Rauzy, Antoine, et. al. (2013) Open PSA Model Exchange Format v2.0 open-psa.org
Limnios, Nikolaos (2007) Fault Trees ISTE Ltd.
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Ericson II, Clifton A. (2011) Fault Tree Analysis Primer CreateSpace Inc.
Examples
mytree <-ftree.make(type="or")
mytree <- addLogic(mytree, at=1, type= "and", name="A and B failed")
mytree <- addProbability(mytree, at=2, prob=.01, name="switch A failure")
mytree <- addProbability(mytree, at=2, prob=.01, name="switch B failure")
mytree <- addLogic(mytree, at=1, type= "and", name="A and C failed")
mytree <- addDuplicate(mytree, at=5, dup_id=3)
mytree <- addProbability(mytree, at=5, prob=.01, name="switch C failure")
mytree <- applyCollapse(mytree, on=5)
Fault Tree Minimal Cut Set Determination
Description
Determines minimal cutsets by various methods.
Usage
cutsets(DF, ft_node=1, method="mocus", by="tag")
Arguments
DF |
A fault tree dataframe such as returned from ftree.make or related add... functions. |
ft_node |
A gate node ID treated as top of (sub)tree to be calculated. |
method |
The method for calculation either 'mocus' or 'prime-implicants' |
by |
Selection of identifier for each element of the cutset either 'tag' or 'id' |
Value
Returns a list of matrices for each of cut set lengths found. Each element is defined by its unique ID assigned in the fault tree or by its unique Tag applied by the user.
References
Fussell, J., Vesely, W.E. (1972) A New Method for Obtaining Cut Sets for Fault Trees Transactions ANS, No. 15
Ericson, Clifton A. II (2011) Fault Tree Analysis Primer CreateSpace Inc.
Ericson, Clifton A. II (2005) Hazard Analysis Techniques for System Safety John Wiley & Sons
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Rauzy, Antoine (1993) "New algorithms for fault trees analysis" Reliabiity Engineering System Safety, volume 40
Limnios, Nikolaos (2007) Fault Trees ISTE,Ltd.
Bedford, Tim, Cooke, Roger (2012) Probabilistic Risk Analysis Foundations and Methods Cambridge University Press
Examples
minex2<-ftree.make(type="and")
minex2<-addProbability(minex2, at="top", prob=.01, tag="X1", name="X1")
minex2<-addLogic(minex2, at="top", type="or", tag="G1", name="G1")
minex2<-addProbability(minex2, at="G1", prob=.02, tag="X2", name="X2")
minex2<-addProbability(minex2, at="G1", prob=.03, tag="X3", name="X3")
minex2<-addLogic(minex2, at="top", type="or", tag="G2", name="G2")
minex2<-addDuplicate(minex2, at="G2", dup_of="X3")
minex2<-addProbability(minex2, at="G2", prob=.04, tag="X4", name="X4")
minex2_cs<-cutsets(minex2)
Fault Tree Calculation
Description
ftree.calc performs gate-by-gate calculations from bottom to top of fault tree.
Usage
ftree.calc(DF, use.bdd=FALSE)
Arguments
DF |
A fault tree dataframe such as returned from ftree.make or related add... functions. |
use.bdd |
A logical determining whether to use the bdd for probability calculations rather than simple solutions. |
Value
Returns a dataframe containing 18 columns for holding data, results, and connection information.
References
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Rauzy, Antoine (1993) "New algorithms for fault trees analysis" Reliabiity Engineering System Safety, volume 40
Limnios, Nikolaos (2007) Fault Trees ISTE,Ltd.
Bedford, Tim, Cooke, Roger (2012) Probabilistic Risk Analysis Foundations and Methods Cambridge University Press
Examples
minex2<-ftree.make(type="and")
minex2<-addProbability(minex2, at="top", prob=.01, tag="X1", name="X1")
minex2<-addLogic(minex2, at="top", type="or", tag="G1", name="G1")
minex2<-addProbability(minex2, at="G1", prob=.02, tag="X2", name="X2")
minex2<-addProbability(minex2, at="G1", prob=.03, tag="X3", name="X3")
minex2<-addLogic(minex2, at="top", type="or", tag="G2", name="G2")
minex2<-addDuplicate(minex2, at="G2", dup_of="X3")
minex2<-addProbability(minex2, at="G2", prob=.04, tag="X4", name="X4")
minex2<-ftree.calc(minex2, use.bdd=TRUE)
Fault Tree Creation
Description
ftree.make prepares an initial, single row, dataframe, which will be built upon as the tree is developed.
Usage
ftree.make(type, reversible_cond=FALSE, cond_first=TRUE, human_pbf=NULL,
start_id=1, system_mission_time=NULL, label="", name="", name2="",
description="")
Arguments
type |
The logic type for the top gate. Possible gates are "or", "and", "inhibit", "priority", and "alarm". Gate types "vote" and "atleast" are disallowed in top event, place these under an OR gate. |
reversible_cond |
A boolean value used only by the conditional gate type indicating whether repair of the input condition is viable to the model. |
cond_first |
A boolean signifying whether the first child to an INHIBIT, ALARM, or PRIORITY logic gate should be taken as the condition. Alternatively, if FALSE, the second child will be taken as a condition. This is primarily a graphic display issue. |
human_pbf |
A probability of failure for a human to respond as needed to an alarm. This value is only used by the alarm gate. |
start_id |
An integer value for the starting unique ID, useful for transfer objects. |
system_mission_time |
An optional method for setting mission_time for the entire tree. It is also possible to set mission_time as a global variable. Use of system_mission_time in ftree.make will take precidence. |
label |
An identifying string for the logic gate. Use of label defines the convention for rest of tree construction. |
name |
An identifying string for the logic gate. |
name2 |
A second line, if needed for the identifying string label |
description |
An optional string providing more detail for the resultant event. |
Value
Returns a dataframe holding data, results, and connection information.
References
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Examples
mytree <- ftree.make(type="and", name="a specific undesired event")
Generation of Binary Decision Diagram
Description
Prepares a BDD string in if-then-else form '<tag,if,else>'
Usage
ftree2bdd(DF, ft_node=1)
Arguments
DF |
A fault tree dataframe object. |
ft_node |
A gate node ID treated as top of (sub)tree to be calculated. |
References
Rauzy, Antoine (1993) "New algorithms for fault trees analysis" Reliabiity Engineering System Safety, volume 40
Limnios, Nikolaos (2007) Fault Trees ISTE,Ltd.
Fault Tree Rendered in HTML
Description
Prepares a web page from an ftree dataframe for a visualization of the data.
Usage
ftree2html(DF,dir="", write_file=TRUE)
Arguments
DF |
A fault tree dataframe object. |
dir |
A character string for an absolute directory in which R can read and write. |
write_file |
A logical controlling whether to perform the write operation. |
Value
Returns a character vector with escaped quote characters, suitable for writing to disk. Optionally, this vector will be written to a file taking the name of the object passed in as DF and appending '.html'.
References
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Examples
mytree <- ftree.make(type="or", name="site power loss")
ftree2html(mytree, write_file=FALSE)
Fault Tree Tabular Subview
Description
Delivers an informative subview from an ftree dataframe with condensed output.
Usage
ftree2table(DF)
Arguments
DF |
A fault tree dataframe object. |
Value
Returns a new condensed dataframe that is a subview of the ftree object.
References
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Examples
mytree <- ftree.make(type="or", name="site power loss")
ftree2table(mytree)
JSON formatting for tabular hierarchy data
Description
Converts data from a flat-table dataframe to a recursive json structure suitable for passing to D3 heirarchy objects.
Usage
hierarchyDF2json(DF,id.col=1, parent.col=2, data.col=NULL,
children.key="children", keys.tolower=TRUE, reverse_child_order=FALSE,
dir="", write_file=FALSE )
Arguments
DF |
A dataframe object with unique identification column and a column containing parent node identifications. The first row must contain the root node of the hierarchy. |
id.col |
The name or number of the column holding unique identifiers, default is 1. |
parent.col |
The name or number of the column holding parent node identifications, default is 2. Entry in row one of this column will be ignored. |
data.col |
A vector of column numbers from the dataframe to be passed as json data, default is all columns. |
children.key |
A string to be used as the key for children entries. |
keys.tolower |
A logical indicating whether to convert column names of the input dataframe to lower case, when passing keys to the json format. |
reverse_child_order |
A logical indicating whether to reverse the order of child nodes under each parent. This is useful when desiring nodes to form from top to bottom in a horizontal tree structure. |
dir |
A character string for an absolute directory in which R can read and write. |
write_file |
A logical controlling whether to perform the write operation. |
Value
Returns a character vector with escaped quote characters, suitable for writing to disk. Optionally, this vector will be written to a file taking the name of the object passed in as DF and appending '.json'.
References
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Ericson II, Clifton A. (2011) Fault Tree Analysis Primer CreateSpace Inc.
Examples
mytree <- ftree.make(type="or", name="conveyor belt fire")
hierarchyDF2json(mytree, id.col=1, parent.col=2, data.col=c(1,2))
Parameter Conversion Helper Functions
Description
Access to a set of functions performing paramter conversions applicable to FaultTree scripting needs,
Usage
parameter_conversion(conv, param)
Arguments
conv |
A string holding the name of a cnversion function, or its assigned numerical equivalent. |
param |
A vector holding values appropriate for the requested conversion. See Details below. |
Details
Conversion functions and their expected arguments are listed as follows:
conv param[1] param[2] param[3] 1 "prob2lam" prob 2 "prob2meanw" prob wshape time_shift 3 "wscale2mean" wscale wshape time_shift 4 "meanw2scale" wmean wshape time_shift 5 "sigma2ef" sigma conf_limit 6 "ef2sigma" ErrFunc conf_limit 7 "meanln2mu" meanln sigma
Value
Returns a value according to the conversion requested.
References
Fussell, J., Vesely, W.E. (1972) A New Method for Obtaining Cut Sets for Fault Trees Transactions ANS, No. 15
Ericson, Clifton A. II (2011) Fault Tree Analysis Primer CreateSpace Inc.
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Examples
mission_time=20
mttf<-1/parameter_conversion("prob2lam", .2)
Parameter Conversion Helper Functions
Description
Access to a set of functions performing paramter conversions applicable to FaultTree scripting needs,
Usage
pc(conv, param)
Arguments
conv |
A string holding the name of a cnversion function, or its assigned numerical equivalent. |
param |
A vector holding values appropriate for the requested conversion. See Details below. |
Details
Conversion functions and their expected arguments are listed as follows:
conv param[1] param[2] param[3] 1 "prob2lam" prob 2 "prob2meanw" prob wshape time_shift 3 "wscale2mean" wscale wshape time_shift 4 "meanw2scale" wmean wshape time_shift 5 "sigma2ef" sigma conf_limit 6 "ef2sigma" ErrFunc conf_limit 7 "meanln2mu" meanln sigma
Value
Returns a value according to the conversion requested.
References
Fussell, J., Vesely, W.E. (1972) A New Method for Obtaining Cut Sets for Fault Trees Transactions ANS, No. 15
Ericson, Clifton A. II (2011) Fault Tree Analysis Primer CreateSpace Inc.
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Examples
mission_time=20
mttf<-1/pc(1, .2)
reverse calculation of exponential lambda from probability
Description
A simplistic helper function for converting fixed probability to a fail rate using known exposure time.
Usage
prob2lam(prob)
Arguments
prob |
A fixed probability value that is to be converted to fail rate for exposed element entry. |
Value
Returns the lambda value that will produce the fixed probability with environment object mission_time.
References
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Ericson II, Clifton A. (2011) Fault Tree Analysis Primer CreateSpace Inc.
Examples
mission_time<-8760
mttf=1/prob2lam(.6)
Probability Calculstion by BDD or mcub
Description
Performs a calculation at a selected fault tree gate node.
Usage
probability(DF, ft_node=1, method="bdd")
Arguments
DF |
A fault tree dataframe object. |
ft_node |
A gate node ID treated as top of (sub)tree to be calculated. |
method |
The method for calculation either 'bdd' or 'mcub' |
Details
For BDD probability a binary decision diagram is generated on which a recusive algorithm is operated to generate the exact probablility. For mcub (minimal cutset upper bound) the mocus algorithm is run to determine minimal cutsets. The upper bound estimate for probability is calculated by a probabilistic sum of the individual cutset probabilities.
References
Ericson, Clifton A. II (2011) Fault Tree Analysis Primer CreateSpace Inc.
Ericson, Clifton A. II (2005) Hazard Analysis Techniques for System Safety John Wiley & Sons
Rauzy, Antoine (1993) "New algorithms for fault trees analysis" Reliabiity Engineering System Safety, volume 40
Limnios, Nikolaos (2007) Fault Trees ISTE,Ltd.
Bedford, Tim, Cooke, Roger (2012) Probabilistic Risk Analysis Foundations and Methods Cambridge University Press
Interpretation of Node ID by tag Name
Description
Enables tree building improvement by allowing reference to nodes by tag.
Usage
tagconnect(DF, at, source=FALSE)
Arguments
DF |
A fault tree dataframe such as returned from ftree.make or related add... functions. |
at |
An ID value or tag name for reference to a node. |
source |
A logical indicating whether to evaluate multiple occurences of the tag to identify the source of duplication. Default of FALSE will cause the function to fail in case of multiple occurence of tag provided as 'at'. |
Value
Returns the ID value for the node whether it is a tag string or the actual ID value.
References
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Vesely, W.E., Goldberg, F.F., Roberts, N.H., Haasl, D.F. (1981) Fault Tree Handbook U.S. Nuclear Regulatory Commission
Vesely, W.E., Stamatelato, M., Dugan, J., Fragola, J., Minarick, J., Railsback, J. (2002) Fault Tree Handbook with Aerospace Applications NASA
Doelp, L.C., Lee, G.K., Linney, R.E., Ormsby R.W. (1984) Quantitative fault tree analysis: Gate-by-gate method Plant/Operations Progress Volume 3, Issue 4 American Institute of Chemical Engineers
Examples
mytree <-ftree.make(type="and", name="common cause failure", name2="of redundant pumps")
mytree<-addActive(mytree,at="top",mttf=3,mttr=12/8760, tag="p1", name="Pump")
mytree <- addProbability(mytree, at="top", prob=.05, name="common cause", name2="beta factor")
pumpIDvalue<-tagconnect(mytree, at="p1")
Fault Tree Object Test
Description
test.ftree compares dataframe column names with those of an ftree object.
Usage
test.ftree(DF)
Arguments
DF |
A FaultTree dataframe object |
Value
Returns True for object match, else False.
References
Nicholls, David [Editor] (2005) System Reliability Toolkit Reliability information Analysis Center
O'Connor, Patrick D.T. (1991) Practical Reliability Engineering John Wiley & Sons
Examples
mytree <- ftree.make(type="or", name="site power loss")
test.ftree(mytree)