SimulationLP class
#include <gtopt/simulation_lp.hpp>
Linear programming representation of a power system simulation.
Encapsulates the LP transformation of a power system simulation model, providing access to all components in their LP form. Maintains references to the original simulation and options objects.
Public types
Constructors, destructors, conversion operators
- SimulationLP(const Simulation& simulation, const PlanningOptionsLP& options) explicit
- Constructs a SimulationLP from a Simulation.
- SimulationLP(const SimulationLP&) defaulted
- SimulationLP(SimulationLP&&) defaulted noexcept
- ~SimulationLP() defaulted noexcept
Public functions
-
template<typename Key = state_auto add_state_variable(Key&& key, ColIndex col) -> const StateVariable & -> constexpr auto
variable_ key_ t> - auto apertures() const -> constexpr const auto& noexcept
- Gets the aperture definitions from the underlying Simulation.
- auto blocks() const -> constexpr const auto& noexcept
- auto operator=(const SimulationLP&) -> SimulationLP& defaulted noexcept
- auto operator=(SimulationLP&&) -> SimulationLP& defaulted noexcept
- auto options() const -> constexpr const PlanningOptionsLP& noexcept
- Gets the LP solver options.
- auto phases() const -> constexpr const auto& noexcept
- Gets all phase LP representations.
- auto prev_stage(const StageLP& stage) const noexcept -> std::pair< const StageLP *, const PhaseLP * > -> constexpr auto
- auto previous_stage(const StageLP& stage) -> constexpr auto
- auto scenarios() const -> constexpr const auto& noexcept
- Gets all scenario LP representations.
- auto scenes() const -> constexpr const auto& noexcept
- Gets all scene LP representations.
- auto simulation(this Self& self) -> constexpr auto&& noexcept
- Gets the underlying simulation model.
- auto stages() const -> constexpr const auto& noexcept
- auto state_variable(this Self&& self, Key&& key) -> constexpr auto noexcept
- Retrieves a state variable by its key.
- auto state_variables() -> constexpr const auto& noexcept
- auto state_variables(this Self&& self, SceneIndex scene_index, PhaseIndex phase_index) -> constexpr auto&& noexcept
Function documentation
gtopt:: SimulationLP:: SimulationLP(const Simulation& simulation,
const PlanningOptionsLP& options) explicit
Constructs a SimulationLP from a Simulation.
| Parameters | |
|---|---|
| simulation | Reference to the base simulation model |
| options | Reference to LP solver options |
| Exceptions | |
| std::runtime_error | If component validation fails |
| std::bad_alloc | If memory allocation fails |
constexpr const PlanningOptionsLP& gtopt:: SimulationLP:: options() const noexcept
Gets the LP solver options.
| Returns | Const reference to the options object |
|---|
constexpr auto gtopt:: SimulationLP:: state_variable(this Self&& self,
Key&& key) noexcept
Retrieves a state variable by its key.
| Parameters | |
|---|---|
| self | The object instance (deduced via explicit object parameter) |
| key | The key to search for |
| Returns | Optional reference to the state variable if found (const or non-const) |