gtopt::RightBoundRule struct

Volume-dependent bound rule for water rights.

Defines a piecewise-linear function from a reservoir's volume to the maximum allowed flow/extraction bound. When attached to a FlowRight or VolumeRight, the LP column upper bound is dynamically updated via update_lp using this rule.

Public variables

OptReal cap
OptReal floor
Minimum floor on the computed bound. When unset, defaults to 0.
SingleId reservoir
Reference reservoir whose volume drives the bound computation.
std::vector<RightBoundSegment> segments

Variable documentation

OptReal gtopt::RightBoundRule::cap

Maximum cap on the computed bound (e.g., 5000 m3/s for Laja irrigation rights). When unset, no upper cap is applied.

std::vector<RightBoundSegment> gtopt::RightBoundRule::segments

Piecewise-linear segments (sorted ascending by volume breakpoint). When empty, the bound rule has no effect.