gtopt::PlanningLP class

Linear programming model for power system planning.

Encapsulates a linear programming formulation of a power system planning problem, including system configurations, simulation scenarios, and solver options.

Public types

struct SddpSummary
Summary of the last SDDP solve (populated by the SDDP solver).
using phase_systems_t = StrongIndexVector<PhaseIndex, SystemLP>
using scene_phase_systems_t = StrongIndexVector<SceneIndex, phase_systems_t>

Constructors, destructors, conversion operators

template<typename PlanningT PlanningT>
PlanningLP(PlanningT&& planning, const LpMatrixOptions& flat_opts = {}) explicit
Constructs a PlanningLP instance from planning data.

Public functions

auto options() const -> constexpr const PlanningOptionsLP& noexcept
Gets the LP options configuration.
auto planning() const -> constexpr const Planning& noexcept
Gets the underlying planning data.
auto resolve(const SolverOptions& lp_opts = {}) -> std::expected<int, Error>
Solves the linear programming problem.
auto sddp_summary() const -> const SddpSummary& noexcept
Read the SDDP summary (populated after a successful SDDP solve).
auto set_sddp_summary(SddpSummary summary) -> void noexcept
Populate the SDDP summary (called by the SDDP solver).
auto simulation() const -> constexpr const SimulationLP& noexcept
Gets the simulation LP model.
template<typename Self Self>
auto system(this Self&& self, SceneIndex scene_index, PhaseIndex phase_index) -> constexpr auto&& noexcept
template<typename Self Self>
auto systems(this Self&& self) -> constexpr auto&& noexcept
Gets the system LP representations.
auto write_lp(const std::string& filename) const -> void
Writes the LP formulation to file.
auto write_out() const -> void
Writes solution output (implementation-defined destination)

Friends

auto MonolithicMethod(MonolithicMethod) -> class

Function documentation

template<typename PlanningT PlanningT>
gtopt::PlanningLP::PlanningLP(PlanningT&& planning, const LpMatrixOptions& flat_opts = {}) explicit

Constructs a PlanningLP instance from planning data.

Parameters
planning The power system planning data
flat_opts Configuration options (default empty)

constexpr const PlanningOptionsLP& gtopt::PlanningLP::options() const noexcept

Gets the LP options configuration.

Returns Const reference to PlanningOptionsLP

constexpr const Planning& gtopt::PlanningLP::planning() const noexcept

Gets the underlying planning data.

Returns Const reference to Planning

std::expected<int, Error> gtopt::PlanningLP::resolve(const SolverOptions& lp_opts = {})

Solves the linear programming problem.

Parameters
lp_opts Solver options (default empty)
Returns Expected with solution status or error message

constexpr const SimulationLP& gtopt::PlanningLP::simulation() const noexcept

Gets the simulation LP model.

Returns Const reference to SimulationLP

template<typename Self Self>
constexpr auto&& gtopt::PlanningLP::systems(this Self&& self) noexcept

Gets the system LP representations.

Returns Const reference to vector of SystemLP

void gtopt::PlanningLP::write_lp(const std::string& filename) const

Writes the LP formulation to file.

Parameters
filename Output file path

void gtopt::PlanningLP::write_out() const

Writes solution output (implementation-defined destination)

< Final SDDP gap (0.0 for monolithic)

< Final SDDP stationary gap-change (1.0 for monolithic)