Skip to main content

validate_path_navigability

Function validate_path_navigability 

Source
pub fn validate_path_navigability(
    segments: Vec<AssociatedNetElement>,
    _netelements: &[Netelement],
    netelement_index: &HashMap<String, usize>,
    graph: &DiGraph<NetelementSide, f64>,
    node_map: &HashMap<NetelementSide, NodeIndex>,
    cache: &mut ShortestPathCache,
) -> (Vec<AssociatedNetElement>, Vec<String>, Vec<SanityDecision>)
Expand description

Post-Viterbi navigability validation.

Walks the assembled path segments sequentially, checking each consecutive pair for topological reachability via the directed topology graph. When a segment is unreachable from its predecessor:

  1. The unreachable segment is removed.
  2. A Dijkstra re-route is attempted from the last valid segment to the next remaining segment. If a route exists, bridge NEs are inserted.
  3. A warning is recorded.

Returns the validated path segments, a list of warnings, and structured sanity decisions for debug output.