* Example 8:
* In next example we model the reliability and
* inst. availability of a system Using a fault tree. See
* Sahner & Trivedi; IEEE-TR; June 1987.
* Section 5 of the paper. This is a simplified
* version of the problem

format 8

bind
busrr 1/2.5
muproc 1/2.5
memrr 1/2.5
end

* Model the system reliability without repair
ftree system1
basic proc exp(1/720)
basic mem  exp(1/(2*720))
basic bus  exp(1/(3*720))
kofn procs 2, 2 , proc
kofn mems 2, 3 , mem
or top procs mems bus
end

* polynomial U is the inst. unavail of a component
poly U(lambda, mu) gen\
   lambda / (lambda + mu), 0, 0\
  -lambda / (lambda + mu), 0, -(lambda + mu)
* model system insta. availability
ftree system2
basic proc U(1/720,muproc)
basic mem  U(1/(2*720),memrr)
basic bus  U(1/(3*720),busrr)
kofn procs 2, 2 , proc
kofn mems 2, 3 , mem
or top procs mems bus
end

markov mb
0 1 1/(3*720)
1 0 busrr
end



markov mm
0 1 1.5/720
1 2 1/720
2 3 1/(2*720)
1 0 memrr
2 1 memrr
3 2 memrr
end


markov mp
0 1 2/720
1 2 1/720
1 0 muproc
2 1 muproc
end



* Model system steady-state availability
poly U1(a) gen\
   a, 0, 0

ftree system3
basic proc U1(prob(mp,2))
basic mem  U1(prob(mm,2)+prob(mm,3))
basic bus  U1(prob(mb,1))
or top proc mem bus
end

cdf (system1)
cdf (system2)
cdf (system3)
end

end



