pounce_algorithm/strategy.rs
1//! Algorithm-strategy base trait — port of `IpAlgStrategy.hpp`.
2//!
3//! Every strategy object (line search, mu update, conv check, etc.)
4//! implements this so `IpoptAlgorithm` can call `initialize` on it
5//! after option-loading and before iteration.
6
7use pounce_common::exception::SolverException;
8use pounce_common::journalist::Journalist;
9use pounce_common::options_list::OptionsList;
10use std::rc::Rc;
11
12/// Ports `Ipopt::AlgorithmStrategyObject`. The `_jnlst` etc. arguments
13/// match the upstream signature; concrete strategies pull what they
14/// need from the four shared handles.
15pub trait AlgorithmStrategy {
16 fn initialize(
17 &mut self,
18 jnlst: &Rc<Journalist>,
19 options: &OptionsList,
20 prefix: &str,
21 ) -> Result<(), SolverException>;
22}