Learn R Programming

ReliabilityTheory (version 0.1.5)

simulateSystem: Simulate Masked Lifetime Data for a System

Description

This function enables easy simulation of iid masked lifetime observations from a system or network.

Usage

simulateSystem(system, n, rdens, ...)

Arguments

system
may be: an igraph object representing the system; the collection of cutsets of the system; or the system signature.
n
how many simulations to produce.
rdens
a user defined function which generates random realisations of the component lifetimes.
...
parameters passed to the user defined function rdens.

Value

a numeric vector of length n containing the masked lifetime data.

Details

When the system or network is specified by means of an igraph object, each end of the system must be denoted by nodes named "s" and "t" which are taken to be perfectly reliable. It is easy to construct the appropriate graph representation using the function graph.formula.

This function then generates iid realisations of masked lifetimes.

Examples

Run this code
# Simulate 20 masked lifetimes of a two component series system with Exponential(2)
# component lifetimes
# Using igraph object ...
simulateSystem(graph.formula(s -- 1 -- 2 -- t), 20, rexp, rate=2)

# ... and using signature
simulateSystem(c(1,0), 20, rexp, rate=2)

Run the code above in your browser using DataLab