jieunbyun / BNS-JT

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.
MIT License
5 stars 4 forks source link

csys for pipe system not the same as notebook #42

Closed dynaryu closed 12 months ago

dynaryu commented 12 months ago

still different result by test_get_csys_from_brs_pipe from the notebook (gen_bnb_to_rel_deter_ind_pipe.ipynb) Brs from the gen_bnb seem right though. I guess Brs are the same between pipe_system_v2.ipynb and gen_bnb_to_rel_deter_ind_pipe.ipynb? Any thoughts?

jieunbyun commented 12 months ago

The difference comes from how 'x_n' are defined (in the for loop with c_idx). In the ipynb script, now I made pipelines in reverse direction represented by different component events because I was told that usually those pipelines are different entities.

dynaryu commented 11 months ago

Did you have a chance to check the Csys, the output of the test?

BNS_JT/tests/test_pipes_sys.py::test_get_cys_from_brs_pipe
[[0 2 2 ... 3 3 3]
 [0 2 2 ... 3 3 3]
 [0 2 0 ... 3 3 3]
 ...
 [1 2 1 ... 5 2 3]
 [1 2 1 ... 3 2 3]
 [1 2 1 ... 3 2 3]]

5 does not seem right to me.

jieunbyun commented 11 months ago

Yes, I checked the result, and I reckon the result is correct. The B matrix of 'x8' is [[1,0,0],[0,1,0],[0,0,1],[1,1,1],[1,1,0],[0,1,1]], so state 5 represents [0,1,1] case.

dynaryu commented 11 months ago

Great. Thanks.