Merge branch 'master' into fix_energy_totals

This commit is contained in:
Toni Seibold 2024-03-25 16:49:20 +01:00 committed by GitHub
commit 639a0ce4af
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 3 additions and 3 deletions

View File

@ -106,7 +106,7 @@ def get_run_path(fn, dir, rdir, shared_resources):
elif isinstance(shared_resources, str): elif isinstance(shared_resources, str):
rdir = shared_resources + "/" rdir = shared_resources + "/"
elif isinstance(shared_resources, bool): elif isinstance(shared_resources, bool):
rdir = "" rdir = "" if shared_resources else rdir
else: else:
raise ValueError( raise ValueError(
"shared_resources must be a boolean, str, or 'base' for special handling." "shared_resources must be a boolean, str, or 'base' for special handling."

View File

@ -231,7 +231,7 @@ def distribute_clusters(n, n_clusters, focus_weights=None, solver_name="scip"):
.pipe(normed) .pipe(normed)
) )
N = n.buses.groupby(["country", "sub_network"]).size() N = n.buses.groupby(["country", "sub_network"]).size()[L.index]
assert ( assert (
n_clusters >= len(N) and n_clusters <= N.sum() n_clusters >= len(N) and n_clusters <= N.sum()
@ -454,7 +454,7 @@ if __name__ == "__main__":
if "snakemake" not in globals(): if "snakemake" not in globals():
from _helpers import mock_snakemake from _helpers import mock_snakemake
snakemake = mock_snakemake("cluster_network", simpl="", clusters="5") snakemake = mock_snakemake("cluster_network", simpl="", clusters="40")
configure_logging(snakemake) configure_logging(snakemake)
set_scenario_config(snakemake) set_scenario_config(snakemake)