simulateSystem: Simulate Masked Lifetime Data for a System

View source: R/Simulate.R

simulateSystemR Documentation

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: a system object (made with createSystem 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.

Details

The system or network is specified by means of a system object, whereby each end of the system is denoted by nodes named s and t which are taken to be perfectly reliable. It is easy to construct the appropriate reliability block diagram representation using the function createSystem. Note that each physically distinct component should be separately numbered when constructing this object.

This function then generates iid realisations of masked lifetimes.

Value

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

Note

Please feel free to email louis.aslett@durham.ac.uk with any queries or if you encounter errors when running this function.

Author(s)

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

Examples

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

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

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