Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion scripts/solve/solve_network.py
Original file line number Diff line number Diff line change
Expand Up @@ -439,7 +439,9 @@ def apply_line_rating_overrides(network, scenario_config, logger):

# ── 1. Voltage floor ─────────────────────────────────────────────────────
min_v = float(transmission.get('min_bm_constraint_voltage_kv', 0))
if min_v > 0:
# Skip when the network has no lines (e.g. the Zonal network models inter-zone
# links and carries no lines / no 'v_nom' column) — indexing it would KeyError.
if min_v > 0 and not network.lines.empty and 'v_nom' in network.lines.columns:
# Only applies to lines — transformers span two voltage levels so v_nom
# is ambiguous, and transformer constraints are not the source of loop-flow
# artefacts in the Highland 132 kV network.
Expand Down