FlowRightLP class
#include <gtopt/flow_right_lp.hpp>
Base classes
-
template<typename ObjectType ObjectType>class ObjectLP<FlowRight>
- Wrapper class that adds LP capabilities to objects.
Public types
- using object_type = FlowRight
- Type of the wrapped object.
Public static variables
- static constexpr LPClassName ClassName
Constructors, destructors, conversion operators
- FlowRightLP(const FlowRight& pflow, 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) -> constexpr auto noexcept
- auto fail_cols_at(const ScenarioLP& scenario, const StageLP& stage) const -> auto&&
- auto flow_cols_at(const ScenarioLP& scenario, const StageLP& stage) const -> auto&&
- auto flow_right(this auto&& 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 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 object() && -> constexpr FlowRight&& noexcept
- auto object() & -> constexpr FlowRight& noexcept
- Gets the wrapped object.
- auto object() const && -> constexpr const FlowRight&& noexcept
- auto object() const & -> constexpr const FlowRight& noexcept
- auto qeh_col_at(const ScenarioLP& scenario, const StageLP& stage) const -> ColIndex
- 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 uid() const -> constexpr auto noexcept
- auto update_lp(SystemLP& sys, const ScenarioLP& scenario, const StageLP& stage) -> int
Parameter accessors for user constraint resolution
- auto param_fmax(StageUid s, BlockUid b) const -> auto
- auto param_discharge(ScenarioUid sc, StageUid s, BlockUid b) const -> auto
- auto param_fail_cost(StageUid s, BlockUid b) const -> auto
- auto param_use_value(StageUid s, BlockUid b) const -> auto
Typedef documentation
using gtopt:: FlowRightLP:: object_type = FlowRight
#include <gtopt/object_lp.hpp>
Type of the wrapped object.
Function documentation
constexpr auto gtopt:: FlowRightLP:: class_name(this const Self& self) noexcept
#include <gtopt/object_lp.hpp>
constexpr auto gtopt:: FlowRightLP:: id() const noexcept
#include <gtopt/object_lp.hpp>
| Returns | The object's complete identifier (uid + name) |
|---|
#include <gtopt/object_utils.hpp>
constexpr auto gtopt:: FlowRightLP:: 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:: FlowRightLP:: 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:: FlowRightLP:: lp_label(this const Self& self,
SystemContext& sc,
const ScenarioLP& scenario,
const StageLP& stage,
Args && ... args)
#include <gtopt/object_utils.hpp>
constexpr auto gtopt:: FlowRightLP:: lp_label(this const Self& self,
SystemContext& sc,
const ScenarioLP& scenario,
const StageLP& stage,
const BlockLP& block,
Args && ... args)
constexpr FlowRight&& gtopt:: FlowRightLP:: object() && noexcept
#include <gtopt/object_lp.hpp>
constexpr FlowRight& gtopt:: FlowRightLP:: object() & noexcept
#include <gtopt/object_lp.hpp>
Gets the wrapped object.
| Returns | Reference to the wrapped object |
|---|
constexpr const FlowRight&& gtopt:: FlowRightLP:: object() const && noexcept
#include <gtopt/object_lp.hpp>
constexpr const FlowRight& gtopt:: FlowRightLP:: object() const & noexcept
#include <gtopt/object_lp.hpp>
ColIndex gtopt:: FlowRightLP:: qeh_col_at(const ScenarioLP& scenario,
const StageLP& stage) const
| Exceptions | |
|---|---|
| std::out_of_range | if not available. |
Return the stage-average hourly flow column for (scenario, stage). Only present when use_average = true.
constexpr auto gtopt:: FlowRightLP:: short_name(this const Self& self) noexcept
#include <gtopt/object_lp.hpp>
#include <gtopt/object_utils.hpp>
constexpr auto gtopt:: FlowRightLP:: 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:: FlowRightLP:: 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:: FlowRightLP:: 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:: FlowRightLP:: uid() const noexcept
#include <gtopt/object_lp.hpp>
| Returns | The object's unique identifier |
|---|
int gtopt:: FlowRightLP:: update_lp(SystemLP& sys,
const ScenarioLP& scenario,
const StageLP& stage)
| Returns | Number of LP column bounds modified (0 if unchanged) |
|---|
Update volume-dependent column bounds when bound_rule is set. Reads the referenced reservoir's current volume, evaluates the piecewise-linear bound function, and calls set_col_upp on flow columns when the computed bound differs from the cached value.