createSystem: Create a system specification

View source: R/createSystem.R

createSystemR Documentation

Create a system specification

Description

Creates a system design specification based on passing a textual representation of design.

Usage

createSystem(..., types = NULL)

Arguments

...

multiple expressions which together define an undirected graph representation of the reliability block diagram for the system design. There should be two terminal ‘dummy’ nodes to represent either end of the system structure, which must be labelled s and t (assumed perfectly reliable). All reliability assessment is of the connectivity of these nodes. See details and examples.

types

(optional) named list of vectors. The names correspond to component types, whilst each vector indicates which components are of that type. When it is not specified then all components are assumed to be of the same type. This can be updated later using the function setCompTypes.

Details

This function enables specification of a system design by textual representation of the reliability block diagram, for use in many other functions in this package. The method of representing the system is as for an undirected graph in the igraph package.

There should be two terminal ‘dummy’ nodes to represent either end of the system structure, which must be labelled s and t (assumed perfectly reliable). Dashes -- are then used to connect numbered nodes together. The full specification can be spread over multiple arguments. Colon notation can denote an edge to multiple nodes, but is not a range specifier (eg 1:5 means components 1 and 5, not components 1 to 5). Following are some concrete examples:

  1. a series system of 3 components:

    createSystem(s -- 1 -- 2 -- 3 -- t)

  2. a parallel system of 3 components:

    createSystem(s -- 1 -- t, s -- 2 -- t, s -- 3 -- t)

    Or, more succinctly:

    createSystem(s -- 1:2:3 -- t)

  3. a classic ‘bridge’ system consisting of 5 components:

    createSystem(s -- 1:2 -- 5 -- 3:4 -- t, 1 -- 3, 2 -- 4)

    Exactly equivalently:

    createSystem(s -- 1 -- 3 -- t, s -- 2 -- 4 -- t, 1:2 -- 5 -- 3:4)

Value

Returns a system of the design specified.

Internally, this is an igraph object, with some additional attributes relevant to system specification.

Author(s)

Louis J.M. Aslett louis.aslett@durham.ac.uk (https://www.louisaslett.com/)

See Also

setCompTypes to specify component types after system creation, rather than in the same command.

Examples

# Create a bridge system, with all components of the same type (or with type to
# be defined later)
bridge <- createSystem(s -- 1:2 -- 5 -- 3:4 -- t, 1 -- 3, 2 -- 4)

# Create a bridge system, with two types of component
bridge <- createSystem(s -- 1:2 -- 5 -- 3:4 -- t, 1 -- 3, 2 -- 4,
                       types = list(T1 = 1:4, T2 = 5))

louisaslett/ReliabilityTheory documentation built on Feb. 22, 2024, 8:02 p.m.