GasCompressorLP class
#include <gtopt/gas_compressor_lp.hpp>
Base classes
-
template<typename ObjectType>class ObjectLP<GasCompressor>
- Wrapper class that adds LP capabilities to objects.
Public types
- using Element = GasCompressor
- using FuelModel = GasCompressorFuelModel
- Kept as a nested alias for existing callers.
- using object_type = GasCompressor
- Type of the wrapped object.
Public static variables
- static std::string_view FlowName
- static std::string_view FuelName
- static std::string_view FuelPlaneName
- static std::string_view GasNodeInKey
- static std::string_view GasNodeOutKey
- static std::string_view MotorName
- static std::string_view NoExpandName
- static std::string_view PowerName
- static std::string_view RatioName
Constructors, destructors, conversion operators
- GasCompressorLP(const GasCompressor& cs, const InputContext& ic) explicit
Public functions
- auto add_to_lp(SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, LinearProblem& lp) -> bool
- auto add_to_output(OutputContext& out) const -> bool
- auto alpha() const -> double noexcept
- Saldarriaga α.
- auto class_name(this const Self& self) -> auto noexcept
- auto fixed_fraction() const -> double
- Fixed fuel fraction γ_ff (explicit or γ (β̄^α − 1)).
- auto flow_cols_at(const ScenarioLP& scenario, const StageLP& stage) const -> const auto&
- auto fuel_cols_at(const ScenarioLP& scenario, const StageLP& stage) const -> const auto&
- auto fuel_model() const -> FuelModel noexcept
- auto gamma() const -> double
- Saldarriaga γ (explicit or adiabatic-head value).
- auto gas_compressor(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 is_electric() const -> bool noexcept
- auto kappa() const -> double
- Electric conversion κ [MW per km³/h].
- auto max_ratio() const -> double noexcept
- auto object() & -> GasCompressor& noexcept
- Gets the wrapped object.
- auto power_cols_at(const ScenarioLP& scenario, const StageLP& stage) const -> const auto&
- 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
Parameter accessors for PAMPL user-constraint resolution
- auto param_fmax(StageUid s) const -> auto
- auto param_max_ratio() const -> std::optional<double> noexcept
- auto param_power_max() const -> std::optional<double> noexcept
Typedef documentation
using gtopt:: GasCompressorLP:: Element = GasCompressor
#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:: GasCompressorLP:: object_type = GasCompressor
#include <gtopt/object_lp.hpp>
Type of the wrapped object.
Function documentation
auto gtopt:: GasCompressorLP:: class_name(this const Self& self) noexcept
#include <gtopt/object_lp.hpp>
auto gtopt:: GasCompressorLP:: id() const noexcept
#include <gtopt/object_lp.hpp>
| Returns | The object's complete identifier (uid + name) |
|---|
bool gtopt:: GasCompressorLP:: 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 |
GasCompressor& gtopt:: GasCompressorLP:: object() & noexcept
#include <gtopt/object_lp.hpp>
Gets the wrapped object.
| Returns | Reference to the wrapped object |
|---|
auto& gtopt:: GasCompressorLP:: 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:: GasCompressorLP:: short_name(this const Self& self) noexcept
#include <gtopt/object_lp.hpp>
auto gtopt:: GasCompressorLP:: 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:: GasCompressorLP:: sv_key(this const Self& self,
const StageLP& stage,
std::string_view col_name) noexcept
#include <gtopt/object_utils.hpp>
auto gtopt:: GasCompressorLP:: uid() const noexcept
#include <gtopt/object_lp.hpp>
| Returns | The object's unique identifier |
|---|