Ejemplo n.º 1
0
def system_example():
    r""" Describe the system as a reliability block diagram

              | -- A0 -- | -- M0 -- |
              |            /        |
         E -- | -- A1 -- |          | -- S
              |            \        |
              | -- A2 -- | -- M1 -- |
    """

    alim = [Component('A_%s' % i, 2e-4) for i in xrange(3)]
    motors = [Component('M_%s' % i, 1e-4) for i in xrange(2)]
    S = System()

    S['E'] = [alim[0], alim[1], alim[2]]
    S[alim[0]] = [motors[0]]
    S[alim[1]] = [motors[0], motors[1]]
    S[alim[2]] = [motors[1]]
    S[motors[0]] = 'S'
    S[motors[1]] = 'S'

    print('The MTTF of the system is :', S.mttf)

    timerange = range(0, 2 * 365 * 24, 100)  # 2 years study
    reliability = [S.reliability(t) for t in timerange]
    plot(timerange, reliability)
    show()
Ejemplo n.º 2
0
from fiabilipy import Component
from sympy import Symbol
t = Symbol('t', positive=True)
comp = Component('C0', 1e-4)
print(comp.reliability(100))
print(comp.reliability(t=33))
print(comp.mttf)
from fiabilipy import System
power = Component('P0', 1e-6)
motor = Component('M0', 1e-3)
print(power)
S = System()
S['E'] = [power]
S[power] = [motor]
S[motor] = 'S'
print(S.reliability(t))
print(S.mttf)
print(float(S.mttf))
a, b, c, d, e, f, g = [Component('C%i' % i, 1e-4) for i in range(7)]
S = System()
S['E'] = [a, b, c, g]
S[a] = S[g] = S[e] = S[d] = 'S'
S[b] = S[c] = [f]
S[f] = [e, d]
print(a)
print(S.mttf)
print(float(S.mttf))
print(S.reliability(t))
import pylab as p
a, b = Component('a', 1e-5), Component('b', 1e-7)
S = System()