pub struct SolverDebugger { /* private fields */ }Implementations§
Source§impl SolverDebugger
impl SolverDebugger
Sourcepub fn new(mode: DebugMode, reg: Option<Rc<RegisteredOptions>>) -> Self
pub fn new(mode: DebugMode, reg: Option<Rc<RegisteredOptions>>) -> Self
Fully interactive: pause at the first iteration and at the terminal checkpoint.
Sourcepub fn with_script(self, path: String) -> Self
pub fn with_script(self, path: String) -> Self
Queue a debugger script to run once at the first pause.
Sourcepub fn set_equation_book(&mut self, book: EquationBook)
pub fn set_equation_book(&mut self, book: EquationBook)
Attach the source model’s rendered constraint equations, enabling
print equation <name|row>. Wired in on the .nl entry path
(see Lee et al. 2024, https://doi.org/10.69997/sct.147875).
Sourcepub fn set_structure_book(&mut self, book: StructureBook)
pub fn set_structure_book(&mut self, book: StructureBook)
Attach the source model’s structural rank analysis, enabling the
diagnose command’s structural_singularity finding (named
dependent equations). Wired in on the .nl entry path alongside
the equation book. See Lee et al. (2024,
https://doi.org/10.69997/sct.147875).
Sourcepub fn with_restart(self, cell: RestartCell) -> Self
pub fn with_restart(self, cell: RestartCell) -> Self
Enable the resolve command, wiring the shared restart slot the
CLI’s re-solve loop reads.
Sourcepub fn on_error(mode: DebugMode, reg: Option<Rc<RegisteredOptions>>) -> Self
pub fn on_error(mode: DebugMode, reg: Option<Rc<RegisteredOptions>>) -> Self
Post-mortem: run freely, then drop in at the terminal checkpoint
only if the solve did not succeed (--debug-on-error).
Sourcepub fn on_interrupt(mode: DebugMode, reg: Option<Rc<RegisteredOptions>>) -> Self
pub fn on_interrupt(mode: DebugMode, reg: Option<Rc<RegisteredOptions>>) -> Self
Attach-on-demand: run normally and only drop in when the user
presses Ctrl-C (--debug-on-interrupt). No automatic iter or
terminal pauses.
Sourcepub fn staged_options(&self) -> &[(String, String)]
pub fn staged_options(&self) -> &[(String, String)]
Option edits accepted at the prompt (validated). The caller may re-run the solve with these applied.
Trait Implementations§
Source§impl DebugHook for SolverDebugger
impl DebugHook for SolverDebugger
Source§fn wants_kkt_capture(&self) -> bool
fn wants_kkt_capture(&self) -> bool
Capture the heavy KKT matrix / LDLᵀ factor only while attached:
once detached the debugger runs free and won’t viz, so there’s
no reason to pay the O(nnz) assembly every iteration.
Source§fn at_checkpoint(&mut self, ctx: &mut DebugCtx) -> DebugAction
fn at_checkpoint(&mut self, ctx: &mut DebugCtx) -> DebugAction
Checkpoint. Inspect and/or mutate via ctx,
then return whether to keep solving.Auto Trait Implementations§
impl !RefUnwindSafe for SolverDebugger
impl !Send for SolverDebugger
impl !Sync for SolverDebugger
impl !UnwindSafe for SolverDebugger
impl Freeze for SolverDebugger
impl Unpin for SolverDebugger
impl UnsafeUnpin for SolverDebugger
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
impl<T, U> Imply<T> for U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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