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

Bug fix: simplify_network.py (simplify_links) - By adding preceding converter removal #1381

Merged
merged 5 commits into from
Oct 23, 2024

Conversation

bobbyxng
Copy link
Contributor

@bobbyxng bobbyxng commented Oct 22, 2024

Changes proposed in this Pull Request

  • @p-glaum and @bobbyxng
  • Bug fix occuring when multiple DC links are connected to the same DC bus and the DC bus is connected to an AC bus via converter.
  • Links were simplified in a wrong manner, leading to the DC bus being dropped, e.g. in the case of a TYNDP project connecting Sicily to mainland Italy.
  • This does not impact simplification of DC links that consist of DC buses along the way, which are not connected to an AC bus via converter.
  • Tested with osm-grid, transmission projects on, 45 buses and weekly resolution. solve_elec_networks converges.

Screenshot from 2024-10-22 14-09-09

Checklist

  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.
  • Changed dependencies are added to envs/environment.yaml.
  • A release note doc/release_notes.rst is added.

@bobbyxng bobbyxng self-assigned this Oct 22, 2024
Copy link
Contributor

github-actions bot commented Oct 22, 2024

Validator Report

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

General

Plots comparison
Main branch Feature branch
Image not available Image not available
Image not available Image not available
Image not available Image not available
Image not available Image not available
Image not available Image not available
Image not available Image not available
Files comparison
Status NRMSE MAE (norm)
prices.csv ⚠️Changed 0.000 0.18
weighted_prices.csv ⚠️Changed 0.401 0.62
curtailment.csv ⚠️Changed 0.000 0.22
price_statistics.csv ⚠️Changed 0.017 0.19
metrics.csv ⚠️Changed 0.000 0.11
nodal_costs.csv ⚠️ NaN mismatch
nodal_supply_energy.csv ⚠️ NaN mismatch
nodal_cfs.csv ⚠️ NaN mismatch
nodal_capacities.csv ⚠️ NaN mismatch
cfs.csv ⚠️ NaN mismatch
market_values.csv ✅ Almost equal 0.013 0.04
supply.csv ✅ Almost equal 0.000 0.02
costs.csv ✅ Almost equal 0.001 0.01
capacities.csv ✅ Almost equal 0.001 0.02
supply_energy.csv ✅ Almost equal 0.000 0.01
energy.csv ✅ Almost equal 0.000 0.01

NRMSE: Normalized (combined-min-max) Root Mean Square Error
MAE (norm): Mean Absolute Error on normalized data (min-max)
Status Threshold: MAE (norm) > 0.05 and NRMSE > 0.3

Model Metrics

Benchmarks Image not available Image not available Image not available

Comparing fix-simplify-links (cb29a7e) with master (49ca406).
Branch is 5 commits ahead and 0 commits behind.
Last updated on 2024-10-22 16:07:25 CEST.

scripts/simplify_network.py Outdated Show resolved Hide resolved
@lkstrp lkstrp merged commit fc2972d into master Oct 23, 2024
7 of 13 checks passed
lindnemi pushed a commit that referenced this pull request Oct 24, 2024
…onverter removal (#1381)

* Implemented simplify_links fix by adding a preceding function removing converters.

* Added release_notes.

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

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

* Dropped manual configfile.

* Cleaned up code.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
lindnemi pushed a commit that referenced this pull request Oct 24, 2024
…onverter removal (#1381)

* Implemented simplify_links fix by adding a preceding function removing converters.

* Added release_notes.

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

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

* Dropped manual configfile.

* Cleaned up code.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
lindnemi added a commit that referenced this pull request Oct 24, 2024
* Bug fix: simplify_network.py (simplify_links) - By adding preceding converter removal (#1381)

* Implemented simplify_links fix by adding a preceding function removing converters.

* Added release_notes.

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

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

* Dropped manual configfile.

* Cleaned up code.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Bug fix: simplify_network.py (simplify_links) - By adding preceding converter removal (#1381)

* Implemented simplify_links fix by adding a preceding function removing converters.

* Added release_notes.

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

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

* Dropped manual configfile.

* Cleaned up code.

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>

* Updated to osm-network version 0.5

* Added sources to doc/data_sources.rst

* Bug fix, exporting gdp_pop to geojson. (#1388)

* tech-colors for gas primary and compressing

---------

Co-authored-by: Bobby Xiong <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: bobbyxng <[email protected]>
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.

3 participants