flow_right_lp.hpp file
LP representation of flow-based water rights.
Each FlowRight installs a single LP column flow_b per (scenario, stage, block) bounded by the hard physical band [fmin_b, fmax_b].
When the target schedule is set, the kink at target is expressed via two non-negative slacks (excess = sp, fail = sn) and one equality row (flow_kink):
flow_b − excess_b + fail_b = target_b excess_b ≥ 0, cost(excess_b) = -uvalue·cf (bonus above target) fail_b ≥ 0, cost(fail_b) = +fcost·cf (penalty below target)
When use_average is true, the same kink machinery is applied at stage scope to a single qeh column instead of per-block — see attach_kink in flow_right_lp.cpp. Per-block flow columns then carry only their [fmin_b, fmax_b] bounds; all target / cost logic lives at the stage layer.
The flow right is NOT part of the hydrological topology by itself: it creates its own columns and constraints for rights accounting and subtracts the per-block flow from the upstream Junction balance when the junction reference is set.
Namespaces
- namespace gtopt
Classes
- class gtopt::FlowRightLP