Expand description
POUNCE C ABI — port of Interfaces/IpStdCInterface.{h,cpp}.
Provides the CreateIpoptProblem / IpoptSolve / FreeIpoptProblem 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
Clear ⚠Warm Start Working Set - Drop any pending warm-start working set without solving. The
next
IpoptSolvewill cold-start. - Ipopt
Enable ⚠Iter History - Enable per-iteration history capture on the underlying
IpoptApplication. Must be called beforeIpoptSolvefor the trajectory to appear in the report written byIpoptWriteSolveReport. Off by default — capturing each iterate has a small per-iter cost the IPM core skips otherwise. - Ipopt
GetWorking ⚠Set - Retrieve the working set produced by the most recent SQP solve
(
algorithm = active-set-sqp). Buffer sizes arenforbound_status_outandmforcons_status_out. PassNULLfor either to skip that side. - Ipopt
SetWarm ⚠Start Working Set - Supply a warm-start working set consumed by the next
IpoptSolveon this problem. PassNULLfor either side to cold-start it. The caller-owned buffers are copied; reuse across calls is safe. - Ipopt
Solve ⚠ - Port of
IpStdCInterface.cpp:IpoptSolve. Returns theApplicationReturnStatusinteger. - Ipopt
Solve ⚠Warm Start - Convenience one-shot: equivalent to
IpoptSetWarmStartWorkingSet+IpoptSolve+IpoptGetWorkingSetin sequence. The input/output working-set buffers are independent (so a caller can read back the new working set into the same array used as input). PassNULLfor any in/out buffer to skip that side. - Ipopt
Write ⚠Solve Report - Write a
pounce.solve-report/v1JSON file capturing the most recentIpoptSolveresult.pathis a NUL-terminated UTF-8 filesystem path.detailis one of"summary"or"full"(NUL-terminated); passNULLfor the default ("summary"). - 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
Bound Status - C-ABI encoding of
pounce_qp::BoundStatus(§7.2 of the active-set-SQP design note). Stable values:0 = Inactive,1 = AtLower,2 = AtUpper,3 = Fixed. - Ipopt
Cons Status - C-ABI encoding of
pounce_qp::ConsStatus(§7.2). Stable values:0 = Inactive,1 = AtLower,2 = AtUpper,3 = Equality. - Ipopt
Problem - Number
- Mirrors C
Numbertypedef inIpStdCInterface.h.