simplify_networks: add control for removing stubs II
This commit is contained in:
parent
780834ad87
commit
bb5c5bd143
@ -532,6 +532,10 @@ if __name__ == "__main__":
|
|||||||
n, technology_costs, snakemake.config, snakemake.output, aggregation_strategies
|
n, technology_costs, snakemake.config, snakemake.output, aggregation_strategies
|
||||||
)
|
)
|
||||||
|
|
||||||
|
busmaps = [trafo_map, simplify_links_map]
|
||||||
|
|
||||||
|
cluster_config = snakemake.config["clustering"]["simplify_network"]
|
||||||
|
if cluster_config.get("remove_stubs", True):
|
||||||
n, stub_map = remove_stubs(
|
n, stub_map = remove_stubs(
|
||||||
n,
|
n,
|
||||||
technology_costs,
|
technology_costs,
|
||||||
@ -539,15 +543,9 @@ if __name__ == "__main__":
|
|||||||
snakemake.output,
|
snakemake.output,
|
||||||
aggregation_strategies=aggregation_strategies,
|
aggregation_strategies=aggregation_strategies,
|
||||||
)
|
)
|
||||||
|
busmaps.append(stub_map)
|
||||||
|
|
||||||
busmaps = [trafo_map, simplify_links_map, stub_map]
|
if cluster_config.get("to_substations", False):
|
||||||
|
|
||||||
cluster_config = snakemake.config.get("clustering", {}).get("simplify_network", {})
|
|
||||||
if (
|
|
||||||
cluster_config.get("clustering", {})
|
|
||||||
.get("simplify_network", {})
|
|
||||||
.get("to_substations", False)
|
|
||||||
):
|
|
||||||
n, substation_map = aggregate_to_substations(n, aggregation_strategies)
|
n, substation_map = aggregate_to_substations(n, aggregation_strategies)
|
||||||
busmaps.append(substation_map)
|
busmaps.append(substation_map)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user