PhaseStateInfo struct
#include <gtopt/sddp_types.hpp>
Per-phase SDDP state: a variable, outgoing links, forward-pass cost.
Per-state-variable trial values (consumed by cut building and next-phase propagation) live on StateVariable::col_sol(), populated by capture_state_variable_values after every forward solve.
Public variables
- Basis aperture_warm_basis
- Basis backward_basis
- size_t base_nrows
- Row count before any Benders cuts.
- double forward_agreement_rewards
- Basis forward_basis
- double forward_full_obj_physical
- double forward_future_cost
- bool forward_interior
- double forward_objective
- std::vector<StateVarLink> outgoing_links
- Links TO next phase.
- std::optional<SceneIndex> sampled_scene
Variable documentation
Basis gtopt:: PhaseStateInfo:: aperture_warm_basis
Cross-iteration warm-start seed: the simplex basis captured from this cell's FIRST backward aperture last iteration. Empty until first captured; only populated/consumed when aperture_seed_basis is on. One per (scene, phase) cell — O(cells) memory, not per-aperture.
Basis gtopt:: PhaseStateInfo:: backward_basis
Cross-pass warm-start seed: the simplex basis captured from this cell's BACKWARD-pass solve last iteration, reused to warm-start the next forward solve (BasisCrossMode::backward_to_forward/full_cross).
double gtopt:: PhaseStateInfo:: forward_agreement_rewards
Water-rights reward terms inside forward_objective (<= 0), from SystemLP::agreement_rewards_objective on the same solve.
Basis gtopt:: PhaseStateInfo:: forward_basis
Cross-pass warm-start seed: the simplex basis captured from this cell's FORWARD-pass solve last iteration, reused to warm-start the backward dual/aperture solve (BasisCrossMode::forward_to_backward/full_cross). Empty until first captured; only populated/consumed when basis_cross_mode requests forward→backward reuse. O(cells) memory.
double gtopt:: PhaseStateInfo:: forward_full_obj_physical
Full objective from last forward solve (including α), in physical ($) space — i.e. LinearInterface::get_obj_value(), not the scaled LP raw value. Cached here so the backward pass can call build_benders_cut_physical without re-querying the original LP.
double gtopt:: PhaseStateInfo:: forward_future_cost
Future-cost term of the last forward solve, in physical ($) space: Σ_r w_r · α_r over the cell's α / φ_j columns with the same weights the objective prices them at. On the LAST phase with boundary cuts this is the cell's Φ'(v_T) contribution (read by the boundary-cut gap diagnostics); recorded even when the UB does not strip it (phi_expectation).
bool gtopt:: PhaseStateInfo:: forward_interior
The cut data above come from an interior solve (barrier without crossover): cuts built from them get the interior intercept guard (guarded_cut_intercept).
double gtopt:: PhaseStateInfo:: forward_objective
Opex from last forward pass
std::optional<SceneIndex> gtopt:: PhaseStateInfo:: sampled_scene
Forward-sampling realization cache (ForwardSamplingMode::resampled): the scene whose scenario data is currently pinned onto this cell's forward-LP stochastic bounds — drawn by sample_forward_realization in the forward pass and re-applied by the backward pass's target re-solve so the cut is provably built from the SAME realization the forward pass simulated. nullopt under persistent (never written — byte-identical default path) and after the simulation pass restores the scene's own data.