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

Bugfix of solar constraint in post discretization #1343

Merged
merged 1 commit into from
Oct 10, 2024

Conversation

toniseibold
Copy link
Contributor

Bugfix

Changes proposed in this Pull Request

When the post discretization is enabled, the function add_solar_potential_constraints is called multiple times.
The first time, the optimal capacity of generators with carrier solar-hsat is zero. However, the second time, the optimal capacity can be greater than zero which would then overly reduce the potential.
Since the p_nom is set in the next planning horizon in the rule add_brownfield switching from p_nom_opt to p_nom is the correct way to formulate the boundary condition.

Checklist

  • I tested my contribution locally and it works as intended.
  • Code and workflow changes are sufficiently documented.
    not applicable
  • Changed dependencies are added to envs/environment.yaml.
    not applicable
  • Changes in configuration options are added in config/config.default.yaml.
    not applicable
  • Changes in configuration options are documented in doc/configtables/*.csv.
    not applicable
  • Sources of newly added data are documented in doc/data_sources.rst.
    not applicable
  • A release note doc/release_notes.rst is added.
    not applicable

@toniseibold toniseibold requested review from fneum and lisazeyen and removed request for fneum October 2, 2024 14:07
@toniseibold toniseibold marked this pull request as ready for review October 2, 2024 14:08
Copy link
Contributor

github-actions bot commented Oct 2, 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)
cfs.csv ⚠️Changed 0.052 0.08
price_statistics.csv ⚠️Changed 0.002 0.18
curtailment.csv ⚠️Changed 0.000 0.16
metrics.csv ⚠️Changed 0.000 0.09
weighted_prices.csv ⚠️Changed 0.394 0.37
prices.csv ⚠️Changed 0.000 0.13
market_values.csv ⚠️Changed 0.001 0.10
nodal_capacities.csv ⚠️ NaN mismatch
nodal_supply_energy.csv ⚠️ NaN mismatch
nodal_costs.csv ⚠️ NaN mismatch
nodal_cfs.csv ⚠️ NaN mismatch
costs.csv ✅ Almost equal 0.001 0.01
energy.csv ✅ Almost equal 0.000 0.02
capacities.csv ✅ Almost equal 0.000 0.03
supply.csv ✅ Almost equal 0.000 0.02
supply_energy.csv ✅ Almost equal 0.000 0.02

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 post_discretization_solar_bc-1 (5f45820) with master (8f1a6b1).
Branch is 1 commits ahead and 0 commits behind.
Last updated on 2024-10-02 16:36:33 CEST.

@fneum fneum merged commit 6dd41b8 into master Oct 10, 2024
12 of 13 checks passed
lindnemi added a commit that referenced this pull request Oct 17, 2024
* feat: add temperature reduction to workflow

* chore: fix name change issues

* feat: update input/output of dependent rules

* feat: add {planning _horizons} wildcard to COP input in myopic rules

* fix: exponential temperature reduction

* feat: add {planning_horizons} wildcard to solve_perfect

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

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

* style: "_today" -> "_baseyear"

* doc: update configtables

* style: "_today" -> "_baseyear" (config)

* feat: update heat pump efficiency in add_brownfield

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

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

* fix: pass planning_horizons to add_brownfield

* feat: update COPs for perfect foresight

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

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

* update release notes

* Update doc/release_notes.rst

Co-authored-by: Fabian Neumann <[email protected]>

* Update scripts/build_central_heating_temperature_profiles/run.py

Co-authored-by: Fabian Neumann <[email protected]>

* Update scripts/build_central_heating_temperature_profiles/run.py

Co-authored-by: Fabian Neumann <[email protected]>

* Update build_central_heating_temperature_profiles.run

* style: simplify update_heat_pump_efficiency functions

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

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

* Update README.md

* [pre-commit.ci] pre-commit autoupdate (#1352)

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.6.0 → v5.0.0](pre-commit/pre-commit-hooks@v4.6.0...v5.0.0)
- [github.com/psf/black-pre-commit-mirror: 24.8.0 → 24.10.0](psf/black-pre-commit-mirror@24.8.0...24.10.0)

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

* transmission_projects: update AC line types to high-temperature lines (#1348)

* Bugfix of solar constraint in post discretization (#1343)

* Update NEP DC20 to underground

* fix: remove broken pre-commit rule (docformatter) (#1362)

* prepare for pypsa `0.31.0` (#1340)

* prepare for pypsa `0.31.0`

* Update mock_snakemake (#1345)

* test: log env diff (#1338)

* Update mock_snakemake

---------

Co-authored-by: Lukas Trippe <[email protected]>
Co-authored-by: Fabian Neumann <[email protected]>

* resolve other deprecations

---------

Co-authored-by: Davide Fioriti <[email protected]>
Co-authored-by: Fabian Neumann <[email protected]>

* [github-actions.ci] Update fixed environment (#1363)

* [create-pull-request] automated change

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

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

---------

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

* fix: more robust `progress_retrieve` (#1361)

* madd to add

---------

Co-authored-by: Amos Schledorn <[email protected]>
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Amos Schledorn <[email protected]>
Co-authored-by: Fabian Neumann <[email protected]>
Co-authored-by: Philipp Glaum <[email protected]>
Co-authored-by: Toni Seibold <[email protected]>
Co-authored-by: Tom Brown <[email protected]>
Co-authored-by: Lukas Trippe <[email protected]>
Co-authored-by: Davide Fioriti <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: lkstrp <[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.

2 participants