Skip to main content

condor_grid/algorithms/anya/
diagnostics.rs

1//! Inspect-mode expansion counters for the row-interval Anya candidate.
2//!
3//! These tallies exist only for [`super::Anya::inspect`]. They are not part of
4//! public [`crate::AnyAngleSearchStats`] and must not be compared to Theta*
5//! vertex-pop counts.
6
7/// Solver-local diagnostics for row-interval Anya (inspect path only).
8///
9/// Public search does not fill these counters; interval generation, dominance,
10/// and exact-supervisor replacement fields apply only to instrumented runs.
11#[derive(Debug, Clone, Copy, Default, PartialEq, Eq)]
12pub struct AnyaDiagnostics {
13    /// Interval states allocated in the arena.
14    pub generated: usize,
15    /// States inserted into the open heap.
16    pub pushed: usize,
17    /// Heap pops (including stale).
18    pub popped: usize,
19    /// Stale pops rejected by generation tracking.
20    pub stale: usize,
21    /// States fully expanded for successors.
22    pub expanded: usize,
23    /// Candidates discarded by dominance.
24    pub dominated: usize,
25    /// Flat-span interval states generated.
26    pub flat_states: usize,
27    /// Root-cone interval states generated.
28    pub cone_states: usize,
29    /// Successors produced from flat parents.
30    pub flat_successors: usize,
31    /// Successors produced from cone parents.
32    pub cone_successors: usize,
33    /// Row-interval split operations.
34    pub interval_splits: usize,
35    /// Row-interval merge operations.
36    pub interval_merges: usize,
37    /// Open-run projection attempts onto adjacent rows.
38    pub run_projections: usize,
39    /// Goal-connection candidates evaluated.
40    pub goal_candidates: usize,
41    /// Goal connections that improved the incumbent.
42    pub goal_improvements: usize,
43    /// Peak open-heap size.
44    pub heap_peak: usize,
45    /// Approximate arena storage bytes for interval states.
46    pub state_bytes: usize,
47    /// Approximate storage bytes for the row-run index.
48    pub run_index_bytes: usize,
49    /// Vertices in the resulting path (0 when no path).
50    pub path_points: usize,
51    /// Path segments checked under sampling LOS.
52    pub validation_segments: usize,
53    /// Exact visibility-graph supervisor queries issued for this search.
54    pub exact_supervisor_queries: usize,
55    /// Interval candidates replaced by the exact supervisor.
56    pub exact_supervisor_replacements: usize,
57}
58
59/// Instrumented Anya outcome: pathfinder result plus expansion diagnostics.
60#[derive(Debug, Clone, PartialEq)]
61pub struct AnyaInspection {
62    /// Standard any-angle found/no-path or invalid/budget result.
63    pub result: crate::any_angle::AnyAngleSearchResult,
64    /// Interval-candidate and supervisor tallies for this inspect run.
65    pub diagnostics: AnyaDiagnostics,
66}