gtopt::EmissionLP class

Base classes

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

Public types

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

Constructors, destructors, conversion operators

EmissionLP(const Emission& emission, const InputContext& ic) explicit

Public functions

auto class_name(this const Self& self) -> auto noexcept
auto emission(this auto&& self) -> auto&& noexcept
auto id() const -> auto noexcept
auto is_active(const StageLP& stage) const -> bool
Checks if object is active in given stage.
auto object() && -> Emission&& noexcept
auto object() & -> Emission& noexcept
Gets the wrapped object.
auto object() const && -> const Emission&& noexcept
auto object() const & -> const Emission& 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 uid() const -> auto noexcept

Typedef documentation

using gtopt::EmissionLP::Element = Emission

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::EmissionLP::object_type = Emission

Type of the wrapped object.

Function documentation

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

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

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

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

Emission&& gtopt::EmissionLP::object() && noexcept

Emission& gtopt::EmissionLP::object() & noexcept

Gets the wrapped object.

Returns Reference to the wrapped object

const Emission&& gtopt::EmissionLP::object() const && noexcept

const Emission& gtopt::EmissionLP::object() const & noexcept

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

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

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

Returns The object's unique identifier