gtopt/sddp_method.hpp file

SDDP (Stochastic Dual Dynamic Programming) method for multi-phase planning problems with state variable coupling.

Implements a forward/backward iterative decomposition similar to the PLP SDDP methodology. Each gtopt-phase corresponds to a PLP-stage and is solved as an independent LP subproblem. State variables (reservoir volumes, capacity expansion variables, and future irrigation rights) link consecutive phases:

efin[t] → eini[t+1] (reservoir volume) capainst[t] → capainst_ini[t+1] (installed capacity)

The solver uses the existing SimulationLP::state_variables() map to discover all state-variable linkages generically, without hard-coding any specific component type.

Forward pass – phases are solved in order; state variable values propagate from source columns in phase t to dependent columns in phase t+1.

Backward pass – starting from the last phase and walking back to phase 1, the solver generates a Benders optimality cut at each step from the reduced costs of the dependent state variables and adds it to the previous phase's LP. Every non-last phase receives exactly one optimality cut per backward iteration (cuts land on phases 0..T-2; phase T-1 produces no outgoing cut).

The backward pass contains no elastic branch and installs no feasibility cuts. Forward-pass infeasibility is handled at forward-pass time (sddp_forward_pass.cpp): when the original LP at phase k is infeasible at the trial state, the elastic filter (Chinneck Phase-1) runs on a clone, emits a feasibility cut on phase k-1, and returns the clone's solution. The backward pass then treats phase k's cached solution as trial data and builds a standard optimality cut on phase k-1.

Multi-scene support – each scene is an independent trajectory (like a PLP scenario). Scenes are solved in parallel via the work pool.

Cut sharing – optimality cuts generated in one scene can be shared with other scenes at the same phase level. Three modes are supported:

  • None: cuts stay in their originating scene (default)
  • Expected: an average cut across scenes is computed and added to all
  • Max: all cuts from all scenes are added to all scenes

Cut persistence – cuts can be saved to and loaded from JSON files for hot-start capability.

The solver iterates until the gap between the upper bound (forward-pass cost) and the lower bound (with future-cost approximation) falls below a configurable tolerance, or a maximum iteration count is reached.

Namespaces

namespace gtopt

Classes

struct gtopt::SDDPMethod::LiveMetrics
struct gtopt::SDDPMethod::PriorIterBounds
struct gtopt::SDDPMethod::SceneRetryState
class gtopt::SDDPMethod
Iterative SDDP solver for multi-phase power system planning.
class gtopt::SDDPPlanningMethod
Adapter that wraps SDDPMethod behind the PlanningMethod interface.