gtopt::ReservoirSeepage struct

Piecewise-linear seepage model between a waterway and a reservoir.

Models water seepage from a waterway into an adjacent reservoir. The seepage flow per block is: seepage_flow = slope × V_avg + constant where V_avg = (eini + efin) / 2 is the average reservoir volume and constant is the y-intercept (seepage at V = 0 for the active segment's linear equation). This matches the PLP Fortran formula (FiltConst + FiltPend × Vol).

slope and constant accept per-stage schedules (scalar, array, or filename pointing to a Parquet/CSV table in input_directory/ReservoirSeepage/). This is the PLP plpmanfi.dat model: the LP matrix coefficients (slope on eini/efin columns) and the RHS (constant y-intercept) are set directly in the LP for each stage, not via LP bounds.

When segments is non-empty, the piecewise-linear volume-dependent update (via ReservoirSeepageLP::update_lp) takes precedence and overrides any per-stage schedule values for the active-segment coefficient.

Public variables

OptActive active
Operational status (default: active)
OptTRealFieldSched constant
Name name
Human-readable name.
SingleId reservoir
ID of the receiving reservoir.
std::vector<ReservoirSeepageSegment> segments
OptTRealFieldSched slope
Uid uid
Unique identifier.
SingleId waterway
ID of the source waterway.

Variable documentation

OptTRealFieldSched gtopt::ReservoirSeepage::constant

Y-intercept seepage rate [m³/s] – scalar, per-stage array, or filename. When segments is empty, this provides the LP RHS (seepage at V=0). Accepts the same "number | array | filename" syntax. Default is 0.0.

std::vector<ReservoirSeepageSegment> gtopt::ReservoirSeepage::segments

Piecewise-linear segments for volume-dependent seepage rate. When non-empty, the active segment is selected per-phase based on the current reservoir volume (range selection: largest breakpoint ≤ V) and the LP coefficients are updated dynamically (via ReservoirSeepageLP::update_lp). Each segment's constant is the y-intercept at V=0 (PLP FiltParam(PFiltConst) format, not the value at the breakpoint).

OptTRealFieldSched gtopt::ReservoirSeepage::slope

Seepage slope [m³/s per hm³] – scalar, per-stage array, or filename. When segments is empty, this provides the LP coefficient on V_avg. Accepts the same "number | array | filename" syntax as other schedule fields (e.g. Reservoir::emin). The default is 0.0.