from
One Single Component Reliability Monte Carlo Chronological Method
by Jorge Thomas
This program calculates the availability and unavailability of a single component given the MTTF and
|
| MCCSingleComponent.m |
%Results may be compared with those obtained by analytical calculations
%Tup and Tdn are the vectors with the artificial history of the component
%Any question: jorgethomasm@ieee.org
format long;
format compact;
N=input('Set the number of experiments: ');
MTTF=input ('Introduce the Mean Time To Failure MTTF(hours):')/8760;
MTTR=input ('Introduce the Mean Time To Repair MTTR (hours):')/8760;
Tup=zeros(N,1);
Tdn=zeros(N,1);
A=zeros(N,1);
for i=1:N
hup=exprnd(MTTF);
hdn=exprnd(MTTR);
Tup(i)=hup;
Tdn(i)=hdn;
A(i)=Tup(i)/(Tdn(i)+Tup(i));
end
Tspan=(sum(Tup)+sum(Tdn));
disp('Simulation time (years): ');
disp(Tspan);
Availability=sum(Tup)/Tspan
Unavailability=1-Availability
|
|
Contact us at files@mathworks.com