IterationLP class
#include <gtopt/iteration_lp.hpp>
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 -> auto noexcept
- auto index() const -> auto noexcept
- auto iteration() const -> const auto& noexcept
- auto should_update_lp() const -> auto noexcept
Function documentation
auto gtopt:: IterationLP:: has_explicit_update_lp() const noexcept
| Returns | Whether the user explicitly set update_lp for this iteration |
|---|
auto gtopt:: IterationLP:: index() const noexcept
| Returns | The 0-based iteration index (the lookup key) |
|---|
const auto& gtopt:: IterationLP:: iteration() const noexcept
| Returns | The underlying Iteration data |
|---|
auto gtopt:: IterationLP:: should_update_lp() const noexcept
| Returns | Whether update_lp should be dispatched for this iteration |
|---|