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 shared_resources "base" to not retrigger renewable profiles #1403

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

Conversation

p-glaum
Copy link
Contributor

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

Makes that with shared_resources=base, the previous behavior is recovered and every rule starting from add_electricity is not shared anymore, but the renewable profiles are shared.

Changes proposed in this Pull Request

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.

@p-glaum p-glaum requested a review from lindnemi October 31, 2024 16:34
"determine_availability_matrix_",
"solar_thermal",
)
if any(prefix in fn for prefix in shared_files) or is_shared:
Copy link
Contributor

Choose a reason for hiding this comment

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

why is the or is_shared necessary? Looks like it could be omitted

Copy link
Contributor Author

Choose a reason for hiding this comment

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

In my opinion, this is necessary here.
Because for the first is_shared, in the previous behaviour, you had neither a relevant_wildcard nor a shared_rule to make it shared. However, with the new structure, this would always be False for the profiles, meaning that they are never shared in the end.
This is why I added shared_files, and if any of those is in the file name, then the resource is always shared.

@p-glaum p-glaum requested review from bobbyxng and removed request for bobbyxng November 1, 2024 09:35
Copy link
Member

@fneum fneum left a comment

Choose a reason for hiding this comment

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

I would like to test this. Do you have a configfile/s to run to validate the intended behaviour?

@p-glaum
Copy link
Contributor Author

p-glaum commented Nov 4, 2024

I just had two different scenarios "A", "B" like

run:
  prefix: 'test_shared_resources'
  name: 
    - A
    - B
  scenarios:
    enable: true
    file: config/scenarios.yaml
  disable_progressbar: true
  shared_resources:
    policy: base
    exclude: []
  shared_cutouts: true

with the scenario.yaml

A:
electricity:
  renewable_carriers: [solar, onwind]

B:
electricity:
  renewable_carriers: [solar, offwind-dc]

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