Reference: Byun, J.-E. and Song, J. (2021). A general framework of Bayesian network for system reliability analysis using junction tree. Reliability Engineering & System Safety, 216, 107952.
Can you explain the logic of the core function in the gen_bnb.py. There are many breaks, and conditions for if-elif-else statement does not seem to be comprehensive.
I guess it's better to use zero-based index for comps_st values. So no need to change the value when it's used as an index.
I am not sure whether 'surv', 'fail', 'unk' should be mapped to integers or not?
This is also a good idea, but since it is not urgent, I will for the moment make a function that maps the states into integers after applying the B&B function.