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

fix: remove obsolete checkup in solve_network.extra_functionality #1609

Merged
merged 3 commits into from
Mar 25, 2025

Conversation

amos-schledorn
Copy link
Contributor

Closes # (if applicable).
#1605

Changes proposed in this Pull Request

This PR removes an unnecessary if-clause in solve_network that can fail for electricity-only-networks and/or networks without links:

  • When solving electricity-only systems, TES is enabled (default value) but heating bus not defined
  • If network contains no links, if clause throws error

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.
  • Changes in configuration options are added in config/config.default.yaml.
  • Changes in configuration options are documented in doc/configtables/*.csv.
  • Sources of newly added data are documented in doc/data_sources.rst.
  • A release note doc/release_notes.rst is added.

- When solving electricity-only systems, TES is enabled (default value) but heating bus not defined
- If network contains no links, if clause throws error
@amos-schledorn amos-schledorn requested a review from Copilot March 25, 2025 09:33
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot encountered an error and was unable to review this pull request. You can try again by re-requesting a review.

Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR removes an obsolete configuration check in the extra functionality of the solve_network script that raised an error when TES was enabled without a heating bus.

  • Removed the error-raising if-clause that checked for "pits charger" or "tanks charger" strings in links and stores, which was causing issues in electricity-only networks and networks without links.
Comments suppressed due to low confidence (1)

scripts/solve_network.py:1182

  • The removed conditional error check was guarding against misconfigured networks. Please ensure that the removal does not allow unsupported TES configurations to slip through unnoticed by updating or adding appropriate tests.
elif (n.links.index.str.contains("pits charger|tanks charger", case=False, na=False).any() or n.stores.index.str.contains("pits", case=False, na=False).any() or n.stores.index.str.contains("tanks", case=False, na=False).any()):

@fneum fneum merged commit 6baab32 into master Mar 25, 2025
12 checks passed
@fneum fneum deleted the amos-schledorn/issue1605 branch March 25, 2025 15:30
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