pub struct PdSearchDirCalc {
pub fast_step_computation: bool,
pub mehrotra_algorithm: bool,
/* private fields */
}Fields§
§fast_step_computation: boolSkip the residual check on the search direction. Mirrors
fast_step_computation (default false).
mehrotra_algorithm: boolMehrotra-style predictor-corrector step. Mirrors
mehrotra_algorithm (default false in v1.0; flipped on by
the adaptive-mu wiring in Phase 10).
Implementations§
Source§impl PdSearchDirCalc
impl PdSearchDirCalc
pub fn new(pd_solver: PdFullSpaceSolver) -> Self
Sourcepub fn pd_solver_rc(&self) -> Rc<RefCell<PdFullSpaceSolver>>
pub fn pd_solver_rc(&self) -> Rc<RefCell<PdFullSpaceSolver>>
Clone the shared handle to the PD solver. Used by the post-converged sensitivity callback to retain a factor handle past the IPM call.
Sourcepub fn pd_solver_mut(&self) -> RefMut<'_, PdFullSpaceSolver>
pub fn pd_solver_mut(&self) -> RefMut<'_, PdFullSpaceSolver>
Borrow the PD solver mutably. Caller is responsible for not holding two mutable borrows at once (single-thread, single- borrow access pattern — matches every existing call site).
Sourcepub fn compute_search_direction(
&mut self,
data: &IpoptDataHandle,
cq: &IpoptCqHandle,
nlp: &Rc<RefCell<dyn IpoptNlp>>,
) -> bool
pub fn compute_search_direction( &mut self, data: &IpoptDataHandle, cq: &IpoptCqHandle, nlp: &Rc<RefCell<dyn IpoptNlp>>, ) -> bool
Compute the search direction and write it back into
data.delta. Returns false if the underlying linear solve
fails. Mirrors PDSearchDirCalculator::ComputeSearchDirection.
Sourcepub fn compute_affine_step(
&mut self,
data: &IpoptDataHandle,
cq: &IpoptCqHandle,
nlp: &Rc<RefCell<dyn IpoptNlp>>,
) -> bool
pub fn compute_affine_step( &mut self, data: &IpoptDataHandle, cq: &IpoptCqHandle, nlp: &Rc<RefCell<dyn IpoptNlp>>, ) -> bool
Affine (predictor) step — port of upstream’s
IpAdaptiveMuUpdate::ComputeMuMehrotra predictor solve. Builds
the same RHS as Self::compute_search_direction except the
z-blocks use the unrelaxed complementarity s · z
(μ-target = 0) so the resulting step targets the affine-scaling
system. The solution is stored in data.delta_aff for
consumption by the Probing / Quality-Function oracles.
Returns false if the linear solve fails.
Sourcepub fn compute_centering_step(
&mut self,
data: &IpoptDataHandle,
cq: &IpoptCqHandle,
nlp: &Rc<RefCell<dyn IpoptNlp>>,
) -> bool
pub fn compute_centering_step( &mut self, data: &IpoptDataHandle, cq: &IpoptCqHandle, nlp: &Rc<RefCell<dyn IpoptNlp>>, ) -> bool
Pure centering step — port of upstream
IpQualityFunctionMuOracle.cpp::CalculateMu lines 218-247. RHS
is (0, 0, 0, 0, μ̄·1, μ̄·1, μ̄·1, μ̄·1) with μ̄ = curr_avrg_compl.
Solution stored on data.delta_cen for the quality-function
oracle’s σ-bracket search.
Returns false if the linear solve fails.
Sourcepub fn compute_soc_step(
&mut self,
data: &IpoptDataHandle,
cq: &IpoptCqHandle,
nlp: &Rc<RefCell<dyn IpoptNlp>>,
c_soc: &dyn Vector,
dms_soc: &dyn Vector,
alpha_primal_soc: Number,
soc_method: i32,
) -> Option<IteratesVector>
pub fn compute_soc_step( &mut self, data: &IpoptDataHandle, cq: &IpoptCqHandle, nlp: &Rc<RefCell<dyn IpoptNlp>>, c_soc: &dyn Vector, dms_soc: &dyn Vector, alpha_primal_soc: Number, soc_method: i32, ) -> Option<IteratesVector>
Solve the second-order-correction (SOC) linear system used by
the filter line search to recover full-step acceptability when
the Newton step grows the constraint violation. Mirrors the RHS
assembly + pd_solver_->Solve(-1.0, 0.0, ...) block in upstream
IpFilterLSAcceptor.cpp:577-608.
The caller supplies the SOC right-hand sides for the equality and
inequality blocks (c_soc, dms_soc); this method assembles the
remaining six blocks using the current iterate’s KKT residuals
and returns the resulting delta_soc. soc_method = 0 matches
upstream’s default (gradient blocks unscaled); soc_method = 1
scales the gradient blocks by alpha_primal_soc to reuse a
previously-tried correction.
Trait Implementations§
Source§impl SearchDirCalculator for PdSearchDirCalc
impl SearchDirCalculator for PdSearchDirCalc
Source§fn computed_normal_step(&self) -> bool
fn computed_normal_step(&self) -> bool
IpoptData carries delta/delta_aff.Auto Trait Implementations§
impl Freeze for PdSearchDirCalc
impl !RefUnwindSafe for PdSearchDirCalc
impl !Send for PdSearchDirCalc
impl !Sync for PdSearchDirCalc
impl Unpin for PdSearchDirCalc
impl UnsafeUnpin for PdSearchDirCalc
impl !UnwindSafe for PdSearchDirCalc
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> 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