#include <gtopt/object_lp.hpp>
template<typename ObjectType ObjectType>
ObjectLP class
Wrapper class that adds LP capabilities to objects.
| Template parameters | |
|---|---|
| ObjectType | The type of object being wrapped |
This class maintains the original object while adding functionality needed for linear programming, such as activity tracking across stages.
Base classes
- class ObjectUtils
- Provides common utility methods for objects in the optimization framework.
Derived classes
- struct CapacityObjectLP
- A linear programming representation of an object with capacity constraints.
- struct CapacityObjectLP
- A linear programming representation of an object with capacity constraints.
- struct CapacityObjectLP
- A linear programming representation of an object with capacity constraints.
- struct CapacityObjectLP
- A linear programming representation of an object with capacity constraints.
- struct CapacityObjectLP
- A linear programming representation of an object with capacity constraints.
- class ProfileObjectLP
- Base class for profile-based LP objects.
- class ProfileObjectLP
- Base class for profile-based LP objects.
Public types
- using object_type = ObjectType
- Type of the wrapped object.
Public functions
- 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 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 ObjectType&& noexcept
- auto object() & -> constexpr ObjectType& noexcept
- Gets the wrapped object.
- auto object() const && -> constexpr const ObjectType&& noexcept
- auto object() const & -> constexpr const ObjectType& noexcept
- auto ObjectLP(OT&& pobject) -> constexpr explicit noexcept
- Constructs an ObjectLP by moving in an object.
- auto ObjectLP(OT&& pobject, const InputContext& ic, const LPClassName cname) -> constexpr explicit
- auto ObjectLP(OT&& pobject, const InputContext& ic, std::string_view cname) -> constexpr explicit
- 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
Function documentation
template<typename ObjectType ObjectType>
constexpr auto gtopt:: ObjectLP<ObjectType>:: id() const noexcept
| Returns | The object's complete identifier (uid + name) |
|---|
#include <gtopt/object_utils.hpp>
template<typename ObjectType ObjectType>
template<typename Self Self, typename SystemContext SystemContext, typename... Args>
constexpr auto gtopt:: ObjectLP<ObjectType>:: lp_col_label(this const Self& self,
SystemContext& sc,
const ScenarioLP& scenario,
const StageLP& stage,
Args && ... args)
#include <gtopt/object_utils.hpp>
template<typename ObjectType ObjectType>
template<typename Self Self, typename SystemContext SystemContext, typename... Args>
constexpr auto gtopt:: ObjectLP<ObjectType>:: 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>
template<typename ObjectType ObjectType>
template<typename Self Self, typename SystemContext SystemContext, typename... Args>
constexpr auto gtopt:: ObjectLP<ObjectType>:: lp_label(this const Self& self,
SystemContext& sc,
const ScenarioLP& scenario,
const StageLP& stage,
Args && ... args)
#include <gtopt/object_utils.hpp>
template<typename ObjectType ObjectType>
template<typename Self Self, typename SystemContext SystemContext, typename... Args>
constexpr auto gtopt:: ObjectLP<ObjectType>:: lp_label(this const Self& self,
SystemContext& sc,
const ScenarioLP& scenario,
const StageLP& stage,
const BlockLP& block,
Args && ... args)
#include <gtopt/object_utils.hpp>
template<typename ObjectType ObjectType>
template<typename Self Self, typename SystemContext SystemContext, typename... Args>
constexpr auto gtopt:: ObjectLP<ObjectType>:: lp_label(this const Self& self,
SystemContext& sc,
const StageLP& stage,
Args && ... args)
template<typename ObjectType ObjectType>
constexpr ObjectType& gtopt:: ObjectLP<ObjectType>:: object() & noexcept
Gets the wrapped object.
| Returns | Reference to the wrapped object |
|---|
#include <gtopt/object_utils.hpp>
template<typename ObjectType ObjectType>
template<typename Self Self, typename SystemContext SystemContext, typename... Args>
constexpr auto gtopt:: ObjectLP<ObjectType>:: 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>
template<typename ObjectType ObjectType>
template<typename Self Self, typename SystemContext SystemContext, typename... Args>
constexpr auto gtopt:: ObjectLP<ObjectType>:: 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>
template<typename ObjectType ObjectType>
template<typename Self Self, typename ScenarioLP ScenarioLP, typename StageLP StageLP>
constexpr auto gtopt:: ObjectLP<ObjectType>:: 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 ObjectType ObjectType>
constexpr auto gtopt:: ObjectLP<ObjectType>:: uid() const noexcept
| Returns | The object's unique identifier |
|---|