## EXAMPLE 1
## Figure 1 in Coolen and Coolen-Maturi (2012)
# First, define the structure, ensuring that each physically separate component
# is separately numbered
fig1 <- createSystem(s -- 1 -- 2:3 -- 4 -- 5:6 -- t, 2 -- 5, 3 -- 6)
# Second, assign types to the components with this function
setCompTypes(fig1, list("Type 1" = c(1, 2, 5), "Type 2" = c(3, 4, 6)))
# Note that one can create the same system and avoid using setCompTypes by
# specifying the types in the initial call to createSystem if desired.
# The following code results in exactly the same system specification as fig1:
fig1b <- createSystem(s -- 1 -- 2:3 -- 4 -- 5:6 -- t, 2 -- 5, 3 -- 6,
types = list("Type 1" = c(1, 2, 5), "Type 2" = c(3, 4, 6)))
Run the code above in your browser using DataLab