Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

set s_max_pu to the value according to config #1323

Merged
merged 1 commit into from
Sep 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions rules/build_electricity.smk
Original file line number Diff line number Diff line change
Expand Up @@ -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"),
Expand Down
3 changes: 3 additions & 0 deletions scripts/build_transmission_projects.py
Original file line number Diff line number Diff line change
Expand Up @@ -482,6 +482,7 @@ def fill_length_from_geometry(line, line_factor=1.2):
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)

Expand Down Expand Up @@ -543,6 +544,8 @@ def fill_length_from_geometry(line, line_factor=1.2):
* 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"
Expand Down
Loading