gtopt::ReserveProvisionLP class

Base classes

template<typename ObjectType>
class ObjectLP<ReserveProvision>
Wrapper class that adds LP capabilities to objects.

Public types

struct Provision
struct ResponseCaps
Native BESS per-side caps of one block [MW] (nullopt = uncapped).
using Base = ObjectLP<ReserveProvision>
using Element = ReserveProvision
using object_type = ReserveProvision
Type of the wrapped object.

Public static variables

static std::string_view CommitUpProvisionName
static std::string_view DcapacityName
static std::string_view DnActivationCostName
static std::string_view DnDegradationCostName
static std::string_view DnName
static std::string_view DnPartloadCostName
static std::string_view DprovisionName
static std::string_view MinDnProvisionName
static std::string_view MinUpProvisionName
static std::string_view OfflineUpProvisionName
static std::string_view SymmetryName
Symmetry row r_up − r_dn = 0 (symmetric: true).
static std::string_view UcapacityName
static std::string_view UpActivationCostName
static std::string_view UpDegradationCostName
static std::string_view UpName
static std::string_view UpPartloadCostName
SSCC known variable-cost output streams [$/h] (<dir>_<term>_cost).
static std::string_view UprovisionName

Constructors, destructors, conversion operators

ReserveProvisionLP(const ReserveProvision& preserve_provision, const InputContext& ic) explicit

Public functions

auto add_to_lp(const SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, LinearProblem& lp) -> bool
auto add_to_output(OutputContext& out) const -> bool
auto class_name(this const Self& self) -> auto noexcept
auto energy_usage(bool upward, StageUid suid, BlockUid buid) const -> std::optional<double>
auto generator_sid() const -> auto noexcept
auto has_energy_usage() const -> bool noexcept
auto has_response_caps(bool upward) const -> bool noexcept
True when any per-side cap schedule is set for the direction.
auto id() const -> auto noexcept
auto is_active(const StageLP& stage) const -> bool
Checks if object is active in given stage.
auto lookup_dn_provision_col(const ScenarioLP& scenario, const StageLP& stage, BlockUid buid) const -> std::optional<ColIndex> noexcept
auto lookup_dn_provision_row(const ScenarioLP& scenario, const StageLP& stage, BlockUid buid) const -> std::optional<RowIndex> noexcept
Look up the down-provision row for (scenario, stage, block).
auto lookup_up_provision_col(const ScenarioLP& scenario, const StageLP& stage, BlockUid buid) const -> std::optional<ColIndex> noexcept
auto lookup_up_provision_row(const ScenarioLP& scenario, const StageLP& stage, BlockUid buid) const -> std::optional<RowIndex> noexcept
Look up the up-provision row for (scenario, stage, block).
auto object() && -> ReserveProvision&& noexcept
auto object() & -> ReserveProvision& noexcept
Gets the wrapped object.
auto object() const && -> const ReserveProvision&& noexcept
auto object() const & -> const ReserveProvision& noexcept
auto offline() const -> bool noexcept
Offline (cold) up reserve, gated r_up ≤ urmax·(1 − u).
auto reserve_provision(this auto&& self) -> auto&& noexcept
auto response_caps(bool upward, StageUid suid, BlockUid buid) const -> ResponseCaps
auto set_id(Uid uid, Name name) -> auto& noexcept
Sets the object's identifier.
auto shared_headroom() const -> bool noexcept
Shared-headroom provision (minuta (A.23)–(A.24)).
auto short_name(this const Self& self) -> auto noexcept
auto sv_key(this const Self& self, const ScenarioLP& scenario, const StageLP& stage, std::string_view col_name) -> auto noexcept
Generates a state variable key for the object.
auto sv_key(this const Self& self, const StageLP& stage, std::string_view col_name) -> auto noexcept
auto symmetric() const -> bool noexcept
Symmetric provision r_up = r_dn (minuta (A.13)).
auto uid() const -> auto noexcept

Typedef documentation

using gtopt::ReserveProvisionLP::Element = ReserveProvision

Alias for the wrapped data-struct type. Lets generic code reach the canonical LPClassName constant via T::Element::class_name where T is any LP wrapper inheriting from ObjectLP. Single source of truth for the class-name constant lives on the data struct (Bus::class_name, Reservoir::class_name, …); the LP wrappers no longer carry a duplicate ClassName member.

using gtopt::ReserveProvisionLP::object_type = ReserveProvision

Type of the wrapped object.

Function documentation

auto gtopt::ReserveProvisionLP::class_name(this const Self& self) noexcept

std::optional<double> gtopt::ReserveProvisionLP::energy_usage(bool upward, StageUid suid, BlockUid buid) const

Provision-level deployment energy [MWh/MW/h] (nullopt = use the battery default).

auto gtopt::ReserveProvisionLP::id() const noexcept

Returns The object's complete identifier (uid + name)

bool gtopt::ReserveProvisionLP::is_active(const StageLP& stage) const

Checks if object is active in given stage.

Parameters
stage The stage to check
Returns true if active in stage, false otherwise

std::optional<ColIndex> gtopt::ReserveProvisionLP::lookup_dn_provision_col(const ScenarioLP& scenario, const StageLP& stage, BlockUid buid) const noexcept

Look up the down-provision column for (scenario, stage, block). Returns std::nullopt when the column has not been created yet.

std::optional<ColIndex> gtopt::ReserveProvisionLP::lookup_up_provision_col(const ScenarioLP& scenario, const StageLP& stage, BlockUid buid) const noexcept

Look up the up-provision column for (scenario, stage, block). Returns std::nullopt when the column has not been created yet (e.g. reserve is inactive or not configured for this period).

ReserveProvision&& gtopt::ReserveProvisionLP::object() && noexcept

ReserveProvision& gtopt::ReserveProvisionLP::object() & noexcept

Gets the wrapped object.

Returns Reference to the wrapped object

const ReserveProvision&& gtopt::ReserveProvisionLP::object() const && noexcept

const ReserveProvision& gtopt::ReserveProvisionLP::object() const & noexcept

ResponseCaps gtopt::ReserveProvisionLP::response_caps(bool upward, StageUid suid, BlockUid buid) const

Per-side response caps (urmax_response / urmax_charge_response or the down analogues) for (stage, block).

auto& gtopt::ReserveProvisionLP::set_id(Uid uid, Name name) noexcept

Sets the object's identifier.

Parameters
uid Unique identifier
name Human-readable name
Returns Reference to self for chaining

auto gtopt::ReserveProvisionLP::short_name(this const Self& self) noexcept

auto gtopt::ReserveProvisionLP::sv_key(this const Self& self, const ScenarioLP& scenario, const StageLP& stage, std::string_view col_name) noexcept

Generates a state variable key for the object.

Parameters
self Reference to the object
scenario Scenario context
stage Stage context
col_name The column name for the state variable
Returns StateVariable::Key

auto gtopt::ReserveProvisionLP::sv_key(this const Self& self, const StageLP& stage, std::string_view col_name) noexcept

auto gtopt::ReserveProvisionLP::uid() const noexcept

Returns The object's unique identifier

Variable documentation

static std::string_view gtopt::ReserveProvisionLP::OfflineUpProvisionName

Rows written by CommitmentLP into this provision's LP (u-gated reserve limits): offline (cold) up reserve cap and the reserve headroom under min-up / min-down time.

static std::string_view gtopt::ReserveProvisionLP::UpName

PAMPL-visible aliases for the up/down provision columns. Exposed under canonical short names so user constraints can write reserve_provision("P").up instead of the verbose uprovision.