Skip to main content

Module solve_report

Module solve_report 

Source
Expand description

Compatibility shim — the report writer now lives in pounce-solve-report so the GAMS solver link (via pounce-cinterface) can emit reports too. This re-export preserves all pounce_cli::solve_report::* call sites.

Modules§

console
Ipopt-style console printers (banner, problem statistics, end-of-run summary). The single source of truth for the text log: the algorithm’s output layer emits these gated on print_level, and the CLI reuses the banner. Moved out of pounce-cli so pounce-algorithm can emit them natively (#206). Ipopt-style banner / problem-stats / final-summary printing, shared by the pounce CLI (which re-exports this module as print) and the Python bindings (pounce.print_banner, Problem.print_problem_stats, Solver.print_summary). Output is structured to match upstream Ipopt’s console layout closely enough that anyone familiar with ipopt can spot at a glance whether POUNCE is converging similarly.

Structs§

EnvOverride
One solve-affecting environment variable and its value, as captured into FairMetadata::environment.
FairMetadata
FAIR-aligned provenance block. The four FAIR principles (Wilkinson et al., 2016) map onto fields here as:
LinearSolverSummaryInfo
Serializable mirror of pounce_linsol::summary::LinearSolverSummary. Lives in the CLI crate (rather than pounce-linsol) so the linsol trait crate stays serde-free. Field shape is identical; serde defaults keep it forward-compatible with future additions.
ProblemInfo
ReportBuilder
Builder collecting the inputs for a SolveReport. The CLI drivers populate one of these as they walk through the solve and finish() it at the end.
SolutionInfo
SolutionSuffix
SolveReport
Top-level report struct. Fields are ordered so the JSON has the most identifying / metadata fields first when pretty-printed.
SolverIdentity
StatisticsInfo
Subset of SolveStatistics projected for the report. Mirrors the fields the existing console summary prints.

Enums§

InputDescriptor
ReportDetail
Verbosity knob for the JSON report. Maps onto the --json-detail CLI flag.

Functions§

capture_solve_env_overrides
Snapshot the solve-affecting environment variables ([SOLVE_AFFECTING_ENV_VARS]) that are currently set, for FairMetadata::environment. Reads the process environment, so call it in the solving process. Returns them in the fixed list order; absent variables are simply skipped.
status_to_solve_result_num
AMPL-style solve_result_num per Gay 2005 (Hooking Your Solver to AMPL §5, p. 23 table): 0 = solved, 100s = warning, 200s = infeasible, 300s = unbounded, 400s = limit reached, 500s = failure. Shared by the CLI and cinterface report writers so both encode the same int codes into SolutionInfo::solve_result_num.
write_report_file
Write a SolveReport to path as pretty-printed JSON. Returns bytes written on success.