ReserveZoneLP class
#include <gtopt/reserve_zone_lp.hpp>
Base classes
-
template<typename ObjectType ObjectType>class ObjectLP<ReserveZone>
- Wrapper class that adds LP capabilities to objects.
Public types
- using Base = ObjectLP<ReserveZone>
- using object_type = ReserveZone
- Type of the wrapped object.
Public static variables
- static constexpr LPClassName ClassName
Constructors, destructors, conversion operators
- ReserveZoneLP(const ReserveZone& preserve_zone, 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 drequirement_cols() const -> auto&&
- auto drequirement_rows() const -> 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 lookup_drequirement_col(const ScenarioLP& scenario, const StageLP& stage, BlockUid buid) const -> std::optional<ColIndex> noexcept
- auto lookup_urequirement_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 object() && -> constexpr ReserveZone&& noexcept
- auto object() & -> constexpr ReserveZone& noexcept
- Gets the wrapped object.
- auto object() const && -> constexpr const ReserveZone&& noexcept
- auto object() const & -> constexpr const ReserveZone& noexcept
- auto reserve_zone(this auto&& self) -> 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 uid() const -> constexpr auto noexcept
- auto urequirement_cols() const -> auto&&
- auto urequirement_rows() const -> auto&&
Typedef documentation
using gtopt:: ReserveZoneLP:: object_type = ReserveZone
#include <gtopt/object_lp.hpp>
Type of the wrapped object.
Function documentation
constexpr auto gtopt:: ReserveZoneLP:: class_name(this const Self& self) noexcept
#include <gtopt/object_lp.hpp>
constexpr auto gtopt:: ReserveZoneLP:: id() const noexcept
#include <gtopt/object_lp.hpp>
| Returns | The object's complete identifier (uid + name) |
|---|
std::optional<ColIndex> gtopt:: ReserveZoneLP:: lookup_drequirement_col(const ScenarioLP& scenario,
const StageLP& stage,
BlockUid buid) const noexcept
Look up the down-requirement column for (scenario, stage, block). Returns std::nullopt when no down-requirement variable exists.
std::optional<ColIndex> gtopt:: ReserveZoneLP:: lookup_urequirement_col(const ScenarioLP& scenario,
const StageLP& stage,
BlockUid buid) const noexcept
Look up the up-requirement column for (scenario, stage, block). Returns std::nullopt when no up-requirement variable exists for this period (e.g. not configured or block not active).
#include <gtopt/object_utils.hpp>
constexpr auto gtopt:: ReserveZoneLP:: 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:: ReserveZoneLP:: 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:: ReserveZoneLP:: lp_label(this const Self& self,
SystemContext& sc,
const ScenarioLP& scenario,
const StageLP& stage,
Args && ... args)
#include <gtopt/object_utils.hpp>
constexpr auto gtopt:: ReserveZoneLP:: lp_label(this const Self& self,
SystemContext& sc,
const ScenarioLP& scenario,
const StageLP& stage,
const BlockLP& block,
Args && ... args)
constexpr ReserveZone&& gtopt:: ReserveZoneLP:: object() && noexcept
#include <gtopt/object_lp.hpp>
constexpr ReserveZone& gtopt:: ReserveZoneLP:: object() & noexcept
#include <gtopt/object_lp.hpp>
Gets the wrapped object.
| Returns | Reference to the wrapped object |
|---|
constexpr const ReserveZone&& gtopt:: ReserveZoneLP:: object() const && noexcept
#include <gtopt/object_lp.hpp>
constexpr const ReserveZone& gtopt:: ReserveZoneLP:: object() const & noexcept
#include <gtopt/object_lp.hpp>
constexpr auto gtopt:: ReserveZoneLP:: short_name(this const Self& self) noexcept
#include <gtopt/object_lp.hpp>
#include <gtopt/object_utils.hpp>
constexpr auto gtopt:: ReserveZoneLP:: 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:: ReserveZoneLP:: 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:: ReserveZoneLP:: 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:: ReserveZoneLP:: uid() const noexcept
#include <gtopt/object_lp.hpp>
| Returns | The object's unique identifier |
|---|