pounce-nlp
NLP-side glue for POUNCE. Port of Ipopt's src/Interfaces/. This is
the crate Rust users implement against when writing custom NLP
problems.
What's in it
- The user-facing
TNLPtrait for problem definition (port ofIpTNLP.{hpp,cpp}). - Return-code enums
ApplicationReturnStatusandAlgorithmMode(port ofIpReturnCodes_inc.h). SolverReturn(algorithm-side, port ofIpAlgTypes.hpp).SolveStatisticsper-solve counters.TNLPAdapterandOrigIpoptNlp, the bound/constraint splitter chain that feeds the algorithm-side IPM.
The user-facing IpoptApplication lives in
pounce-algorithm (optimize_tnlp orchestrates
the algorithm), so pounce-nlp itself stays free of algorithm-side
imports. Wire-up direction is pounce-algorithm → pounce-nlp.
Implementing a TNLP
The required methods describe the problem; defaults supply the "do-nothing" behaviour for everything else. A minimal solver call:
use RefCell;
use Rc;
use IpoptApplication;
use ;
use Number;
/// min (x[0]-3)^2 + (x[1]-4)^2, unconstrained. Optimum (3, 4).
;
let mut app = new;
app.initialize.unwrap;
let status = app.optimize_tnlp;
assert_eq!; // Solve_Succeeded
A second built-in example (rosenbrock) ships in
pounce-cli's builtin module.
Sparsity convention
SparsityRequest carries either an (irow, jcol) structure call or a
vals values call. POUNCE accepts both 0-based (IndexStyle::C) and
1-based (IndexStyle::Fortran) triplets — same as upstream.
License
EPL-2.0.