Merge remote-tracking branch 'origin/master' into fneum/energy_totals

This commit is contained in:
Fabian Neumann 2024-03-05 13:40:49 +01:00
commit 9d0724566c
4 changed files with 12 additions and 5 deletions

View File

@ -667,7 +667,7 @@ industry:
# docs in https://pypsa-eur.readthedocs.io/en/latest/configuration.html#costs
costs:
year: 2030
version: v0.8.0
version: v0.8.1
rooftop_share: 0.14 # based on the potentials, assuming (0.1 kW/m2 and 10 m2/person)
social_discountrate: 0.02
fill_values:

View File

@ -9,6 +9,7 @@ Release Notes
Upcoming Release
================
* Upgrade default techno-economic assumptions to ``technology-data`` v0.8.1.
* Linearly interpolate missing investment periods in year-dependent
configuration options.

View File

@ -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
@ -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,
@ -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"],
@ -541,6 +546,7 @@ def add_heating_capacities_installed_before_baseyear(
)
# %%
if __name__ == "__main__":
if "snakemake" not in globals():
from _helpers import mock_snakemake
@ -552,7 +558,7 @@ if __name__ == "__main__":
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,
)

View File

@ -267,7 +267,7 @@ def distribute_clusters(n, n_clusters, focus_weights=None, solver_name="scip"):
m.objective = (clusters * clusters - 2 * clusters * L * n_clusters).sum()
if solver_name == "gurobi":
logging.getLogger("gurobipy").propagate = False
elif solver_name != "scip":
elif solver_name not in ["scip", "cplex"]:
logger.info(
f"The configured solver `{solver_name}` does not support quadratic objectives. Falling back to `scip`."
)