gtopt::ThermalNodeLP class

Base classes

template<typename Node Node>
class CarrierNodeLP<ThermalNode>

Public types

using Base = ObjectLP<ThermalNode>
using Element = ThermalNode
using object_type = ThermalNode
Type of the wrapped object.

Public static variables

static std::string_view BalanceName

Public functions

auto add_to_lp(const SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, LinearProblem& lp) -> bool
One balance row per block of an active (scenario, stage).
auto add_to_output(OutputContext& out) const -> bool
auto balance_rows_at(const ScenarioLP& scenario, const StageLP& stage) const -> const auto&
auto class_name(this const Self& self) -> auto noexcept
auto find_balance_rows(const ScenarioLP& scenario, const StageLP& stage) const -> const BIndexHolder<RowIndex>* noexcept
auto id() const -> auto noexcept
auto is_active(const StageLP& stage) const -> bool
Checks if object is active in given stage.
auto object() && -> ThermalNode&& noexcept
auto object() & -> ThermalNode& noexcept
Gets the wrapped object.
auto object() const && -> const ThermalNode&& noexcept
auto object() const & -> const ThermalNode& noexcept
auto set_id(Uid uid, Name name) -> auto& noexcept
Sets the object's identifier.
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 thermal_node(this auto&& self) -> auto&& noexcept
auto uid() const -> auto noexcept

Typedef documentation

using gtopt::ThermalNodeLP::Base = ObjectLP<ThermalNode>

typedef ThermalNode gtopt::ThermalNodeLP::Element

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::ThermalNodeLP::object_type = ThermalNode

Type of the wrapped object.

Function documentation

bool gtopt::ThermalNodeLP::add_to_lp(const SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, LinearProblem& lp)

One balance row per block of an active (scenario, stage).

bool gtopt::ThermalNodeLP::add_to_output(OutputContext& out) const

const auto& gtopt::ThermalNodeLP::balance_rows_at(const ScenarioLP& scenario, const StageLP& stage) const

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

const BIndexHolder<RowIndex>* gtopt::ThermalNodeLP::find_balance_rows(const ScenarioLP& scenario, const StageLP& stage) const noexcept

Non-throwing balance_rows_at: nullptr when (scenario, stage) was not built (node inactive in the stage). See active_ref.hpp.

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

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

bool gtopt::ThermalNodeLP::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

ThermalNode&& gtopt::ThermalNodeLP::object() && noexcept

ThermalNode& gtopt::ThermalNodeLP::object() & noexcept

Gets the wrapped object.

Returns Reference to the wrapped object

const ThermalNode&& gtopt::ThermalNodeLP::object() const && noexcept

const ThermalNode& gtopt::ThermalNodeLP::object() const & noexcept

auto& gtopt::ThermalNodeLP::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::ThermalNodeLP::short_name(this const Self& self) noexcept

auto gtopt::ThermalNodeLP::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::ThermalNodeLP::sv_key(this const Self& self, const StageLP& stage, std::string_view col_name) noexcept

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

Returns The object's unique identifier

Variable documentation

static std::string_view gtopt::ThermalNodeLP::BalanceName