Skip to content

Conversation

toniseibold
Copy link
Contributor

@toniseibold toniseibold commented Feb 4, 2025

Replace the function get_economy with a more detailed calculation of the energy system costs of one region.

get_tsc(n, region

  • calculates the opex and capex and grouping them by name and carrier. This allows to keep lines and links that are associated with the regional energy system but are missing the name of the region in the index. Furthermore, it keeps the detail of interconnectors
  • Links and lines that are connecting the region with a foreign country can be filtered. OPEX and CAPEX for those links and lines are counted 50/50 between the countries
  • Links and lines that do not have the name of the region in the index would not be included in the .filter(like=region) statement. Therefore, if bus0 and bus1 are associated with the region, the index is enhanced by `" {region}" to include those costs. This mostly affects TYNDP links and lines

get_link_opex/ get_line_opex

  • links and lines that are allow trade between the region and foreign countries are not associated with costs for the energy that is imported/exported
  • the trade volume is multiplied by the marginal costs at the bus that is providing energy
  • these costs are added to the total system costs

Checking high resolution runs (pypsa-ariadne 20241203-force-onwind-south from 04th of December 2024)
Results with energy trade costs:

Cost|Total Energy System Cost    134.4014
Cost|Total Energy System Cost    154.814
Cost|Total Energy System Cost    161.2694
Cost|Total Energy System Cost    170.3943
Cost|Total Energy System Cost    169.4185
Cost|Total Energy System Cost    151.1261

Results without energy trade costs:

Cost|Total Energy System Cost    132.7031
Cost|Total Energy System Cost    160.6781
Cost|Total Energy System Cost    159.8911
Cost|Total Energy System Cost    175.3977
Cost|Total Energy System Cost    175.0943
Cost|Total Energy System Cost    156.6982

Former Total System Costs

Cost|Total Energy System Cost    58.5881
Cost|Total Energy System Cost    69.9431
Cost|Total Energy System Cost    91.8808
Cost|Total Energy System Cost    129.6109
Cost|Total Energy System Cost    148.1824
Cost|Total Energy System Cost    144.3304

Checklist:

  • Workflow with target rule ariadne_all completes without errors
  • The logic of export_ariadne_variables has been adapted to the changes
  • One or several figures that validate the changes in the PR have been posted as a comment
    not applicable
  • A brief description of the changes has been added to Changelog.md
    not applicable
  • The latest main has been merged into the PR
  • The config has a new prefix of the format YYYYMMDDdescriptive_title
    not applicable

Copy link
Contributor

github-actions bot commented Feb 4, 2025

Validator Report

I am the Validator. Download all artifacts here.
I'll be back and edit this comment for each new commit.

❗ Run failed!

Download 'logs' artifact to see more details.

  • main passed! ✅
  • total_system_costs failed in: no_logs_found

Model Metrics

Benchmarks Image not available Image not available Image not available

Comparing total_system_costs (d3e327f) with main (33db4bb).
Branch is 6 commits ahead and 0 commits behind.
Last updated on 2025-02-04 16:03:57 CET.

@toniseibold toniseibold marked this pull request as ready for review February 4, 2025 15:02
@toniseibold toniseibold requested a review from lindnemi February 4, 2025 15:02
@toniseibold
Copy link
Contributor Author

@lindnemi can revert including the trading costs from the total system costs. Up to you.

cpschau pushed a commit to SysGF-internal/pypsa-de that referenced this pull request Feb 25, 2025
Import/Export of FT is subtracted/added to the national CO2 target
@lindnemi lindnemi merged commit 36950cd into main Jul 23, 2025
5 checks passed
lindnemi added a commit that referenced this pull request Jul 23, 2025
* include interconnector and links/line costs into total system costs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* take care of deprecation warnings

* include energy trade costs

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Micha <michaellindner@pik-potsdam.de>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants