InertiaProvisionLP class
#include <gtopt/inertia_provision_lp.hpp>
Base classes
-
template<typename ObjectType>class ObjectLP<InertiaProvision>
- Wrapper class that adds LP capabilities to objects.
Public types
- using Base = ObjectLP<InertiaProvision>
- using Element = InertiaProvision
- using object_type = InertiaProvision
- Type of the wrapped object.
Public static variables
- static std::string_view CouplingName
- static std::string_view ProvisionName
- static std::string_view ProvName
- PAMPL-visible alias for the provision columns.
Constructors, destructors, conversion operators
- InertiaProvisionLP(const InertiaProvision& ip, 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 generator_sid() const -> auto noexcept
- auto id() const -> auto noexcept
- auto inertia_provision(this auto&& self) -> auto&& noexcept
- auto is_active(const StageLP& stage) const -> bool
- Checks if object is active in given stage.
- auto lookup_provision_col(const ScenarioLP& scenario, const StageLP& stage, BlockUid buid) const -> std::optional<ColIndex> noexcept
- auto object() && -> InertiaProvision&& noexcept
- auto object() & -> InertiaProvision& noexcept
- Gets the wrapped object.
- auto object() const && -> const InertiaProvision&& noexcept
- auto object() const & -> const InertiaProvision& 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:: InertiaProvisionLP:: Element = InertiaProvision
#include <gtopt/object_lp.hpp>
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:: InertiaProvisionLP:: object_type = InertiaProvision
#include <gtopt/object_lp.hpp>
Type of the wrapped object.
Function documentation
auto gtopt:: InertiaProvisionLP:: class_name(this const Self& self) noexcept
#include <gtopt/object_lp.hpp>
auto gtopt:: InertiaProvisionLP:: id() const noexcept
#include <gtopt/object_lp.hpp>
| Returns | The object's complete identifier (uid + name) |
|---|
bool gtopt:: InertiaProvisionLP:: is_active(const StageLP& stage) const
#include <gtopt/object_lp.hpp>
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:: InertiaProvisionLP:: lookup_provision_col(const ScenarioLP& scenario,
const StageLP& stage,
BlockUid buid) const noexcept
Look up the provision column for (scenario, stage, block). Delegates to the shared lookup_inner helper (index_holder.hpp).
InertiaProvision&& gtopt:: InertiaProvisionLP:: object() && noexcept
#include <gtopt/object_lp.hpp>
InertiaProvision& gtopt:: InertiaProvisionLP:: object() & noexcept
#include <gtopt/object_lp.hpp>
Gets the wrapped object.
| Returns | Reference to the wrapped object |
|---|
const InertiaProvision&& gtopt:: InertiaProvisionLP:: object() const && noexcept
#include <gtopt/object_lp.hpp>
const InertiaProvision& gtopt:: InertiaProvisionLP:: object() const & noexcept
#include <gtopt/object_lp.hpp>
auto& gtopt:: InertiaProvisionLP:: set_id(Uid uid,
Name name) noexcept
#include <gtopt/object_lp.hpp>
Sets the object's identifier.
| Parameters | |
|---|---|
| uid | Unique identifier |
| name | Human-readable name |
| Returns | Reference to self for chaining |
auto gtopt:: InertiaProvisionLP:: short_name(this const Self& self) noexcept
#include <gtopt/object_lp.hpp>
auto gtopt:: InertiaProvisionLP:: sv_key(this const Self& self,
const ScenarioLP& scenario,
const StageLP& stage,
std::string_view col_name) noexcept
#include <gtopt/object_utils.hpp>
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:: InertiaProvisionLP:: sv_key(this const Self& self,
const StageLP& stage,
std::string_view col_name) noexcept
#include <gtopt/object_utils.hpp>
auto gtopt:: InertiaProvisionLP:: uid() const noexcept
#include <gtopt/object_lp.hpp>
| Returns | The object's unique identifier |
|---|