pub struct SqpAlgorithm { /* private fields */ }Expand description
SQP-side algorithm driver.
Implementations§
Source§impl SqpAlgorithm
impl SqpAlgorithm
pub fn new(qp_solver: ParametricActiveSetSolver, opts: SqpOptions) -> Self
Sourcepub fn with_qp_options(self, qp_opts: QpOptions) -> Self
pub fn with_qp_options(self, qp_opts: QpOptions) -> Self
Override the per-call QP-solver options. Defaults are the
pounce_qp::QpOptions::default() (which include the
use_schur_updates = false and anti_cycling = Expand
from Phase 5a.2). Callers can pin tighter tolerances or
flip use_schur_updates = true for warm-started workloads.
pub fn options(&self) -> &SqpOptions
pub fn iterates(&self) -> Option<&SqpIterates>
Sourcepub fn optimize<N: SqpProblemSpec>(
&mut self,
nlp: &mut N,
) -> Result<SqpResult, SqpError>
pub fn optimize<N: SqpProblemSpec>( &mut self, nlp: &mut N, ) -> Result<SqpResult, SqpError>
Run the SQP loop to convergence (or max_iter). Cold-starts
the iterate from nlp.x_init() and an empty working set.
Sourcepub fn optimize_with_warm_start<N: SqpProblemSpec>(
&mut self,
nlp: &mut N,
warm: Option<SqpIterates>,
) -> Result<SqpResult, SqpError>
pub fn optimize_with_warm_start<N: SqpProblemSpec>( &mut self, nlp: &mut N, warm: Option<SqpIterates>, ) -> Result<SqpResult, SqpError>
Warm-start variant. warm = Some(prev) seeds the iterate
from prev.{x, lambda_g, lambda_x, working} instead of the
NLP’s cold defaults. Dimensions are validated against the
problem; any mismatch is fatal. The QP solver consumes
warm.working (when present) via solve_with_working_set.
warm = None is equivalent to Self::optimize.
Implements the §6 design-note warm-start contract: the
tuple (x, λ_g, λ_x, 𝒲). The Hessian carry-forward
(damped-BFGS / L-BFGS state) is not part of the warm-start
payload — each optimize call rebuilds its own Hessian
approximation from scratch.
Auto Trait Implementations§
impl Freeze for SqpAlgorithm
impl !RefUnwindSafe for SqpAlgorithm
impl !Send for SqpAlgorithm
impl !Sync for SqpAlgorithm
impl Unpin for SqpAlgorithm
impl UnsafeUnpin for SqpAlgorithm
impl !UnwindSafe for SqpAlgorithm
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
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