Expand description
POUNCE C ABI — port of Interfaces/IpStdCInterface.{h,cpp}.
Provides the IpoptCreate / IpoptSolve / IpoptFreeProblem C entry
points that existing PyIpopt / cyipopt / JuMP wrappers link
against. Function names and signatures match upstream Ipopt 3.14.x
exactly so consumers can swap libipopt.{dylib,so} for
libpounce_cinterface without rebuilding.
Surface area (in IpStdCInterface.h order):
- Lifecycle:
CreateIpoptProblem,FreeIpoptProblem. - Options:
AddIpoptStrOption,AddIpoptNumOption,AddIpoptIntOption,OpenIpoptOutputFile,SetIpoptProblemScaling. - Callbacks:
SetIntermediateCallback. - Solve:
IpoptSolve. - Introspection (only valid inside an intermediate callback):
GetIpoptCurrentIterate,GetIpoptCurrentViolations. - Library info:
GetIpoptVersion.
Pounce extensions for post-solve stats (not present in upstream
Ipopt’s C API): GetIpoptIterCount, GetIpoptSolveTime,
GetIpoptPrimalInf, GetIpoptDualInf, GetIpoptComplInf.
All entry points are extern "C" and #[no_mangle]. Pointers are
raw and the caller is responsible for lifetime; the IpoptProblem
handle is opaque (*mut c_void from C’s perspective). The Fortran
77 ABI shim lives in fortran.
Modules§
- fortran
- Fortran 77 ABI shim — port of
Interfaces/IpStdFInterface.c. - solver
- Session-style C ABI built on
pounce_sensitivity::Solver.
Structs§
- Ipopt
Problem Info - Internal owned state behind the opaque
IpoptProblemhandle.#[repr(C)]is unnecessary because C only sees the pointer.
Functions§
- AddIpopt
IntOption ⚠ - Port of
AddIpoptIntOption. - AddIpopt
NumOption ⚠ - Port of
AddIpoptNumOption. - AddIpopt
StrOption ⚠ - Port of
IpStdCInterface.cpp:AddIpoptStrOption. - Create
Ipopt ⚠Problem - Port of
IpStdCInterface.cpp:CreateIpoptProblem. Returns NULL on invalid arguments (negative n/m, missing required callbacks, NULL bound pointers when the corresponding dimension is positive). - Free
Ipopt ⚠Problem - Port of
IpStdCInterface.cpp:FreeIpoptProblem. - GetIpopt
Compl ⚠Inf - Final complementarity error for the most recent solve.
- GetIpopt
Current ⚠Iterate - Port of
IpStdCInterface.cpp:GetIpoptCurrentIterate(Ipopt 3.14+). Designed to be called from inside an intermediate callback to inspectx, the bound multipliersz_L/z_U, the constraint valuesg, and the constraint multiplierslambdaat the current iterate. - GetIpopt
Current ⚠Violations - Port of
IpStdCInterface.cpp:GetIpoptCurrentViolations(Ipopt 3.14+). Same contract asGetIpoptCurrentIterate; returnsFALSEwhen called outside an active intermediate callback. - GetIpopt
Dual ⚠Inf - Final dual infeasibility (max gradient-of-Lagrangian norm) for the most recent solve.
- GetIpopt
Iter ⚠Count - Number of IPM iterations in the most recent solve, or
0if the problem has not been solved yet. - GetIpopt
Primal ⚠Inf - Final primal infeasibility (max constraint violation) for the most recent solve.
- GetIpopt
Solve ⚠Time - Wall-clock solve time in seconds for the most recent solve, or
0.0if the problem has not been solved yet. - GetIpopt
Version ⚠ - Port of
IpStdCInterface.cpp:GetIpoptVersion(Ipopt 3.14.18+). Writes the pounce crate’smajor.minor.patchinto the buffers. Any pointer may be NULL to skip that component. - Ipopt
Solve ⚠ - Port of
IpStdCInterface.cpp:IpoptSolve. Returns theApplicationReturnStatusinteger. - Open
Ipopt ⚠Output File - Port of
IpStdCInterface.cpp:OpenIpoptOutputFile. Opensfile_nameatprint_leveland attaches a journalistFileJournalso all solver output is mirrored to disk. Equivalent to settingoutput_file+file_print_leveloptions and triggeringIpoptApplication::Initialize. - SetIntermediate
Callback ⚠ - Port of
SetIntermediateCallback. - SetIpopt
Problem ⚠Scaling - Port of
IpStdCInterface.cpp:SetIpoptProblemScaling. Stores user-provided NLP scaling on the problem; the scaling is forwarded to the solver viaTNLP::get_scaling_parameterswhen the optionnlp_scaling_method=user-scalingis set. Passing NULL forx_scaling/g_scalingdisables scaling on that axis.
Type Aliases§
- Bool
- Mirrors C
Bool. - Eval_
F_ CB - Eval_
G_ CB - Eval_
Grad_ F_ CB - Eval_
H_ CB - Eval_
Jac_ G_ CB - Index
- Mirrors C
Index. - Intermediate_
CB - Ipopt
Problem - Number
- Mirrors C
Numbertypedef inIpStdCInterface.h.