Skip to main content

AugSystemSolver

Trait AugSystemSolver 

Source
pub trait AugSystemSolver {
    // Required methods
    fn provides_inertia(&self) -> bool;
    fn number_of_neg_evals(&self) -> Index;
    fn increase_quality(&mut self) -> bool;
    fn last_solve_status(&self) -> ESymSolverStatus;
    fn solve(
        &mut self,
        coeffs: &AugSysCoeffs<'_>,
        rhs: &AugSysRhs<'_>,
        sol: &mut AugSysSol<'_>,
        check_neg_evals: bool,
        num_neg_evals: Index,
    ) -> ESymSolverStatus;

    // Provided methods
    fn set_timing_stats(&mut self, _timing: Rc<TimingStatistics>) { ... }
    fn set_diagnostics(&mut self, _diag: Rc<DiagnosticsState>) { ... }
    fn resolve(
        &mut self,
        coeffs: &AugSysCoeffs<'_>,
        rhs: &AugSysRhs<'_>,
        sol: &mut AugSysSol<'_>,
    ) -> ESymSolverStatus { ... }
    fn multi_solve(
        &mut self,
        coeffs: &AugSysCoeffs<'_>,
        rhs_list: &[&AugSysRhs<'_>],
        sol_list: &mut [&mut AugSysSol<'_>],
        check_neg_evals: bool,
        num_neg_evals: Index,
    ) -> ESymSolverStatus { ... }
}
Expand description

Trait surface mirroring Ipopt::AugSystemSolver.

Required Methods§

Source

fn provides_inertia(&self) -> bool

Whether the underlying linear solver reports inertia.

Source

fn number_of_neg_evals(&self) -> Index

Number of negative eigenvalues observed in the most recent factorization. Caller checks provides_inertia() first.

Source

fn increase_quality(&mut self) -> bool

Ask the underlying solver for higher-quality pivoting.

Source

fn last_solve_status(&self) -> ESymSolverStatus

Status of the most recent solve call.

Source

fn solve( &mut self, coeffs: &AugSysCoeffs<'_>, rhs: &AugSysRhs<'_>, sol: &mut AugSysSol<'_>, check_neg_evals: bool, num_neg_evals: Index, ) -> ESymSolverStatus

One factor + back-substitution for the full 4×4 block system. check_neg_evals=true asks the linsol to verify that the observed inertia equals num_neg_evals; on mismatch the status is WrongInertia and the solution is left untouched.

Provided Methods§

Source

fn set_timing_stats(&mut self, _timing: Rc<TimingStatistics>)

Install the shared per-solve TimingStatistics so the linear-system factor/back-solve calls are attributed to linear_system_factorization / linear_system_back_solve. Default impl is a no-op (timing disabled); the standard solver overrides to record both fields, and composite solvers (LowRank) forward to their inner solver.

Source

fn set_diagnostics(&mut self, _diag: Rc<DiagnosticsState>)

Install the shared per-solve diagnostics state so KKT-dump sites can consult per-iter gating. Default impl is a no-op (diagnostics disabled); the standard solver overrides to wire in the dump path.

Source

fn resolve( &mut self, coeffs: &AugSysCoeffs<'_>, rhs: &AugSysRhs<'_>, sol: &mut AugSysSol<'_>, ) -> ESymSolverStatus

Back-substitution only, reusing the factorization from the most recent successful solve. Caller must guarantee the augmented matrix is byte-identical to that solve (same W, J_c, J_d, all diagonals, all perturbations, same pivot tolerance). Used by PdFullSpaceSolver’s iterative-refinement loop and same-matrix fast path to avoid the per-iter MA57BD refactor that dominates pounce-ma57 wall time on long-iter problems (e.g. cont5_2_4_l drops from 97s → ~30s once refactor-per-refinement is gone).

Default impl falls through to solve (correct but slow); StdAugSystemSolver overrides to skip refill_values and pass new_matrix=false to the linear solver.

Source

fn multi_solve( &mut self, coeffs: &AugSysCoeffs<'_>, rhs_list: &[&AugSysRhs<'_>], sol_list: &mut [&mut AugSysSol<'_>], check_neg_evals: bool, num_neg_evals: Index, ) -> ESymSolverStatus

Solve the same KKT system for nrhs right-hand sides. Default impl loops [solve]; concrete backends override only when they can amortize factorization across calls. Mirrors upstream’s AugSystemSolver::MultiSolve (IpAugSystemSolver.hpp:113-150).

rhs_list and sol_list must have the same length; each pair describes one independent solve. The same coeffs are used for every column.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§