Clarify suffix usage in add existing baseyear
This commit is contained in:
parent
5ecd56d53c
commit
509f7e614f
@ -181,6 +181,8 @@ Upcoming Release
|
||||
|
||||
* Fix custom busmap read in `cluster_network`.
|
||||
|
||||
* Clarify suffix usage in `add_existing_baseyear`.
|
||||
|
||||
PyPSA-Eur 0.10.0 (19th February 2024)
|
||||
=====================================
|
||||
|
||||
|
@ -152,7 +152,7 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas
|
||||
|
||||
technology_to_drop = ["Pv", "Storage Technologies"]
|
||||
|
||||
# drop unused fueltyps and technologies
|
||||
# drop unused fueltypes and technologies
|
||||
df_agg.drop(df_agg.index[df_agg.Fueltype.isin(fueltype_to_drop)], inplace=True)
|
||||
df_agg.drop(df_agg.index[df_agg.Technology.isin(technology_to_drop)], inplace=True)
|
||||
df_agg.Fueltype = df_agg.Fueltype.map(rename_fuel)
|
||||
@ -230,6 +230,7 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas
|
||||
]
|
||||
suffix = "-ac" if generator == "offwind" else ""
|
||||
name_suffix = f" {generator}{suffix}-{grouping_year}"
|
||||
name_suffix_by = f" {generator}{suffix}-{baseyear}"
|
||||
asset_i = capacity.index + name_suffix
|
||||
if generator in ["solar", "onwind", "offwind"]:
|
||||
# to consider electricity grid connection costs or a split between
|
||||
@ -259,21 +260,11 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas
|
||||
|
||||
# for offshore the splitting only includes coastal regions
|
||||
inv_ind = [
|
||||
i
|
||||
for i in inv_ind
|
||||
if (i + name_suffix)
|
||||
in n.generators.index.str.replace(
|
||||
str(baseyear), str(grouping_year)
|
||||
)
|
||||
i for i in inv_ind if (i + name_suffix_by) in n.generators.index
|
||||
]
|
||||
|
||||
p_max_pu = n.generators_t.p_max_pu[
|
||||
[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
|
||||
]
|
||||
p_max_pu = n.generators_t.p_max_pu[[i + name_suffix_by for i in inv_ind]]
|
||||
p_max_pu.columns = [i + name_suffix for i in inv_ind]
|
||||
|
||||
n.madd(
|
||||
"Generator",
|
||||
@ -291,15 +282,13 @@ def add_power_capacities_installed_before_baseyear(n, grouping_years, costs, bas
|
||||
)
|
||||
|
||||
else:
|
||||
p_max_pu = n.generators_t.p_max_pu[
|
||||
capacity.index + f" {generator}{suffix}-{baseyear}"
|
||||
]
|
||||
p_max_pu = n.generators_t.p_max_pu[capacity.index + name_suffix_by]
|
||||
|
||||
if not new_build.empty:
|
||||
n.madd(
|
||||
"Generator",
|
||||
new_capacity.index,
|
||||
suffix=" " + name_suffix,
|
||||
suffix=name_suffix,
|
||||
bus=new_capacity.index,
|
||||
carrier=generator,
|
||||
p_nom=new_capacity,
|
||||
@ -412,7 +401,7 @@ def add_heating_capacities_installed_before_baseyear(
|
||||
linear decommissioning of heating capacities from 2020 to 2045 is
|
||||
currently assumed heating capacities split between residential and
|
||||
services proportional to heating load in both 50% capacities
|
||||
in rural busess 50% in urban buses
|
||||
in rural buses 50% in urban buses
|
||||
"""
|
||||
logger.debug(f"Adding heating capacities installed before {baseyear}")
|
||||
|
||||
|
@ -313,7 +313,7 @@ def chemicals_industry():
|
||||
df.loc["methane", sector] += s_fec["Natural gas"]
|
||||
|
||||
# LPG and other feedstock materials are assimilated to naphtha
|
||||
# since they will be produced through Fischer-Tropsh process
|
||||
# since they will be produced through Fischer-Tropsch process
|
||||
sel = [
|
||||
"Solids",
|
||||
"Refinery gas",
|
||||
|
Loading…
Reference in New Issue
Block a user