Merge pull request #1002 from PyPSA/rename-existing-capacities
Rename existing capacities
This commit is contained in:
commit
282651cfba
@ -172,6 +172,8 @@ Upcoming Release
|
|||||||
|
|
||||||
* Fix error with `symbol` of `buses` in `simplify_network`.
|
* Fix error with `symbol` of `buses` in `simplify_network`.
|
||||||
|
|
||||||
|
* Fix index of existing capacities in `add_power_capacities_installed_before_baseyear` with `m` option.
|
||||||
|
|
||||||
PyPSA-Eur 0.10.0 (19th February 2024)
|
PyPSA-Eur 0.10.0 (19th February 2024)
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
|
@ -259,13 +259,21 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas
|
|||||||
|
|
||||||
# for offshore the splitting only includes coastal regions
|
# for offshore the splitting only includes coastal regions
|
||||||
inv_ind = [
|
inv_ind = [
|
||||||
i for i in inv_ind if (i + name_suffix) in n.generators.index
|
i
|
||||||
|
for i in inv_ind
|
||||||
|
if (i + name_suffix)
|
||||||
|
in n.generators.index.str.replace(
|
||||||
|
str(baseyear), str(grouping_year)
|
||||||
|
)
|
||||||
]
|
]
|
||||||
|
|
||||||
p_max_pu = n.generators_t.p_max_pu[
|
p_max_pu = n.generators_t.p_max_pu[
|
||||||
[i + name_suffix for i in inv_ind]
|
[i + name_suffix for i in inv_ind]
|
||||||
]
|
]
|
||||||
p_max_pu.columns = [i + name_suffix for i in inv_ind]
|
p_max_pu.columns = [
|
||||||
|
i + name_suffix.replace(str(grouping_year), str(baseyear))
|
||||||
|
for i in inv_ind
|
||||||
|
]
|
||||||
|
|
||||||
n.madd(
|
n.madd(
|
||||||
"Generator",
|
"Generator",
|
||||||
|
Loading…
Reference in New Issue
Block a user