forked from open-energy-transition/pypsa-eur
-
Notifications
You must be signed in to change notification settings - Fork 19
doc: create rules overview for SB and CBA rules #761
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
Merged
Merged
Changes from 12 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
bb8471e
doc: improve Open-TYNDP doc formatting
tgilon 5b92658
doc: add missing defaults
tgilon 0353021
doc: update typehints
tgilon 6cd9d99
doc: add release note
tgilon f14de9c
Merge branch 'merge-upstream-260617' into doc/format-docstrings
tgilon 2e5a14c
Merge branch 'merge-upstream-260617' into doc/format-docstrings
tgilon cddca82
doc: create open-tyndp rule documentation
tgilon f601b3e
chore: use scripts path provider
tgilon bc08555
fix: fix typo in retrieve_cba_guidelines_reference_projects
tgilon 5863207
fix: change table format to markdown
tgilon 9237d71
fix: use proper lists and links in make_indicators
tgilon f4e1207
doc: add release note
tgilon ee8ca44
Merge branch 'master' into doc/document-tyndp-rules
tgilon de73f54
Apply suggestions from code review
tgilon 0447ec5
refactor: rename collect_indicators to combine_indicators
tgilon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,140 @@ | ||
| <!-- SPDX-FileCopyrightText: Contributors to Open-TYNDP <https://github.com/open-energy-transition/open-tyndp> --> | ||
| <!-- SPDX-License-Identifier: CC-BY-4.0 --> | ||
|
|
||
| # Cost-Benefit Analysis (CBA) | ||
|
|
||
| The Cost-Benefit Analysis (CBA) workflow is implemented in `rules/cba.smk`. Rules are organised into stages: `Retrieve`, `Build MSV`, `Build rolling`, `Postprocess`, `Benchmarking` and `Collect`. | ||
|
|
||
| ## Retrieve | ||
|
|
||
| ### Rule `retrieve_tyndp_cba_projects` | ||
|
|
||
| Downloads the CBA project explorer dataset, containing project definitions. | ||
|
|
||
| ### Rule `retrieve_tyndp_cba_non_co2_emissions` | ||
|
|
||
| Downloads non-CO₂ emission factors (NOx, SO₂, PM, etc.) used to compute B4 indicators. | ||
|
|
||
| ### Rule `retrieve_cba_guidelines_reference_projects` | ||
|
|
||
| Downloads the CBA Implementation Guidelines reference project table | ||
| (`table_B1_CBA_Implementations_Guidelines_TYNDP2024.csv`) used to reconcile SB investments | ||
| with CBA project definitions. | ||
|
|
||
| ### Rule `retrieve_presolved_sb_networks` | ||
|
|
||
| Downloads pre-solved SB networks from a previous Open-TYNDP release for use as CBA inputs | ||
| when `cba.cba_scenario_input.use_presolved` is `true`. | ||
|
|
||
| ## Build MSV | ||
|
|
||
| ### Rule `clean_projects` *(checkpoint)* | ||
|
|
||
| ::: clean_projects | ||
|
|
||
| ### Rule `clean_tyndp_indicators` | ||
|
|
||
| ::: clean_tyndp_indicators | ||
|
|
||
| ### Rule `simplify_sb_network` | ||
|
|
||
| ::: simplify_sb_network | ||
|
|
||
| ### Rule `fix_reference_sb_to_cba` | ||
|
|
||
| ::: fix_reference_sb_to_cba | ||
|
|
||
| ### Rule `prepare_reference` | ||
|
|
||
| ::: prepare_reference | ||
|
|
||
| ### Rule `build_msv_snapshot_weightings` | ||
|
|
||
| ::: build_msv_snapshot_weightings | ||
|
|
||
| ### Rule `solve_cba_msv_extraction` | ||
|
|
||
| ::: solve_cba_msv_extraction | ||
|
|
||
| ## Build rolling | ||
|
|
||
| ### Rule `prepare_rolling_horizon` | ||
|
|
||
| ::: prepare_rolling_horizon | ||
|
|
||
| ### Rule `prepare_project` | ||
|
|
||
| ::: prepare_project | ||
|
|
||
| ### Rule `solve_cba_reference_network` | ||
|
|
||
| Solves the reference network using the rolling horizon approach. Shares the script with | ||
| [`solve_cba_network`](#rule-solve_cba_network). | ||
|
|
||
| ::: solve_cba_network | ||
|
|
||
| ### Rule `solve_cba_network` | ||
|
|
||
| Solves the CBA network using the rolling horizon approach. Shares the script with [`solve_cba_reference_network`](#rule-solve_cba_reference_network). | ||
|
|
||
| ::: solve_cba_network | ||
|
|
||
| ## Postprocess | ||
|
|
||
| ### Rule `make_indicators` | ||
|
|
||
| ::: make_indicators | ||
|
|
||
| ### Rule `collect_indicators` | ||
|
tgilon marked this conversation as resolved.
Outdated
|
||
|
|
||
| ::: collect_indicators | ||
|
|
||
| ### Rule `plot_indicators` | ||
|
|
||
| ::: plot_indicators | ||
|
|
||
| ## Benchmarking | ||
|
|
||
| ### Rule `plot_cba_benchmark` | ||
|
|
||
| Plots per-project indicator benchmarking charts comparing computed indicators against | ||
| TYNDP 2024 reference values. Shares the script with [`plot_weather_benchmark`](#rule-plot_weather_benchmark). | ||
|
|
||
| ::: plot_benchmark_indicators | ||
|
|
||
| ### Rule `plot_weather_benchmark` | ||
|
|
||
| Plots weather ensemble benchmarking charts from indicators aggregated across climate years. | ||
| Shares the script with [`plot_cba_benchmark`](#rule-plot_cba_benchmark). | ||
|
|
||
| ::: plot_benchmark_indicators | ||
|
|
||
| ### Rule `average_indicators_per_project_and_planning_horizon` | ||
|
|
||
| ::: average_indicators | ||
|
|
||
| ### Rule `summarize_indicators_per_project` | ||
|
|
||
| ::: summarize_indicators | ||
|
|
||
| ### Rule `summarize_all_indicators` | ||
|
|
||
| ::: summarize_all | ||
|
|
||
| ## Collect | ||
|
|
||
| Aggregate rules that run the corresponding base rule across all configured wildcards. They do not have dedicated scripts. | ||
|
|
||
| ### Rule `prepare_references` | ||
|
|
||
| Aggregate [`prepare_reference`](#rule-prepare_reference) outputs. | ||
|
|
||
| ### Rule `collect_cba_scenario` | ||
|
|
||
| Collects all per-scenario outputs (indicator plots, benchmark charts) into a single target | ||
| for a single climate year run (e.g. `NT-cy2009`). | ||
|
|
||
| ### Rule `cba` | ||
|
|
||
| Top-level target rule. Collects ensemble outputs from all climate year runs in a collection | ||
| scenario (e.g. `NT-cyears`) and the per-scenario results from nested runs. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.