gtopt::Junction struct

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

OptActive active
Activation status (default: active).
OptName description
OptBool drain
OptReal drain_capacity
OptReal drain_cost
Name name
Human-readable junction name.
OptName type
Optional element type/category tag.
Uid uid
Unique identifier.

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_cost (default 0) and bounded above by drain_capacity (default +∞). A bounded / costed drain lets plp2gtopt / plexos2gtopt encode "spill to the ocean" semantics directly on the central's own junction instead of synthesising a per-central <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.