Skip to content
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
2 changes: 1 addition & 1 deletion doc/cba.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ The Cost-Benefit Analysis (CBA) evaluates transmission and storage projects by c

## CBA Workflow Methodology

The workflow evaluates projects using a **rolling horizon** approach where the full year is divided into sequential weekly windows (168 hourly snapshots each, with an overlap of 1 snapshot).
The workflow evaluates projects using a **rolling horizon** approach where the full year is divided into sequential weekly windows (168 hourly snapshots each, with an overlap of 1 snapshot). An overview of the CBA rules is documented at [CBA rules](cba_rules.md).

To resolve **myopia**—where the optimizer cannot see beyond the current week and makes suboptimal decisions for seasonal storage (H2, gas, large hydro)—the workflow uses Marginal Storage Values (MSV) derived from a full-year optimization.

Expand Down
142 changes: 142 additions & 0 deletions doc/cba_rules.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
<!-- 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 horizon`, `Postprocess` and `Benchmark`. In addition, a `Collect` stage provides convenient target rules that run the workflow up to a specific stage, aggregating each stage's output across all configured wildcards.

## 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

## Build rolling horizon

### Rule `prepare_rolling_horizon`

::: prepare_rolling_horizon

### Rule `prepare_project`

::: prepare_project

## Solve

### Rule `solve_cba_msv_extraction`

::: solve_cba_msv_extraction

### 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 `combine_indicators`

::: combine_indicators

### Rule `plot_indicators`

::: plot_indicators

## Benchmark

### 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.
47 changes: 0 additions & 47 deletions doc/plotting.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,14 +27,6 @@

::: plot_base_network

## Rule `plot_base_offshore_network`

::: plot_offshore_network

## Rule `plot_offshore_network`

::: plot_offshore_network

## Rule `plot_power_network_clustered`

::: plot_power_network_clustered
Expand All @@ -49,10 +41,6 @@

::: plot_power_network_perfect

## Rule `plot_base_hydrogen_network`

::: plot_base_hydrogen_network

## Rule `plot_hydrogen_network`

::: plot_hydrogen_network
Expand Down Expand Up @@ -93,38 +81,3 @@

::: plot_interactive_bus_balance

## Rule `clean_tyndp_output_benchmark`

::: clean_tyndp_output_benchmark

## Rule `clean_tyndp_report_benchmark`

::: clean_tyndp_report_benchmark

## Rule `clean_tyndp_vp_data`

::: clean_tyndp_vp_data

## Rule `build_statistics`

::: build_statistics

## Rule `make_benchmark`

::: make_benchmark

## Rule `plot_benchmark`

::: plot_benchmark

## Rule `launch_explorer`

::: launch_explorer

## Rule `launch_presolved_explorer`

Mirrors the `launch_explorer` rule to launch the `PyPSA-Explorer` web interface with pre-solved SB networks from previous Open-TYNDP release runs.

## Rule `close_explorers`

Closes all open local instances of launched PyPSA-Explorers and frees up used ports again.
52 changes: 0 additions & 52 deletions doc/preparation.md
Original file line number Diff line number Diff line change
Expand Up @@ -92,18 +92,10 @@ together into a detailed PyPSA network stored in `networks/base_s_{clusters}_ele

::: build_electricity_demand_base

## Rule `build_electricity_demand_base_tyndp`

::: build_electricity_demand_base

## Rule `build_electricity_demand` {#electricity_demand}

::: build_electricity_demand

## Rule `build_electricity_demand_tyndp`

::: build_electricity_demand

## Rule `build_hac_features`

::: build_hac_features
Expand Down Expand Up @@ -155,47 +147,3 @@ together into a detailed PyPSA network stored in `networks/base_s_{clusters}_ele
## Rule `prepare_network` {#prepare}

::: prepare_network

## Rule `prepare_pecd_release`

::: prepare_pecd_release

## Rule `clean_pecd_data`

::: clean_pecd_data

## Rule `build_renewable_profiles_pecd`

::: build_renewable_profiles_pecd

## Rule `clean_tyndp_hydro_inflows`

::: clean_tyndp_hydro_inflows

## Rule `build_tyndp_hydro_profile`

::: build_tyndp_hydro_profile

## Rule `build_pemmdb_data`

::: build_pemmdb_data

## Rule `build_tyndp_transmission_projects`

::: build_tyndp_transmission_projects

## Rule `build_tyndp_trajectories`

::: build_tyndp_trajectories

## Rule `clean_tyndp_electricity_demand`

::: clean_tyndp_electricity_demand

## Rule `clean_tyndp_smr`

::: clean_tyndp_smr

## Rule `clean_tyndp_h2_storages`

::: clean_tyndp_h2_storages
4 changes: 4 additions & 0 deletions doc/release_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,10 @@

* Improve docstring formatting and add missing type hints (https://github.com/open-energy-transition/open-tyndp/pull/759).

* Improve docstring formatting and add missing type hints ([759](https://github.com/open-energy-transition/open-tyndp/pull/759)).

* Create rules overview for SB and CBA rules ([761](https://github.com/open-energy-transition/open-tyndp/pull/761))

**Developers Note**

* Change GitHub issue templates to comply with ISO security checks ([#714](https://github.com/open-energy-transition/open-tyndp/pull/714), [#730](https://github.com/open-energy-transition/open-tyndp/pull/730)).
Expand Down
31 changes: 0 additions & 31 deletions doc/retrieve.md
Original file line number Diff line number Diff line change
Expand Up @@ -95,34 +95,3 @@ costs:
**Outputs**

- `data/costs/primary/{version}/costs_{year}.csv`


## Rule `retrieve_countries_centroids`

This rule downloads country centroid geometry data by Copyright (c) 2021 Gavin Rehkemper from https://cdn.jsdelivr.net/gh/gavinr/world-countries-centroids@v1.0.0/dist/countries.geojson.

**Relevant Settings**

None.

**Outputs**

- `data/countries_centroids.geojson`


## Rule `retrieve_presolved_networks`

This rule downloads pre-solved networks from a previous Open-TYNDP release (*preliminary outcomes* published on [Zenodo](https://zenodo.org/records/18608105)) and extracts the solved network for each planning horizon. These can be investigated with PyPSA-Explorer's web interface using the `launch_presolved_explorer` rule without having to re-run the workflow.

**Relevant Settings**

```yaml
data:
open_tyndp_prelim:
source:
version:
```

**Outputs**

- `data/open_tyndp_prelim/{source}/{version}/base_s_all___{planning_horizons}.nc`
2 changes: 1 addition & 1 deletion doc/sb.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ a scenario output file from the TYNDP 2024 process used as a fixed input.

The SB workflow transforms raw ENTSO-E input datasets into a solved, sector-coupled PyPSA
network. The key stages are: integrating public input data, constructing the sector-coupled
network, applying TYNDP-specific constraints, solving the capacity expansion optimisation, visualising results, and running the Open-TYNDP [benchmarking framework](benchmarking.md).
network, applying TYNDP-specific constraints, solving the capacity expansion optimisation, visualising results, and running the Open-TYNDP [benchmarking framework](benchmarking.md). An overview of the SB rules is documented at [SB rules](sb_rules.md).

### Network Construction

Expand Down
Loading