gtopt::IterationLP class

LP-side wrapper for an Iteration control entry.

Stores the Iteration definition and its position in the preallocated iteration vector. Default-constructed entries represent iterations with no explicit user override; they return should_update_lp() == true and has_explicit_update_lp() == false.

The SDDP solver preallocates a vector of IterationLP objects sized to iteration_offset + max_iterations and accesses them directly via IterationIndex, giving O(1) lookup.

Constructors, destructors, conversion operators

IterationLP() defaulted noexcept
IterationLP(Iteration iteration, IterationIndex iteration_index) explicit noexcept

Public functions

auto has_explicit_update_lp() const -> constexpr auto noexcept
auto index() const -> constexpr auto noexcept
auto iteration() const -> constexpr const auto& noexcept
auto should_update_lp() const -> constexpr auto noexcept

Function documentation

constexpr auto gtopt::IterationLP::has_explicit_update_lp() const noexcept

Returns Whether the user explicitly set update_lp for this iteration

constexpr auto gtopt::IterationLP::index() const noexcept

Returns The 0-based iteration index (the lookup key)

constexpr const auto& gtopt::IterationLP::iteration() const noexcept

Returns The underlying Iteration data

constexpr auto gtopt::IterationLP::should_update_lp() const noexcept

Returns Whether update_lp should be dispatched for this iteration