Transmission Expansion Planning (TEP and MS TEP)¶
Requires pip install pyflow-acdc[OPF] plus Bonmin/Ipopt (see Installation).
This page covers static TEP (one investment snapshot, one operating state) and multi-scenario TEP (MS TEP) (one expansion plan, several clustered operating scenarios). Multi-period planning is in Multi-period Transmission Expansion Planning (MP TEP and MP+MS TEP). Grid fundamentals are in Usage Guide.
After expandable grid setup (step 1), pick one driver for step 2:
transmission_expansion() (static TEP) or
multi_scenario_TEP() (MS TEP).
Workflow¶
1. Prepare an expandable grid¶
nodes and branches
add_gen()(withinstallation_cost)add_RenSource()(withbase_cost)expandable table →
expand_elements_from_pd()Candidate line types — expandable, reconducting, and conductor size selection (CSS) — are modelled in AC System Modelling.
Bundled examples: pyf.cases["case118_TEP"]() (static TEP),
pyf.cases["NS_MTDC_2025"](expandable="step") (MS TEP with time series).
Grid CSVs and precomputed clusters live under examples/North_Sea_grid_data/
(see that folder’s README for expandable="mp" vs "step").
For MS TEP on price-zone cases, set social cost in ObjRule with the key
"PZ_cost_of_generation" (not "Price_Zones"). See Optimal Power Flow Module for all
objective component keys.
2. Run¶
Pick one of the following.
Static TEP — one investment snapshot, one operational state:
import pyflow_acdc as pyf
build_only = not pyf.is_pyomo_solver_available("ipopt")
grid, res = pyf.cases["case118_TEP"]()
obj = {'Energy_cost': 1}
model, results, timing, stats = pyf.transmission_expansion(
grid,
solver="ipopt",
ObjRule=obj,
build_only=build_only,
)
res.all()
The static TEP example uses solver="ipopt" for fast doc tests. For production
MINLP solves, prefer solver="bonmin".
MS TEP — one expansion plan, several clustered operating scenarios.
Attach time series with add_TimeSeries() (see Time Series Modifications),
set clustering_options (see Time-Series Clustering), then call
multi_scenario_TEP():
import pyflow_acdc as pyf
from pyflow_tests.test_constants import north_sea_ms_clustering_options
build_only = True
grid, res = pyf.cases["NS_MTDC_2025"](years_data="23,24", expandable="step", online=False)
model, model_results, timing_info, solver_stats, ts_results = pyf.multi_scenario_TEP(
grid,
ObjRule={"PZ_cost_of_generation": 1},
clustering_options=north_sea_ms_clustering_options(),
solver="ipopt",
tee=True,
obj_scaling=1e6,
build_only=build_only,
)
The MS TEP example also uses solver="ipopt" and build_only=True in doc
tests; prefer solver="bonmin" for production solves with binary expansion
decisions, and omit build_only for a full solve.
Example cases¶
pyf.cases['case118_TEP']()pyf.cases['case39']()pyf.cases['case39_acdc']()pyf.cases['NS_MTDC_2025'](years_data="23,24", expandable="step")(MS TEP; data inexamples/North_Sea_grid_data/)
See Usage Guide for the full catalogue.