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

update sanitize carriers function #1400

Merged
merged 8 commits into from
Nov 6, 2024
Merged

Conversation

p-glaum
Copy link
Contributor

@p-glaum p-glaum commented Oct 31, 2024

add_electrictiy: update sanitize_carriers
_helpers: move rename_techs to helpers
plot_summary: import rename_techs form helpers
plot_power_network: import rename_techs from helpers

Closes #1396

Changes proposed in this Pull Request

In the current master, I have many techs that do not have a color defined. This is because we have techs like rural solar thermal, rural water tanks, and urban decentral heat that do not have a color defined in the default.config.yaml. With this PR, we take the rename_techs function and use it to find the colors of those technologies without having to define them specifically in the config.

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.

_helpers: move rename_techs to helpers
plot_summary: import rename_techs form helpers
plot_power_network: import rename_techs from helpers
@p-glaum p-glaum changed the title update sanatize carriers function update sanitize carriers function Oct 31, 2024
Copy link
Contributor

github-actions bot commented Oct 31, 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)
weighted_prices.csv ⚠️Changed 0.466 0.43
price_statistics.csv ⚠️Changed 0.016 0.20
metrics.csv ⚠️Changed 0.004 0.15
nodal_cfs.csv ⚠️ NaN mismatch
nodal_supply_energy.csv ⚠️ NaN mismatch
nodal_capacities.csv ⚠️ NaN mismatch
prices.csv ⚠️ NaN mismatch
supply.csv ⚠️ NaN mismatch
costs.csv ⚠️ NaN mismatch
nodal_costs.csv ⚠️ NaN mismatch
capacities.csv ⚠️ NaN mismatch
curtailment.csv ⚠️ NaN mismatch
supply_energy.csv ⚠️ NaN mismatch
cfs.csv ⚠️ NaN mismatch
energy.csv ⚠️ NaN mismatch
market_values.csv ✅ Almost equal 0.013 0.04

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 feature/improve-sanitize_carrier (6ccf3d3) with master (92f0b2a).
Branch is 8 commits ahead and 0 commits behind.
Last updated on 2024-11-06 17:13:37 CET.

@amos-schledorn
Copy link
Contributor

@p-glaum Looks good! Just suggested to add type hints and a docstring to the function you've touched.
Could you provide a config.yaml for a minimal working example? I've ran this locally but the results graphs seem the same.

@p-glaum
Copy link
Contributor Author

p-glaum commented Nov 4, 2024

@amos-schledorn Thanks for reviewing! The results should not change. The only think what changed are the color entries in n.carriers.color which shouldn't be empty anymore for carriers like rural solar thermal

@amos-schledorn
Copy link
Contributor

@amos-schledorn Thanks for reviewing! The results should not change. The only think what changed are the color entries in n.carriers.color which shouldn't be empty anymore for carriers like rural solar thermal

@p-glaum Gotcha. Checked the .nc outputs and there are no carriers without colours remaining. I can't make sense of the failing CI. If you know it's nothing critical, merge at will.

@p-glaum p-glaum merged commit 0c41cec into master Nov 6, 2024
10 of 12 checks passed
@p-glaum p-glaum deleted the feature/improve-sanitize_carrier branch November 6, 2024 15:34
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.

Missing colors of various technologies/carriers
3 participants