gtopt::StorageIntegration struct

Parsed model_options.storage_integration value.

Public static functions

static auto is_block_name(std::string_view name) -> bool noexcept
static auto is_valid(std::string_view name) -> bool noexcept
True for the recognised option names (including "block" / "cc").
static auto parse(std::string_view name) -> StorageIntegration noexcept

Public functions

auto banded() const -> bool noexcept

Public variables

bool clip_negative
_pos: clip negative weights
int points
0 = block recursion; 2 = trapezoid; 4 / 6 = Lagrange

Function documentation

static bool gtopt::StorageIntegration::is_block_name(std::string_view name) noexcept

True for the block recursion's names: "block" and its Clenshaw– Curtis aliases "cc" / "clenshaw_curtis" (on a CC-weighted node grid).

static StorageIntegration gtopt::StorageIntegration::parse(std::string_view name) noexcept

Parse "block" (= "cc" = "clenshaw_curtis") | "trapezoid" | "lg4" | "lg6" | "lg4_pos" | "lg6_pos"; any other value yields the block recursion (the value is validated in validate_planning).