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 stateK_gmirroring thecapainstaccounting ofcapacity_object_lp.cpp, and one epigraph variableθ_sper scene. Objective = Σ_s θ_s, minimised subject to the capacity-space Benders cutsθ_s ≥ rhs − Σ_j coeff_j · K_jaccumulated from the operational oracle. Built directly on aLinearInterface(tens of columns) — noPlanning/PlanningLPneeded for the master itself.The per-scene θ carries the FULL discounted scene cost (OPEX + the CAPEX folded into the
capacoststate), 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
Planningwhose expansion candidates haveexpmodpinned to the master's proposed buildn*(a pure-data mutation beforePlanningLPconstruction — 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 atn*) and (ii) the phase-0 capacity subgradients viaextract_capacity_cuts. - Loop — solve master → pin capacities → run SDDP → extract + project capacity cuts onto master
Kcoordinates → add to master → repeat. LB = master objective; UB = best operational cost seen at a master proposal. Stops onUB − LB ≤ tolor 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)
- The projection to capacity coordinates is exact only when the non-capacity phase-0 states (reservoir energy) are pinned across master iterations (they are —
einiis data). A pure-expansion fixture (no reservoir) makes the projection exact (0 dropped coordinates) — the acceptance test uses one. - 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_gcolumn and pins the samen*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