branch
Class
- class Branch
Branch class for the BRC algorithm.
- Parameters:
down (dict) – Given a branch, the lower bound on component states.
up (dict) – The upper bound on component states.
down_state (str of either 's' for survival, 'f' for failure, and 'u' for unknown.) – The system state corresponding to
down
.up_state (str of either 's', 'f', and 'u'.) – The system state corresponding to
up
.p (float) – The probability of the branch.
Methods
- Branch.get_compat_rules(self, rules)
Get the compatible rules for the branch.
- param rules:
Dictionary of rules.
- type rules:
Dict with keys ‘s’ and ‘f’, each with a list of survival and failure rules, respectively.
- return:
Compatible rules.
- rtype:
Dict with keys ‘s’ and ‘f’, each with a list of survival and failure rules, respectively.
- get_cmat(branches, comp_varis)
Get the event matrix corresponding to the branches.
- param branches:
List of branches.
- type branches:
list of Branch
- param comp_varis:
List of component variables.
- type comp_varis:
list of Variable
- return:
Event matrix.
- rtype:
2D np.array
- get_crow(br1, comp_varis)
Get the row of the event matrix corresponding to a branch.
- param br1:
Branch.
- type br1:
Branch
- param comp_varis:
List of component variables.
- type comp_varis:
list of Variable
- return:
Row of the event matrix.
- rtype:
1D np.array