-
Notifications
You must be signed in to change notification settings - Fork 1
feat: H2 myopic compatibility #61
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
base: master
Are you sure you want to change the base?
Conversation
…pacities from previous planning horizon
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for this PR!
While this feature is not strictly necessary, given that the TYNDP data does not provide any information on existing capacity or potential (no p_nom_min
or p_nom_max
defined), the approach taken is correct in its approach and ensures future compatibility. I assume that the investment candidates in the Investment Datasets/GRID.xlsx
file will generate other links. Do you have the same vision?
Also, could you please add a release note before sending it?
For the record, this approach is identical to the one used for offshore hubs (see here).
@@ -110,6 +113,36 @@ def add_brownfield( | |||
for tattr in n.component_attrs[c.name].index[selection]: | |||
n.import_series_from_dataframe(c.pnl[tattr], c.name, tattr) | |||
|
|||
# adjust TYNDP H2 pipeline expansion by subtracting existing capacity from previous years from current year total capacity and potential |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
# adjust TYNDP H2 pipeline expansion by subtracting existing capacity from previous years from current year total capacity and potential | |
# adjust TYNDP H2 pipeline expansion by subtracting existing capacity | |
# from previous years from current year total capacity and potential |
@@ -51,6 +52,8 @@ def add_brownfield( | |||
Ratio of hydrogen to methane capacity for pipeline retrofitting | |||
capacity_threshold : float | |||
Threshold for removing assets with low capacity | |||
h2_topology_tyndp : bool | |||
Whether to TYNDP H2 topology is used |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Whether to TYNDP H2 topology is used | |
Whether TYNDP H2 topology is used |
remaining_capacity = ( | ||
h2_pipe_capacity | ||
- existing_capacity_p.reindex(index=h2_pipe_capacity.index).fillna(0) | ||
).clip(lower=0) | ||
remaining_potential = ( | ||
h2_pipe_potential | ||
- existing_capacity_p.reindex(index=h2_pipe_capacity.index).fillna(0) | ||
).clip( | ||
lower=0 | ||
) # this should anyway never be negative. We will still clip to account for rounding errors |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
remaining_capacity = ( | |
h2_pipe_capacity | |
- existing_capacity_p.reindex(index=h2_pipe_capacity.index).fillna(0) | |
).clip(lower=0) | |
remaining_potential = ( | |
h2_pipe_potential | |
- existing_capacity_p.reindex(index=h2_pipe_capacity.index).fillna(0) | |
).clip( | |
lower=0 | |
) # this should anyway never be negative. We will still clip to account for rounding errors | |
# values should be non-negative; clipping applied to handle rounding errors | |
remaining_capacity = ( | |
h2_pipe_capacity | |
- existing_capacity_p.reindex(index=h2_pipe_capacity.index).fillna(0) | |
).clip(lower=0) | |
remaining_potential = ( | |
h2_pipe_potential | |
- existing_capacity_p.reindex(index=h2_pipe_capacity.index).fillna(0) | |
).clip( | |
lower=0 | |
) |
h2_pipelines_fixed_i = n.links[ | ||
(n.links.carrier == "H2 pipeline") & (n.links.build_year != year) | ||
].index | ||
h2_pipelines = n.links[ | ||
(n.links.carrier == "H2 pipeline") & (n.links.build_year == year) | ||
].index |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is probably too restrictive, given that the maximum capacity of the electrolysers is also specified in the Investment Datasets/TRAJECTORY.xlsx
file.
Discussed to put the PR on hold until investment candidates for H2 are added to the model (see #64). |
Changes proposed in this Pull Request
This PR proposes a first implementation to create compatibility for the TYNDP H2 topology with myopic foresight optimization. The PR proposes to subtract the optimal H2 grid capacities from previous planning horizons from the the capacities and potentials of the current optimization year.
Checklist
envs/environment.yaml
.config/config.default.yaml
.doc/configtables/*.csv
.config/test/*.yaml
.doc/data_sources.rst
.doc/release_notes.rst
is added.