Skip to content

Commit bc12ea8

Browse files
daniel-rdttgilon
andauthored
fix: remove deprecated dim parameter from linopy LinearExpression.groupby(...).sum() (#811)
* fix: remove deprecated dim parameter from linopy `LinearExpression.groupby(...).sum()` for compatibility with linopy > v0.9.0 * doc: add release note --------- Co-authored-by: Thomas Gilon <thomas.gilon@openenergytransition.org>
1 parent 5eff989 commit bc12ea8

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

doc/release_notes.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949

5050
* Remove unused `cba.methods` config option ([#805](https://github.com/open-energy-transition/open-tyndp/pull/805)).
5151

52+
* Remove `dim` argument from `.groupby(...).sum()` call in DSR daily dispatch constraint as it is no longer accepted by linopy >= 0.9.0 and no longer needed since groupby-sum always reduces the grouped dimension ([#811](https://github.com/open-energy-transition/open-tyndp/pull/811)).
53+
5254
**Documentation**
5355

5456
* Update benchmarking documentation tables and figures for v0.7.1 ([#711](https://github.com/open-energy-transition/open-tyndp/pull/711)).

scripts/solve_network.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1393,7 +1393,7 @@ def constrain_dsr_daily_dispatch(n: pypsa.Network, snapshots: pd.DatetimeIndex)
13931393
)
13941394

13951395
# calculate weighted daily energy
1396-
daily_energy = (p * weightings).groupby(day).sum(dim="snapshot")
1396+
daily_energy = (p * weightings).groupby(day).sum()
13971397

13981398
# calculate daily energy limit using p_nom and pemmdb_hours
13991399
rhs = xr.DataArray(

0 commit comments

Comments
 (0)