Expand description
Orchestrates a single case → output directory.
Given a parsed BalancedNetwork, builds the requested matrix family, writes
.mtx files, and emits a meta.json sidecar describing what was
produced. Used by both the batch CLI subcommand and the TUI’s
batch export screen.
Structs§
Enums§
- Matrix
Kind - RhsKind
- How to populate the RHS vector(s) emitted alongside each matrix.
Functions§
- build_
kind - Build the square matrix for one
MatrixKindfrom an indexed network. The single dispatch shared by thePipeline, theverifyCLI command, and the TUI inspect screen, so theYbusB = -Im(Y_bus)sign lives in one place. - matrix_
stats_ for_ kind - sanitize_
stem - Reduces a network name to a single safe filename stem. The name comes from
input content, so an unsanitized value like
../../etc/xor/abs/xused inout_dir.join(...)would write outsideout_dir. Keeps ASCII alphanumerics,-,_, and.; every other character (path separators included) becomes_. Leading dots are stripped so the result is never.,.., or a hidden file; trailing dots are trimmed and Windows reserved device names get a leading_, both invalid as Windows filenames; the length is capped at 120 bytes; and an empty result falls back tocase. - zero_
impedance_ rule_ for_ kind - zero_
impedance_ skips_ for_ kind