SolverStatusSnapshot struct
#include <gtopt/solver_status.hpp>
Snapshot of the solver's live convergence state.
Passed to write_solver_status() so the free function does not need access to the solver's atomic members or options struct.
Public variables
- int aperture_dropped_last_iteration
- std::int64_t aperture_failed
- std::int64_t aperture_infeasible
- Aperture LPs dropped as proven infeasible.
- std::int64_t aperture_solves
- Aperture LPs solved so far in this solve.
- double avg_lp_task_cpu_pct
- Average CPU % per LP task.
- double avg_lp_task_rss_delta_mb
- Average RSS delta (MB) per LP task.
- bool converged
- Whether the solver has converged.
- int converged_scenes
- Number of scenes that have individually converged.
- int current_pass
- 0=idle, 1=forward, 2=backward
- std::string final_status
- double gap
- Current relative convergence gap.
- IterationIndex iteration_index
- double lower_bound
- Current lower bound.
- size_t lp_tasks_dispatched
- Total LP tasks dispatched so far.
- int max_async_spread
- Configured maximum async spread (0 = synchronous).
- int max_iterations
- SDDPOptions::max_iterations.
- std::string method
- int min_iterations
- SDDPOptions::min_iterations.
- const PhaseGridRecorder* phase_grid
- Non-owning; null if no grid.
- double pool_available_memory_mb
- System available memory in MB at snapshot time.
- double pool_cpu_load
- Current CPU load at snapshot time.
- double pool_memory_percent
- System memory usage % at snapshot time.
- double pool_process_rss_mb
- Process RSS in MB at snapshot time.
- int pool_tasks_active
- WorkPool active tasks at snapshot time.
- int pool_tasks_pending
- WorkPool queue depth at snapshot time.
- std::vector<int> scene_iterations
- Per-scene current iteration index (empty in sync mode).
- std::vector<std::string> scene_states
- Per-scene state label: "training", "simulation", "done" (empty in sync).
- int scenes_done
- Scenes completed in current pass.
- std::string solver
- Solver identity ("name/version").
- int spread
- Current iteration spread (max - min across non-done scenes).
- double upper_bound
- Current upper bound.
Variable documentation
int gtopt:: SolverStatusSnapshot:: aperture_dropped_last_iteration
Distinct (scene, phase, aperture) triples dropped in the last recorded iteration.
std::int64_t gtopt:: SolverStatusSnapshot:: aperture_failed
Aperture LPs dropped for another non-optimal status (time limit, numerical abort, non-optimal).
std::string gtopt:: SolverStatusSnapshot:: final_status
Terminal status label written once the solve has ended ("converged", "max_iterations", "stopped", "error"). Empty while the solve is live: the label is then derived from converged / iteration_index ("initializing" / "running" / "converged"). A non-empty value also makes write_solver_status() the LAST write (the monitor's periodic refresh is disabled afterwards).
IterationIndex gtopt:: SolverStatusSnapshot:: iteration_index
Current iteration number. Strong-typed so the ~2 callers that populate it don't need static_cast<int>(IterationIndex) unwraps; the JSON serialiser (solver_status.cpp) renders it as an int via strong::formattable without any conversion.
std::string gtopt:: SolverStatusSnapshot:: method
Planning method ("sddp", "monolithic", …)