gtopt/sddp_investment_master.hpp file

OptGen-style investment-master Benders loop — a MIP master over here-and-now integer expansion builds coupled to the gtopt operational SDDP through capacity-space Benders cuts (deliverable 4 of the SDDiP campaign; design in docs/analysis/investigations/sddp/sddip_integer_expansion_2026-07.md §7).

Two-level decomposition (PSR OptGen + SDDP parity)

Investment (here-and-now, integer) is separated from operation (multistage, continuous recourse):

  • Master (MIP) — variables are the per-candidate integer build counts n_g ∈ [0, expmod], an accumulated capacity state K_g mirroring the capainst accounting of capacity_object_lp.cpp, and one epigraph variable θ_s per scene. Objective = Σ_s θ_s, minimised subject to the capacity-space Benders cuts θ_s ≥ rhs − Σ_j coeff_j · K_j accumulated from the operational oracle. Built directly on a LinearInterface (tens of columns) — no Planning / PlanningLP needed for the master itself.

    The per-scene θ carries the FULL discounted scene cost (OPEX + the CAPEX folded into the capacost state), so the master needs NO separate CAPEX term: the annualised investment charge is already inside every capacity cut (design §7.3 caveat 3, per-scene θ).

  • Operational oracle — the gtopt SDDP method run on a copy of the input Planning whose expansion candidates have expmod pinned to the master's proposed build n* (a pure-data mutation before PlanningLP construction — the least-invasive fixing route, design §7.3 caveat 4). Returns (i) the expected operational cost (the converged lower bound, used as the loop UB at n*) and (ii) the phase-0 capacity subgradients via extract_capacity_cuts.
  • Loop — solve master → pin capacities → run SDDP → extract + project capacity cuts onto master K coordinates → add to master → repeat. LB = master objective; UB = best operational cost seen at a master proposal. Stops on UB − LB ≤ tol or the iteration cap.

Validity

Operations are convex in capacity (capacities enter the operational LP as bounds/RHS), so the expected operational cost Φ(K) is convex piecewise-linear and each extracted cut is a valid support (Theorem O1/O2 of docs/formulation/sddp-cut-validity.md). Integers live ONLY in the master, so the master's branch-and-bound is exact — this is exactly why PSR pairs OptGen with SDDP instead of running SDDiP.

v1 scope / caveats (design §7.3)

  1. The projection to capacity coordinates is exact only when the non-capacity phase-0 states (reservoir energy) are pinned across master iterations (they are — eini is data). A pure-expansion fixture (no reservoir) makes the projection exact (0 dropped coordinates) — the acceptance test uses one.
  2. Single here-and-now build decision per candidate is the tested path: the master aggregates a candidate's capacity across the horizon into one K_g column and pins the same n* across every stage of the operational copy. Per-stage staggered builds are the documented remainder (design §7, §8).

Namespaces

namespace gtopt

Classes

struct gtopt::ExpansionCandidate
struct gtopt::InvestmentMasterIteration
Per-iteration record of the outer loop.
struct gtopt::InvestmentMasterOptions
Options controlling the outer investment-master loop.
struct gtopt::InvestmentMasterResult