pypsa-eur
pypsa-eur copied to clipboard
fix load weighted prices
Changes proposed in this Pull Request
Fix bug when calculating load weighted prices in the make_summary script
Checklist
- [x] I tested my contribution locally and it works as intended.
- [x] Code and workflow changes are sufficiently documented.
- [x] Changed dependencies are added to
envs/environment.yaml. - [x] Changes in configuration options are added in
config/config.default.yaml. - [x] Changes in configuration options are documented in
doc/configtables/*.csv. - [x] Sources of newly added data are documented in
doc/data_sources.rst. - [ ] A release note
doc/release_notes.rstis added.
@millingermarkus can you check if it is working with this branch?
@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 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. withload.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?
@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. withload.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.
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.
Validator Report
I am the Validator. Download all artifacts here. I'll be back and edit this comment for each new commit.
:exclamation: Run failed!
Download 'logs' artifact to see more details.
masterfailed in:prepare_sector_network,prepare_sector_network,prepare_sector_networkfix-load-weighted-pricesfailed in:prepare_sector_network,prepare_sector_network,prepare_sector_network
Model Metrics
Benchmarks
Comparing fix-load-weighted-prices (f6f1e15) with master (834ea7f).
Branch is 8 commits ahead and 0 commits behind.
Last updated on 2024-11-10 14:50:38 CET.