gtopt::MarkovChainConfig struct

Configuration for CutSharingMode::markov (Markov-chain SDDP, opt-in / experimental — docs/formulation/sddp-markov.md).

Each scene s is statically assigned a Markov state state_of_scene[s] ∈ [0, num_states); transition is the row-major num_states × num_states row-stochastic matrix P. Every non-terminal scene-LP then carries num_states future-cost columns varphi_0..M-1 (uid = sddp_alpha_uid + m), scene-S's backward cut lands on varphi_{m(S)} in every scene-LP, and varphi_{m'} is priced w_{s,m'} = p_s·P[m(s)][m'] / pi_{m'} where pi_{m'} is the state's total scene-probability mass (theorem MK1). Validate with validate_markov_config before use.

Public functions

auto empty() const -> bool noexcept
True when no Markov configuration was supplied.
auto probability(std::size_t from, std::size_t to) const -> double noexcept
auto state_of(SceneIndex scene_index) const -> std::size_t noexcept

Public variables

std::size_t num_states
Number of Markov states M (the transition matrix dimension).
std::vector<int> state_of_scene
std::vector<double> transition

Function documentation

double gtopt::MarkovChainConfig::probability(std::size_t from, std::size_t to) const noexcept

Transition probability P[from][to] (callers go through validate_markov_config first; the assert catches the one that forgets).

std::size_t gtopt::MarkovChainConfig::state_of(SceneIndex scene_index) const noexcept

Markov state m(s) of the given scene (callers go through validate_markov_config first). Absorbs the double-cast chain at the α-routing call sites.

Variable documentation

std::vector<int> gtopt::MarkovChainConfig::state_of_scene

Scene → Markov-state assignment (size = number of scenes, each value in [0, num_states)). Static per scene (v1).

std::vector<double> gtopt::MarkovChainConfig::transition

Row-major num_states × num_states row-stochastic transition matrix P (rows sum to ≈ 1, entries ≥ 0).