gate_xorThe Boolean logic gate "xor" in the fault tree. Calculate the probability that the conditioning event happens according to the inputs.
xxxxxxxxxxq = gate_xor(q1, q2)xxxxxxxxxxq = gate_xor(q1, q2)Calculate the probability that the conditioning event happens according to the inputs q1 and q2.
The relationship between them satisfies the following equation.
where
xxxxxxxxxx>>> from OpenHA.assessment.system import gate_xor>>> q1, q2 = 0.8, 0.9>>> print(gate_xor(q1, q2))
# (1 - 0.8) * 0.9 + 0.8 * (1 - 0.9)# 0.2 * 0.9 + 0.8 * 0.1# 0.18 + 0.08
0.26
q1 —— The probability that an event happens, specified as a positive numeric scaler in
q2 —— The probability that the other event happens, specified as a positive numeric scaler in