Voter – Voter building

class fiabilipy.Voter(component, M, N, lambda_=0, mu=0, initialy_avaible=True)

A voter with identical components having a constant failure rate

This class is used to describe a voter. A voter M out-of N works if and only if at least M components out of the N avaible work.

component `Component`

the component to be replicated by the voter

N int

the initial number of components

M int

the minimal number of working components

lambda_ float

the constant failure rate of the voter

mu float, optional

the constant maintainability rate of the voter

initialy_avaible boolean, optional

whether the component is avaible at t=0 or not

Examples

>>> motor = Component('M', 1e-4, 3e-2)
>>> voter = Voter(motor, 2, 3)
>>> voter.mttf
8333.33333333333
availability(t)

Compute the availability of the voter at t

This method compute the availability of the voter at t.

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

Examples

>>> motor = Component('M', 1e-4, 3e-2)
>>> voter = Voter(motor, 2, 3, mu=1e-3)
>>> t = Symbol('t', positive=True)
>>> voter.availability(t) 
3.0*(-0.00332225913621263*exp(-0.0301*t) +
0.00332225913621265)*(0.00332225913621263*exp(-0.0301*t) +
0.996677740863787)**2 + 1.0*(0.00332225913621263*exp(-0.0301*t) +
0.996677740863787)**3
>>> voter.availability(1000)
0.999966961120940
maintainability(t)

Compute the maintainability of the voter at t

This method compute the maintainability of the voter at t.

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

Examples

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

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

The MTTF is defined as :
\(MTTF = \int_{0}^{\infty} R(t)dt\)
Returns:out (float) – The component MTTF

Examples

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

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

The MTTR is defined as :
\(MTTR = \int_{0}^{\infty} 1 - M(t)dt\)
Returns:out (float) – The component MTTR

Examples

>>> motor = Component('M', 1e-4, 3e-2)
>>> voter = Voter(motor, 2, 3, mu=1e-3)
>>> voter.mttr
1000.57547188695
reliability(t)

Compute the reliability of the voter at t

This method compute the reliability of the voter 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)
>>> voter = Voter(motor, 2, 3)
>>> t = Symbol('t', positive=True)
>>> voter.reliability(t)
3.0*(-exp(-0.0001*t) + 1)*exp(-0.0002*t) + 1.0*exp(-0.0003*t)
>>> voter.reliability(1000)
0.974555817870510

Previous topic

Component – Compoment building

Next topic

System – System building and description

This Page