build_transmission_projects: set s_max_pu to the value according to config (#1323)

This commit is contained in:
Philipp Glaum 2024-09-25 16:58:35 +02:00 committed by GitHub
parent 24e0ddd5a6
commit d4bad07cf4
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 4 additions and 0 deletions

View File

@ -386,6 +386,7 @@ rule build_transmission_projects:
params:
transmission_projects=config_provider("transmission_projects"),
line_factor=config_provider("lines", "length_factor"),
s_max_pu=config_provider("lines", "s_max_pu"),
input:
base_network=resources("networks/base.nc"),
offshore_shapes=resources("offshore_shapes.geojson"),

View File

@ -482,6 +482,7 @@ if __name__ == "__main__":
set_scenario_config(snakemake)
line_factor = snakemake.params.line_factor
s_max_pu = snakemake.params.s_max_pu
n = pypsa.Network(snakemake.input.base_network)
@ -543,6 +544,8 @@ if __name__ == "__main__":
* new_lines_df["v_nom"]
* new_lines_df["num_parallel"]
).round(2)
# set s_max_pu
new_lines_df["s_max_pu"] = s_max_pu
if not new_links_df.empty:
# Add carrier types of lines and links
new_links_df["carrier"] = "DC"