LineCommitmentLP class
#include <gtopt/line_commitment_lp.hpp>
Base classes
-
template<typename ObjectType>class ObjectLP<LineCommitment>
- Wrapper class that adds LP capabilities to objects.
Public types
- using Base = ObjectLP<LineCommitment>
- using Element = LineCommitment
- using object_type = LineCommitment
- Type of the wrapped object.
Public static variables
- static std::string_view CapacityNName
- static std::string_view CapacityPName
- static std::string_view ColdStartName
- static std::string_view ExclusionName
- static std::string_view HotStartName
- static std::string_view HotWindowName
- C9 hot-window row:
y_hot[t] ≤ Σ_{q ∈ hot window} w[q]. - static std::string_view KvlMinusName
- static std::string_view LogicName
- C1 logic transition row:
u[t] − u[t−1] − v[t] + w[t] = 0. - static std::string_view LossGateNName
- static std::string_view LossGatePName
- static std::string_view MaxStartsName
- static std::string_view MinDownTimeName
- static std::string_view MinStartsName
- static std::string_view MinUpTimeName
- v1.2 time-based constraint labels (mirror
CommitmentLP). - static std::string_view ShutdownName
- static std::string_view StartupName
- static std::string_view StatusName
- static std::string_view TierSelectName
- C8 selection row:
v[t] = y_hot[t] + y_warm[t] + y_cold[t]. - static std::string_view WarmStartName
- static std::string_view WarmWindowName
- C10 warm-window row:
y_warm[t] ≤ Σ_{q ∈ warm window} w[q].
Constructors, destructors, conversion operators
- LineCommitmentLP(const LineCommitment& lc, 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 class_name(this const Self& 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 line_commitment(this auto&& self) -> auto&& noexcept
- auto line_sid() const -> auto noexcept
- auto lookup_status_col(const ScenarioLP& scenario, const StageLP& stage, BlockUid buid) const -> std::optional<ColIndex> noexcept
- Look up the status column for (scenario, stage, block).
- auto object() && -> LineCommitment&& noexcept
- auto object() & -> LineCommitment& noexcept
- Gets the wrapped object.
- auto object() const && -> const LineCommitment&& noexcept
- auto object() const & -> const LineCommitment& 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:: LineCommitmentLP:: Element = LineCommitment
#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:: LineCommitmentLP:: object_type = LineCommitment
#include <gtopt/object_lp.hpp>
Type of the wrapped object.
Function documentation
auto gtopt:: LineCommitmentLP:: class_name(this const Self& self) noexcept
#include <gtopt/object_lp.hpp>
auto gtopt:: LineCommitmentLP:: id() const noexcept
#include <gtopt/object_lp.hpp>
| Returns | The object's complete identifier (uid + name) |
|---|
bool gtopt:: LineCommitmentLP:: 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 |
LineCommitment&& gtopt:: LineCommitmentLP:: object() && noexcept
#include <gtopt/object_lp.hpp>
LineCommitment& gtopt:: LineCommitmentLP:: object() & noexcept
#include <gtopt/object_lp.hpp>
Gets the wrapped object.
| Returns | Reference to the wrapped object |
|---|
const LineCommitment&& gtopt:: LineCommitmentLP:: object() const && noexcept
#include <gtopt/object_lp.hpp>
const LineCommitment& gtopt:: LineCommitmentLP:: object() const & noexcept
#include <gtopt/object_lp.hpp>
auto& gtopt:: LineCommitmentLP:: 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:: LineCommitmentLP:: short_name(this const Self& self) noexcept
#include <gtopt/object_lp.hpp>
auto gtopt:: LineCommitmentLP:: 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:: LineCommitmentLP:: sv_key(this const Self& self,
const StageLP& stage,
std::string_view col_name) noexcept
#include <gtopt/object_utils.hpp>
auto gtopt:: LineCommitmentLP:: uid() const noexcept
#include <gtopt/object_lp.hpp>
| Returns | The object's unique identifier |
|---|
Variable documentation
static std::string_view gtopt:: LineCommitmentLP:: ExclusionName
C3 exclusion row: v[t] + w[t] ≤ 1 (mutual exclusion of the startup and shutdown indicators).
static std::string_view gtopt:: LineCommitmentLP:: HotStartName
v1.3 startup-tier labels (mirror CommitmentLP). Active only when all five tier fields are set on the schema.
static std::string_view gtopt:: LineCommitmentLP:: KvlMinusName
Lower-side KVL big-M row label (Kirchhoff node_angle mode only). The upper-side ≤ half is the same row label the existing LineLP KVL emission uses (LineLP::ThetaName) since we MUTATE that row in place to become the upper half.
static std::string_view gtopt:: LineCommitmentLP:: LossGatePName
Channel-E loss gating rows: ℓ − cap·u ≤ 0 on the per-direction (or shared / tangent) loss columns, so an OFFLINE line cannot keep booking loss up to its column cap under a negative bus-dual pair-sum (see test_line_losses_commitment_leak.cpp).
static std::string_view gtopt:: LineCommitmentLP:: MinStartsName
Lower-side of the max_starts pair (min_starts ≤ Σ v). Uses a distinct label so the row metadata dedup in LinearProblem::add_row doesn't collide with the upper-side row when both bounds are set on the same window. CommitmentLP has the same latent bug but no current test exercises the upper+lower combination at LP-build time.
static std::string_view gtopt:: LineCommitmentLP:: StartupName
Knueven–Ostrowski–Watson 2020 three-binary decomposition labels. Active only when LineCommitment.startup_cost or shutdown_cost is set (see header docstring §"u/v/w (v1.1)").