reservoir_discharge_limit.hpp file
Piecewise-linear volume-dependent discharge limit for reservoirs.
Defines the ReservoirDischargeLimit structure modelling a volume-dependent maximum discharge rate for a reservoir. This is a safety/environmental constraint that limits the hourly-average discharge as a piecewise-linear function of the reservoir volume (e.g. to prevent landslides or excessive drawdown).
The constraint per stage is: qeh ≤ a(seg) × V_avg + b(seg) where qeh is the stage-average hourly discharge [m³/s], V_avg is the average reservoir volume (eini + efin) / 2 [hm³], and a/b are the slope and intercept of the active piecewise-linear segment.
When segments has more than one entry, update_lp() selects the active segment based on the reservoir's current volume (from the previous LP solve) and dynamically updates the LP constraint coefficients.
PLP origin
This element generalises the PLP "Ralco" constraint (plpralco.dat, genpdralco.f).
JSON Example
{ "uid": 1, "name": "ddl_ralco", "reservoir": "RALCO", "segments": [ { "volume": 0.0, "slope": 0.069868, "intercept": 15.787 }, { "volume": 757.0, "slope": 0.13985, "intercept": 57.454 } ] }
Namespaces
- namespace gtopt
Classes
- struct gtopt::ReservoirDischargeLimit
- Volume-dependent discharge limit for a reservoir.
- struct gtopt::ReservoirDischargeLimitCoeffs
- LP constraint coefficients for the drawdown limit.
- struct gtopt::ReservoirDischargeLimitSegment
- One segment of the piecewise-linear drawdown limit curve.