systemGraphToGenerator: Construct a Continuous-time Markov Chain Generator

Description Usage Arguments Details Value Note Author(s) References Examples


This function enables easy construction of an absorbing continuous-time Markov chain generator matrix representation for a system when components are treated as having Exponential failure and repair times.


systemGraphToGenerator(g, failRate, repairRate)



an igraph object representing the system or network whose generator matrix representation is to be computed. There should be two terminal 'dummy' nodes to represent either end of the structure which must be labelled "s" and "t". They are assumed perfectly reliable. See details and examples.


the rate parameter of the Exponentially distributed lifetime distribution of the components.


the rate parameter of the Exponentially distributed repair time distribution of the components.


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 creates the generator matrix for an absorbing continuous-time Markov chain representation of such a system where components are repairable. All system states which in which the system is inoperative are collapsed into the absorbing state.

The returned values are in the format required by the phtMCMC2.

Full details are in Aslett (2012).


A list is returned with both a numeric generator matrix (in $G with the failure rate, failRate, and repair rate, repairRate) and a symbolic matrix (in $structure$G), along with a matrix of the constant multiples of generator entries (in $structure$C).


Please feel free to email with any queries or if you encounter errors when running this function.


Louis J.M. Aslett (


Aslett, L. J. M. (2012), MCMC for Inference on Phase-type and Masked System Lifetime Models, PhD Thesis, Trinity College Dublin.


# Get the generator representing a repairable 5 component 'bridge' system with
# failure rate 1 and repair rate 365.
G <- systemGraphToGenerator(sccsO5[[18]]$graph, 1, 365)

Search within the ReliabilityTheory package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.