Skip to content

Commit eda4c99

Browse files
committed
fix minor error
1 parent 9e288e7 commit eda4c99

File tree

1 file changed

+1
-6
lines changed

1 file changed

+1
-6
lines changed

scripts/pypsa-de/solve_regret.py

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -138,12 +138,7 @@ def fix_capacities(realization, decision, scope="DE", strict=False):
138138

139139
# Above several assets are switched to extendable again, for these the p_nom value is restored to the value from the decision network
140140

141-
_idx = new.query(f"{attr}_extendable")
142-
143-
if not _idx.difference(extendable_i).empty:
144-
raise ValueError(
145-
"Assets that are not extendable in the decision network have been set to extendable. This should not happen. Aborting."
146-
)
141+
_idx = new.query(f"{attr}_extendable").index
147142

148143
new.loc[_idx, attr] = deci.loc[_idx, attr]
149144

0 commit comments

Comments
 (0)