fix to restore compatibility with PyPSA v0.26.0

This commit is contained in:
Fabian Neumann 2023-12-12 18:18:03 +01:00
parent dffe784704
commit c304738ea5
2 changed files with 6 additions and 0 deletions

View File

@ -469,6 +469,9 @@ if __name__ == "__main__":
n = pypsa.Network(snakemake.input.network)
# remove integer outputs for compatibility with PyPSA v0.26.0
n.generators.drop("n_mod", axis=1, inplace=True, errors='ignore')
exclude_carriers = params.cluster_network["exclude_carriers"]
aggregate_carriers = set(n.generators.carrier) - set(exclude_carriers)
conventional_carriers = set(params.conventional_carriers)

View File

@ -536,6 +536,9 @@ if __name__ == "__main__":
n = pypsa.Network(snakemake.input.network)
Nyears = n.snapshot_weightings.objective.sum() / 8760
# remove integer outputs for compatibility with PyPSA v0.26.0
n.generators.drop("n_mod", axis=1, inplace=True, errors='ignore')
n, trafo_map = simplify_network_to_380(n)
technology_costs = load_costs(