pub struct ComponentFailureTree {
pub root: FailureNode,
pub minimal_cuts: Vec<Vec<usize>>,
pub num_edges: usize,
pub num_nodes: usize,
}Expand description
Ball-tree style structure for enumerating component failure modes.
Builds a tree where each level introduces one additional edge failure. The tree branches at each node for each remaining edge that could fail. This is useful for computing minimal cuts and identifying the most likely failure scenarios.
Fields§
§root: FailureNodeRoot of the failure tree.
minimal_cuts: Vec<Vec<usize>>All minimal cuts found during tree construction.
num_edges: usizeNumber of edges.
num_nodes: usizeNumber of nodes.
Implementations§
Source§impl ComponentFailureTree
impl ComponentFailureTree
Sourcepub fn build(adj: &Array2<f64>, max_depth: usize) -> Result<Self>
pub fn build(adj: &Array2<f64>, max_depth: usize) -> Result<Self>
Build the component failure tree for a network up to max_depth edge failures.
§Arguments
adj— weighted adjacency matrix.max_depth— maximum number of simultaneous edge failures to consider.
max_depth should be kept small (≤ 5) for efficiency.
Sourcepub fn minimal_cuts(&self) -> &[Vec<usize>]
pub fn minimal_cuts(&self) -> &[Vec<usize>]
Return all minimal cuts found during tree construction.
Sourcepub fn unreliability_upper_bound(&self) -> f64
pub fn unreliability_upper_bound(&self) -> f64
Compute total probability of disconnection up to max_depth failures.
This sums probabilities of all failure sets that are cuts, but avoids double-counting by only summing minimal cuts’ exact set probabilities.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ComponentFailureTree
impl RefUnwindSafe for ComponentFailureTree
impl Send for ComponentFailureTree
impl Sync for ComponentFailureTree
impl Unpin for ComponentFailureTree
impl UnsafeUnpin for ComponentFailureTree
impl UnwindSafe for ComponentFailureTree
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more