Skip to main content

Crate pounce_cinterface

Crate pounce_cinterface 

Source
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):

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§

IpoptProblemInfo
Internal owned state behind the opaque IpoptProblem handle. #[repr(C)] is unnecessary because C only sees the pointer.

Functions§

AddIpoptIntOption
Port of AddIpoptIntOption.
AddIpoptNumOption
Port of AddIpoptNumOption.
AddIpoptStrOption
Port of IpStdCInterface.cpp:AddIpoptStrOption.
CreateIpoptProblem
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).
FreeIpoptProblem
Port of IpStdCInterface.cpp:FreeIpoptProblem.
GetIpoptComplInf
Final complementarity error for the most recent solve.
GetIpoptCurrentIterate
Port of IpStdCInterface.cpp:GetIpoptCurrentIterate (Ipopt 3.14+). Designed to be called from inside an intermediate callback to inspect x, the bound multipliers z_L/z_U, the constraint values g, and the constraint multipliers lambda at the current iterate.
GetIpoptCurrentViolations
Port of IpStdCInterface.cpp:GetIpoptCurrentViolations (Ipopt 3.14+). Same contract as GetIpoptCurrentIterate; returns FALSE when called outside an active intermediate callback.
GetIpoptDualInf
Final dual infeasibility (max gradient-of-Lagrangian norm) for the most recent solve.
GetIpoptIterCount
Number of IPM iterations in the most recent solve, or 0 if the problem has not been solved yet.
GetIpoptPrimalInf
Final primal infeasibility (max constraint violation) for the most recent solve.
GetIpoptSolveTime
Wall-clock solve time in seconds for the most recent solve, or 0.0 if the problem has not been solved yet.
GetIpoptVersion
Port of IpStdCInterface.cpp:GetIpoptVersion (Ipopt 3.14.18+). Writes the pounce crate’s major.minor.patch into the buffers. Any pointer may be NULL to skip that component.
IpoptSolve
Port of IpStdCInterface.cpp:IpoptSolve. Returns the ApplicationReturnStatus integer.
OpenIpoptOutputFile
Port of IpStdCInterface.cpp:OpenIpoptOutputFile. Opens file_name at print_level and attaches a journalist FileJournal so all solver output is mirrored to disk. Equivalent to setting output_file + file_print_level options and triggering IpoptApplication::Initialize.
SetIntermediateCallback
Port of SetIntermediateCallback.
SetIpoptProblemScaling
Port of IpStdCInterface.cpp:SetIpoptProblemScaling. Stores user-provided NLP scaling on the problem; the scaling is forwarded to the solver via TNLP::get_scaling_parameters when the option nlp_scaling_method=user-scaling is set. Passing NULL for x_scaling / g_scaling disables 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
IpoptProblem
Number
Mirrors C Number typedef in IpStdCInterface.h.