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 load weighted prices #1287

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

fix load weighted prices #1287

wants to merge 7 commits into from

Conversation

lisazeyen
Copy link
Contributor

@lisazeyen lisazeyen commented Sep 12, 2024

Changes proposed in this Pull Request

Fix bug when calculating load weighted prices in the make_summary script

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.

@lisazeyen
Copy link
Contributor Author

@millingermarkus can you check if it is working with this branch?

scripts/make_summary.py Outdated Show resolved Hide resolved
scripts/make_summary.py Outdated Show resolved Hide resolved
@lisazeyen
Copy link
Contributor Author

@p-glaum I am not dropping the prices if the load is zero at a bus.
price = price.reindex(columns=load.columns)
One could also reindex the other way around, but then the mariginal price would not be really load weighted, e.g. with
load.reindex(columns=price.columns, fill_value=1)

@p-glaum
Copy link
Contributor

p-glaum commented Sep 13, 2024

@p-glaum I am not dropping the prices if the load is zero at a bus. price = price.reindex(columns=load.columns) One could also reindex the other way around, but then the mariginal price would not be really load weighted, e.g. with load.reindex(columns=price.columns, fill_value=1)

okay, if the prices have a meaning for buses without flows going in or out, then we should definitely keep them and weight every timestep equally, i.e. with load.reindex(columns=price.columns, fill_value=1)
However, if they do not have a realistic interpretation, should we drop them?

@lisazeyen
Copy link
Contributor Author

@p-glaum I am not dropping the prices if the load is zero at a bus. price = price.reindex(columns=load.columns) One could also reindex the other way around, but then the mariginal price would not be really load weighted, e.g. with load.reindex(columns=price.columns, fill_value=1)

okay, if the prices have a meaning for buses flows going in or out, then we should definitely keep them and weight every timestep equally, i.e. wit load.reindex(columns=price.columns, fill_value=1) However, if they do not have a realistic interpretation, should we drop them?

I think if it is load weighted and the load is zero we should drop them.

@fneum
Copy link
Member

fneum commented Sep 13, 2024

I think if it is load weighted and the load is zero we should drop them.

I think equal weight would be slightly better, but dropping also ok.

Copy link
Contributor

github-actions bot commented Sep 13, 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
Files comparison
Status NRMSE MAE (norm)
nodal_capacities.csv ⚠️ NaN mismatch
cfs.csv ⚠️ NaN mismatch
nodal_costs.csv ⚠️ NaN mismatch
nodal_supply_energy.csv ⚠️ NaN mismatch
nodal_cfs.csv ⚠️ NaN mismatch
weighted_prices.csv ⚠️ NaN mismatch
curtailment.csv ✅ Almost equal 0.000 0.14
price_statistics.csv ✅ Almost equal 0.008 0.14
capacities.csv ✅ Almost equal 0.000 0.04
market_values.csv ✅ Almost equal 0.001 0.08
costs.csv ✅ Almost equal 0.001 0.01
metrics.csv ✅ Almost equal 0.000 0.06
prices.csv ✅ Almost equal 0.000 0.16
supply_energy.csv ✅ Almost equal 0.000 0.03
supply.csv ✅ Almost equal 0.000 0.03
energy.csv ✅ Almost equal 0.000 0.02

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

Model Metrics

Benchmarks Image not available Image not available Image not available

Comparing fix-load-weighted-prices (35d1e1e) with master (0a18ddb).
Branch is 7 commits ahead and 0 commits behind.
Last updated on 2024-09-13 16:54:26 CEST.

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