Skip to content

pyRBDlogo pyRBD

PyPI - Version Python Coverage Pylint

A Python package for creating simple reliability block diagrams (RBDs) using LaTeX and TikZ.

Dependencies

pyRBD requires a working installation of LaTeX including TikZ and latexmk.

Simple example diagram

The blocks of the RBD are defined using Block, Series and Group, and the diagram itself is handled by the Diagram class. A simple example is given by the code

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
from pyrbd import Block, Diagram

start_block = Block("Start", "blue!30", parent=None)
parallel = 2 * Block("Parallel blocks", "gray", parent=start_block)
end_block = Block("End", "green!50", parent=parallel)

diagram = Diagram(
    "simple_RBD",
    blocks=[start_block, parallel, end_block],
)
diagram.write()
diagram.compile()

producing the following diagram