BusLP class
#include <gtopt/bus_lp.hpp>
Base classes
-
template<typename ObjectType ObjectType>class ObjectLP<Bus>
- Wrapper class that adds LP capabilities to objects.
Public types
- using object_type = Bus
- Type of the wrapped object.
Public static variables
- static constexpr LPClassName ClassName
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 balance_rows_at(const ScenarioLP& scenario, const StageLP& stage) const -> constexpr const auto&
- auto bus() const -> constexpr const auto& noexcept
- auto BusLP(const Bus& pbus, const InputContext& ic) -> constexpr explicit noexcept
- auto class_name(this const Self& self) -> constexpr auto noexcept
- auto id() const -> constexpr auto noexcept
- auto is_active(const StageLP& stage) const -> constexpr bool
- Checks if object is active in given stage.
- auto lookup_theta_col(const ScenarioLP& scenario, const StageLP& stage, BlockUid buid) const -> std::optional<ColIndex> noexcept
- auto lp_col_label(this const Self& self, SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, Args && ... args) -> constexpr auto
- auto lp_col_label(this const Self& self, SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, const BlockLP& block, Args && ... args) -> constexpr auto
- auto lp_label(this const Self& self, SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, Args && ... args) -> constexpr auto
- auto lp_label(this const Self& self, SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, const BlockLP& block, Args && ... args) -> constexpr auto
- auto lp_label(this const Self& self, SystemContext& sc, const StageLP& stage, Args && ... args) -> constexpr auto
- auto needs_kirchhoff(const SystemContext& sc) const -> bool -> auto
- auto object() && -> constexpr Bus&& noexcept
- auto object() & -> constexpr Bus& noexcept
- Gets the wrapped object.
- auto object() const && -> constexpr const Bus&& noexcept
- auto object() const & -> constexpr const Bus& noexcept
- auto reference_theta() const -> constexpr auto noexcept
- auto set_id(Uid uid, Name name) -> constexpr auto& noexcept
- Sets the object's identifier.
- auto short_name(this const Self& self) -> constexpr auto noexcept
- auto state_col_label(this const Self& self, SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, Args && ... args) -> constexpr auto
- Generates a label for a variable in the optimization problem.
- auto state_col_label(this const Self& self, SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, const BlockLP& block, Args && ... args) -> constexpr auto
- auto sv_key(this const Self& self, const ScenarioLP& scenario, const StageLP& stage, std::string_view col_name) -> constexpr 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) -> constexpr auto noexcept
- auto theta_cols_at(const SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, LinearProblem& lp, const std::vector<BlockLP>& blocks) const -> const BIndexHolder< ColIndex > & -> constexpr auto
- auto uid() const -> constexpr auto noexcept
- auto use_kirchhoff() const -> constexpr auto noexcept
- auto voltage() const -> constexpr auto noexcept
Typedef documentation
using gtopt:: BusLP:: object_type = Bus
#include <gtopt/object_lp.hpp>
Type of the wrapped object.
Function documentation
constexpr auto gtopt:: BusLP:: class_name(this const Self& self) noexcept
#include <gtopt/object_lp.hpp>
constexpr auto gtopt:: BusLP:: id() const noexcept
#include <gtopt/object_lp.hpp>
| Returns | The object's complete identifier (uid + name) |
|---|
std::optional<ColIndex> gtopt:: BusLP:: lookup_theta_col(const ScenarioLP& scenario,
const StageLP& stage,
BlockUid buid) const noexcept
Look up an already-created theta column without lazy initialisation. Returns std::nullopt if no theta column exists for this (scenario, stage, block) triple (e.g. single-bus or reference bus).
#include <gtopt/object_utils.hpp>
constexpr auto gtopt:: BusLP:: lp_col_label(this const Self& self,
SystemContext& sc,
const ScenarioLP& scenario,
const StageLP& stage,
Args && ... args)
#include <gtopt/object_utils.hpp>
constexpr auto gtopt:: BusLP:: lp_col_label(this const Self& self,
SystemContext& sc,
const ScenarioLP& scenario,
const StageLP& stage,
const BlockLP& block,
Args && ... args)
#include <gtopt/object_utils.hpp>
constexpr auto gtopt:: BusLP:: lp_label(this const Self& self,
SystemContext& sc,
const ScenarioLP& scenario,
const StageLP& stage,
Args && ... args)
#include <gtopt/object_utils.hpp>
constexpr auto gtopt:: BusLP:: lp_label(this const Self& self,
SystemContext& sc,
const ScenarioLP& scenario,
const StageLP& stage,
const BlockLP& block,
Args && ... args)
constexpr Bus&& gtopt:: BusLP:: object() && noexcept
#include <gtopt/object_lp.hpp>
constexpr Bus& gtopt:: BusLP:: object() & noexcept
#include <gtopt/object_lp.hpp>
Gets the wrapped object.
| Returns | Reference to the wrapped object |
|---|
constexpr const Bus&& gtopt:: BusLP:: object() const && noexcept
#include <gtopt/object_lp.hpp>
constexpr const Bus& gtopt:: BusLP:: object() const & noexcept
#include <gtopt/object_lp.hpp>
constexpr auto gtopt:: BusLP:: short_name(this const Self& self) noexcept
#include <gtopt/object_lp.hpp>
#include <gtopt/object_utils.hpp>
constexpr auto gtopt:: BusLP:: state_col_label(this const Self& self,
SystemContext& sc,
const ScenarioLP& scenario,
const StageLP& stage,
Args && ... args)
Generates a label for a variable in the optimization problem.
| Parameters | |
|---|---|
| self | Reference to the object |
| sc | System context |
| scenario | Scenario context |
| stage | Stage context |
| args | Additional arguments to include in the label |
| Returns | Label string |
#include <gtopt/object_utils.hpp>
constexpr auto gtopt:: BusLP:: state_col_label(this const Self& self,
SystemContext& sc,
const ScenarioLP& scenario,
const StageLP& stage,
const BlockLP& block,
Args && ... args)
#include <gtopt/object_utils.hpp>
constexpr auto gtopt:: BusLP:: 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 |
constexpr auto gtopt:: BusLP:: uid() const noexcept
#include <gtopt/object_lp.hpp>
| Returns | The object's unique identifier |
|---|