Skip to content

Commit

Permalink
Merge branch 'master' into cplexFix
Browse files Browse the repository at this point in the history
  • Loading branch information
aodenweller authored Feb 27, 2024
2 parents 58bcef4 + a5f7b11 commit 06a777d
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions scripts/add_existing_baseyear.py
Original file line number Diff line number Diff line change
Expand Up @@ -417,6 +417,11 @@ def add_heating_capacities_installed_before_baseyear(

nodes = pd.Index(n.buses.location[n.buses.index.str.contains(f"{name} heat")])

if (name_type != "central") and options["electricity_distribution_grid"]:
nodes_elec = nodes + " low voltage"
else:
nodes_elec = nodes

heat_pump_type = "air" if "urban" in name else "ground"

# Add heat pumps
Expand All @@ -440,7 +445,7 @@ def add_heating_capacities_installed_before_baseyear(
"Link",
nodes,
suffix=f" {name} {heat_pump_type} heat pump-{grouping_year}",
bus0=nodes,
bus0=nodes_elec,
bus1=nodes + " " + name + " heat",
carrier=f"{name} {heat_pump_type} heat pump",
efficiency=efficiency,
Expand All @@ -458,7 +463,7 @@ def add_heating_capacities_installed_before_baseyear(
"Link",
nodes,
suffix=f" {name} resistive heater-{grouping_year}",
bus0=nodes,
bus0=nodes_elec,
bus1=nodes + " " + name + " heat",
carrier=name + " resistive heater",
efficiency=costs.at[f"{name_type} resistive heater", "efficiency"],
Expand Down Expand Up @@ -541,6 +546,7 @@ def add_heating_capacities_installed_before_baseyear(
)


# %%
if __name__ == "__main__":
if "snakemake" not in globals():
from _helpers import mock_snakemake
Expand All @@ -552,7 +558,7 @@ def add_heating_capacities_installed_before_baseyear(
clusters="37",
ll="v1.0",
opts="",
sector_opts="1p7-4380H-T-H-B-I-A-dist1",
sector_opts="8760-T-H-B-I-A-dist1",
planning_horizons=2020,
)

Expand Down

0 comments on commit 06a777d

Please sign in to comment.