gtopt/right_bound_rule.hpp file

Volume-dependent piecewise-linear bound rule for water rights.

Defines the RightBoundRule structure for dynamically computing FlowRight/VolumeRight upper bounds based on a referenced reservoir's current volume. Used by FlowRightLP::update_lp and VolumeRightLP::update_lp to implement PLP-style cushion zone logic (Laja 4-zone, Maule 3-zone).

The piecewise-linear function maps reservoir volume to a max bound: bound = constant_i + slope_i * V (for active segment i)

Segment format matches ReservoirSeepageSegment: each segment's constant is the y-intercept at V=0, with continuity at breakpoints.

Laja cushion zone example

Rights_irr = 570 + 0.00*min(V,1200) + 0.40*min(max(V-1200,0),700)
           + 0.25*max(V-1900,0)

maps to segments:

[
  {"volume": 0,    "slope": 0.00, "constant": 570},
  {"volume": 1200, "slope": 0.40, "constant": 90},
  {"volume": 1900, "slope": 0.25, "constant": 375}
]

with cap = 5000.

Namespaces

namespace gtopt

Classes

struct gtopt::RightBoundRule
Volume-dependent bound rule for water rights.
struct gtopt::RightBoundSegment
One segment of a piecewise-linear bound function.