gtopt/flow_right.hpp file

Flow-based water right (derechos de caudal)

Defines the FlowRight structure representing a flow-based water right. It tracks the required extraction rate (m³/s) that right holders are entitled to. When a junction is set, the flow is always consumptive: it subtracts from the junction's physical water balance.

The direction is always outflow (consumptive extraction from the river system), fixed and not configurable.

A purpose field indicates the right's use case (irrigation, generation, environmental, etc.) — all share the same LP structure.

Unit conventions

  • Flow fields (discharge, fmax): m³/s
  • Cost fields (fail_cost): $/m³/s·h (penalty per unit of unmet flow demand per hour)

JSON Example

{
  "uid": 1,
  "name": "laja_nuevo_riego",
  "purpose": "irrigation",
  "junction": "laja_downstream",
  "discharge": [0, 0, 0, 0, 19.5, 42.25, 55.25, 65, 65, 52, 32.5, 13],
  "fail_cost": 5000
}

Namespaces

namespace gtopt

Classes

struct gtopt::FlowRight
Flow-based water right (derechos de caudal)