gtopt::WaterwayLP class

Base classes

template<typename ObjectType ObjectType>
class ObjectLP<Waterway>
Wrapper class that adds LP capabilities to objects.

Public types

using object_type = Waterway
Type of the wrapped object.

Public static variables

static constexpr LPClassName ClassName

Constructors, destructors, conversion operators

WaterwayLP(const Waterway& pwaterway, 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 flow_cols_at(const ScenarioLP& scenario, const StageLP& stage) const -> constexpr auto&&
auto id() const -> constexpr auto noexcept
auto is_active(const StageLP& stage) const -> constexpr bool
Checks if object is active in given stage.
auto junction_a_sid() const -> constexpr auto noexcept
auto junction_b_sid() const -> constexpr auto noexcept
template<typename Self Self, typename SystemContext SystemContext, typename... Args>
auto lp_col_label(this const Self& self, SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, Args && ... args) -> constexpr auto
template<typename Self Self, typename SystemContext SystemContext, typename... Args>
auto lp_col_label(this const Self& self, SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, const BlockLP& block, Args && ... args) -> constexpr auto
template<typename Self Self, typename SystemContext SystemContext, typename... Args>
auto lp_label(this const Self& self, SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, Args && ... args) -> constexpr auto
template<typename Self Self, typename SystemContext SystemContext, typename... Args>
auto lp_label(this const Self& self, SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, const BlockLP& block, Args && ... args) -> constexpr auto
template<typename Self Self, typename SystemContext SystemContext, typename... Args>
auto lp_label(this const Self& self, SystemContext& sc, const StageLP& stage, Args && ... args) -> constexpr auto
auto object() && -> constexpr Waterway&& noexcept
auto object() & -> constexpr Waterway& noexcept
Gets the wrapped object.
auto object() const && -> constexpr const Waterway&& noexcept
auto object() const & -> constexpr const Waterway& 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
template<typename Self Self, typename SystemContext SystemContext, typename... Args>
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.
template<typename Self Self, typename SystemContext SystemContext, typename... Args>
auto state_col_label(this const Self& self, SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, const BlockLP& block, Args && ... args) -> constexpr auto
template<typename Self Self, typename ScenarioLP ScenarioLP, typename StageLP StageLP>
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.
template<typename Self Self, typename StageLP StageLP>
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 waterway(this auto&& self) -> constexpr auto&& noexcept

Typedef documentation

using gtopt::WaterwayLP::object_type = Waterway

Type of the wrapped object.

Function documentation

constexpr auto gtopt::WaterwayLP::class_name(this const Self& self) noexcept

constexpr auto gtopt::WaterwayLP::id() const noexcept

Returns The object's complete identifier (uid + name)

constexpr bool gtopt::WaterwayLP::is_active(const StageLP& stage) const

Checks if object is active in given stage.

Parameters
stage The stage to check
Returns true if active in stage, false otherwise

template<typename Self Self, typename SystemContext SystemContext, typename... Args>
constexpr auto gtopt::WaterwayLP::lp_col_label(this const Self& self, SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, Args && ... args)

template<typename Self Self, typename SystemContext SystemContext, typename... Args>
constexpr auto gtopt::WaterwayLP::lp_col_label(this const Self& self, SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, const BlockLP& block, Args && ... args)

template<typename Self Self, typename SystemContext SystemContext, typename... Args>
constexpr auto gtopt::WaterwayLP::lp_label(this const Self& self, SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, Args && ... args)

template<typename Self Self, typename SystemContext SystemContext, typename... Args>
constexpr auto gtopt::WaterwayLP::lp_label(this const Self& self, SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, const BlockLP& block, Args && ... args)

template<typename Self Self, typename SystemContext SystemContext, typename... Args>
constexpr auto gtopt::WaterwayLP::lp_label(this const Self& self, SystemContext& sc, const StageLP& stage, Args && ... args)

constexpr Waterway&& gtopt::WaterwayLP::object() && noexcept

constexpr Waterway& gtopt::WaterwayLP::object() & noexcept

Gets the wrapped object.

Returns Reference to the wrapped object

constexpr const Waterway&& gtopt::WaterwayLP::object() const && noexcept

constexpr const Waterway& gtopt::WaterwayLP::object() const & noexcept

constexpr auto& gtopt::WaterwayLP::set_id(Uid uid, Name name) noexcept

Sets the object's identifier.

Parameters
uid Unique identifier
name Human-readable name
Returns Reference to self for chaining

constexpr auto gtopt::WaterwayLP::short_name(this const Self& self) noexcept

template<typename Self Self, typename SystemContext SystemContext, typename... Args>
constexpr auto gtopt::WaterwayLP::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

template<typename Self Self, typename SystemContext SystemContext, typename... Args>
constexpr auto gtopt::WaterwayLP::state_col_label(this const Self& self, SystemContext& sc, const ScenarioLP& scenario, const StageLP& stage, const BlockLP& block, Args && ... args)

template<typename Self Self, typename ScenarioLP ScenarioLP, typename StageLP StageLP>
constexpr auto gtopt::WaterwayLP::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

template<typename Self Self, typename StageLP StageLP>
constexpr auto gtopt::WaterwayLP::sv_key(this const Self& self, const StageLP& stage, std::string_view col_name) noexcept

constexpr auto gtopt::WaterwayLP::uid() const noexcept

Returns The object's unique identifier