Uses tidyverse
, tidygraph
, and QCA
packages, among others, to visualize fault trees, identify minimal cutsets, and other quantities of interest.
How do we use tidyfault
to analyze fault trees?
Let's start by loading our dependencies!
# Load dependencies
library(tidyfault)
library(tidyverse)
library(QCA)
Next, let's get some fake data to work with, including nodes and edges in our fault tree.
#Load example data into our environment
data("fakenodes")
data("fakeedges")
Finally, let's demonstrate the basic workflow for tidyfault
!
First, we...
curate()
a list of gates in the fault tree;
mygates = curate(nodes = fakenodes, edges = fakeedges)
- use
equate()
to find the boolean equation for the fault tree;
myequation = mygates %>% equate()
formulate()
that equation into anR
function we can use;
myfunction = myequation %>% formulate()
calculate()
all the truth table of all possible combinations of events and theoutcome
each leads to.
mycombos = myfunction %>% calculate()
concentrate()
our truth table into the minimum cutsets, the smallest sets of events necessary to cause system failure. This function uses boolean minimalization to find the minimum cutsets.
mymin = mycombos %>% concentrate()
tabulate()
up our minimum cutsets and how coverage they have over the total paths to failure found withcalculate()
.
mytable = mymin %>% tabulate()
Or, we can do this all in one fell swoop!
Let's extract the minimum cutsets from our fault tree data!
# Start by curating the gates...
mytable = curate(
nodes = fakenodes,
edges = fakeedges) %>%
# Now apply our next functions
equate() %>%
formulate() %>%
calculate() %>%
concentrate() %>%
tabulate()
Contact: Timothy Fraser, PhD (timothy.fraser.1@gmail.com)