Fix index for existing capacities in add_existing_baseyear
This commit is contained in:
parent
91c9dd2b82
commit
9dae86cd56
@ -164,6 +164,8 @@ Upcoming Release
|
|||||||
|
|
||||||
* Fix duplicated years in `add_land_use_constraint_m`.
|
* Fix duplicated years in `add_land_use_constraint_m`.
|
||||||
|
|
||||||
|
* 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)
|
||||||
=====================================
|
=====================================
|
||||||
|
|
||||||
|
@ -257,13 +257,14 @@ 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