Component – Compoment building

class fiabilipy.Component(name, lambda_, mu=0, initialy_avaible=True)

Describe a component with a constant failure rate.

This class is used to create all the components of a system.

name str

the name of the component. (It has to be a unique name for the whole system)

lambda_ float

the constant failure rate of the component

mu float, optional

the constant maintainability rate of the component

initialy_avaible boolean, optional

whether the component is avaible at t=0 or not

Examples

>>> motor = Component('M', 1e-4, 3e-2)
>>> motor.lambda_
0.0001
availability(t)

Compute the availability of the component at t

This method compute the availability of the component at t.

Parameters :t (int or Symbol)
Returns:out (float or symbolic expression) – The availability calculated for the given t

Examples

>>> motor = Component('M', 1e-4, 3e-2)
>>> t = Symbol('t', positive=True)
>>> motor.availability(t)
0.00332225913621263*exp(-0.0301*t) + 0.996677740863787
>>> motor.availability(1000)
0.996677740863788
maintainability(t)

Compute the maintainability of the component at t

This method compute the maintainability of the component at t.

Parameters :t (int or Symbol)
Returns:out (float or symbolic expression) – The maintainability calculated for the given t

Examples

>>> motor = Component('M', 1e-4, 3e-2)
>>> t = Symbol('t', positive=True)
>>> motor.maintainability(t)
-exp(-0.03*t) + 1.0
>>> motor.maintainability(1000)
0.999999999999906
mttf

Compute the Mean-Time-To-Failure of the component

The MTTF is defined as :
\(MTTF = \int_{0}^{\infty} R(t)dt = \frac{1}{\lambda}\)

when the failure rate (\(\lambda\) is constant)

Returns:out (float) – The component MTTF

Examples

>>> motor = Component('M', 1e-4, 3e-2)
>>> motor.mttf
10000.0
mttr

Compute the Mean-Time-To-Repair of the component

The MTTR is defined as :
\(MTTR = \int_{0}^{\infty} 1 - M(t)dt = \frac{1}{\mu}\)

when the failure rate (\(\mu\) is constant)

Returns:out (float) – The component MTTR

Examples

>>> motor = Component('M', 1e-4, 3e-2)
>>> motor.mttr
33.333333333333336
reliability(t)

Compute the reliability of the component at t

This method compute the reliability of the component at t.

Parameters :t (float or Symbol)
Returns:out (float or symbolic expression) – The reliability calculated for the given t

Examples

>>> motor = Component('M', 1e-4, 3e-2)
>>> t = Symbol('t', positive=True)
>>> motor.reliability(t)
exp(-0.0001*t)
>>> motor.reliability(1000)
0.904837418035960

Previous topic

system – System building and description

Next topic

Voter – Voter building

This Page