Junction struct
#include <gtopt/junction.hpp>
Hydraulic node in a hydro cascade network.
A junction is the analogue of an electrical bus in the hydraulic network. Water can arrive from upstream waterways (flows in), leave to downstream waterways (flows out), be stored in a reservoir, or leave the system through a drain junction (e.g., the sea or an evaporation sink).
Public static variables
- static LPClassName class_name
Public variables
Variable documentation
static LPClassName gtopt:: Junction:: class_name
Canonical class-name constant used in LP row labels and config fields like VariableScale::class_name. Single source of truth — JunctionLP exposes no separate ClassName member; callers reach the constant via Junction::class_name directly (or JunctionLP::Element::class_name in generic contexts).
OptName gtopt:: Junction:: description
Optional free-text description (e.g. conversion provenance)
OptBool gtopt:: Junction:: drain
If true, excess water at this junction can leave the system through a free outflow column (the per-block "drain") priced at drain_<central>_ocean Junction + a connecting _ver Waterway with fmax = VertMax / fcost = CVert. Both encodings produce the same LP — the junction-level form just saves one Junction + one Waterway per terminal central.
OptReal gtopt:: Junction:: drain_capacity
Upper bound [m³/s] on the drain column (default +∞). Matches PLP's VertMax and PLEXOS's Waterway.Max Flow / Storage.Max Spill. Ignored unless drain is true.
OptReal gtopt:: Junction:: drain_cost
Per-(m³/s)·h cost on the drain column (default 0). Matches PLP's CVert / Costo de Rebalse and PLEXOS's Waterway.Max Flow Penalty / Storage.Spill Penalty. Ignored unless drain is true.