gtopt/reservoir_production_factor.hpp file

Piecewise-linear turbine efficiency as a function of reservoir volume (hydraulic head)

Models the PLP "rendimiento" concept: each reservoir may provide a piecewise-linear concave function that maps current reservoir volume [hm³] to turbine conversion rate [MW·s/m³].

Piecewise-linear evaluation (matches PLP Fortran <tt>FRendimientos</tt>)

The efficiency is the minimum over all segments (concave envelope):

efficiency(V) = min_i { constant_i + slope_i × (V − volume_i) }

Here constant_i is the efficiency at the breakpoint volume_i (point-slope form). This matches the PLP Fortran function FRendimientos in plp-frendim.f:

valfrendimientos = min(valfrendimientos,
    constantes(i) + pendientes(i) * (vol - bordes(i)))

Note: This differs from ReservoirSeepageSegment where constant is the y-intercept at V = 0. For efficiency, constant is the value at the breakpoint (point-slope form), not the y-intercept.

Slopes must be given in decreasing order so the function is concave.

Volume used for SDDP updates

During SDDP iterations, the conversion-rate LP coefficient is updated using the average volume vavg = (vini + vfin) / 2 from the previous LP solve, providing a better linearization point than using only the initial volume.

JSON Example

{
  "uid": 1,
  "name": "eff_colbun",
  "turbine": "COLBUN",
  "reservoir": "COLBUN",
  "mean_production_factor": 1.53,
  "segments": [
    { "volume": 0.0, "slope": 0.0002294, "constant": 1.2558 }
  ]
}

Namespaces

namespace gtopt

Classes

struct gtopt::ProductionFactorSegment
One segment of the piecewise-linear efficiency curve.
struct gtopt::ReservoirProductionFactor
Reservoir-dependent turbine efficiency (PLP "rendimiento")