Skip to content

Commit 9fa9709

Browse files
authored
fix: small fix for new api (PyPSA#1331)
1 parent 8e15129 commit 9fa9709

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

pypsa/network/power_flow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -463,7 +463,7 @@ def apply_transformer_types(n: Network) -> None:
463463

464464
missing_types = pd.Index(
465465
n.c.transformers.static.loc[trafos_with_types_b, "type"].unique()
466-
).difference(n.transformer_types.index)
466+
).difference(n.c.transformer_types.static.index)
467467
if not missing_types.empty:
468468
msg = (
469469
f"The type(s) {', '.join(missing_types)} do(es) not exist in "
@@ -475,7 +475,7 @@ def apply_transformer_types(n: Network) -> None:
475475
# (joining pulls in "phase_shift", "s_nom", "tap_side" from TransformerType)
476476
t = n.c.transformers.static.loc[
477477
trafos_with_types_b, ["type", "tap_position", "num_parallel"]
478-
].join(n.transformer_types, on="type")
478+
].join(n.c.transformer_types.static, on="type")
479479

480480
t["r"] = t["vscr"] / 100.0
481481
t["x"] = np.sqrt((t["vsc"] / 100.0) ** 2 - t["r"] ** 2)

0 commit comments

Comments
 (0)