gtopt::SDDPMethod::LiveMetrics struct

Aggregate per-iteration metrics exposed via the live-query API.

Replaces five separate std::atomic<T> members with a single std::atomic<std::shared_ptr<LiveMetrics>> snapshot pointer so that cross-thread readers always observe a coherent set of (iteration, gap, lower_bound, upper_bound, converged) — no torn reads where iteration is from step N and gap is from step N+1.

The writer (the main SDDP iteration thread) allocates a fresh std::shared_ptr<LiveMetrics> at the end of each iteration and publishes it with std::memory_order_release; readers acquire via std::memory_order_acquire. Allocation rate is a few per second — negligible compared to the solve itself.

Public variables

bool converged
double gap
IterationIndex iteration
double lower_bound
double upper_bound