correct placement of if/else

This commit is contained in:
martacki 2021-07-02 10:04:22 +02:00
parent d78f8b3e65
commit 89631b240a

View File

@ -363,12 +363,11 @@ if __name__ == "__main__":
if snakemake.wildcards.simpl:
n, cluster_map = cluster(n, int(snakemake.wildcards.simpl))
busmaps.append(cluster_map)
update_p_nom_max(n)
else:
n.buses = n.buses.drop(['symbol', 'tags', 'under_construction', 'substation_lv', 'substation_off'], axis=1)
update_p_nom_max(n)
n.export_to_netcdf(snakemake.output.network)
busmap_s = reduce(lambda x, y: x.map(y), busmaps[1:], busmaps[0])