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

Create constant profile from yearly sum #94

Open
2 tasks
SabineHaas opened this issue Nov 29, 2021 · 5 comments
Open
2 tasks

Create constant profile from yearly sum #94

SabineHaas opened this issue Nov 29, 2021 · 5 comments
Milestone

Comments

@SabineHaas
Copy link
Collaborator

For some demands we want to use constant profiles, e.g. H2 demand of industry, heat demand of industry (?)

  • Write general function that takes a value like sum as input and a constant time series that adds up to sum as output
  • test it

@MaGering do I remember right, that you also want to use a constant profile for heat demand of industry?

@jnnr
Copy link
Collaborator

jnnr commented Jan 13, 2022

We could alternatively adapt the facade class Load such that it assumes a constant profile if None is given. However, I am not sure yet how this can work. It seems that to set the actual_value (fix in solph v0.4), you need to create a sequence of the correct length that adds to 1.

@jnnr jnnr added this to the v0.01 milestone Jan 25, 2022
@jnnr
Copy link
Collaborator

jnnr commented Jan 25, 2022

As an update of the previous suggestion: Instead of altering the logic within the facades, it might be easier to assign profile a scalar value. I just tested this.

Internally, oemof.solph's Flow will create a sequence of correct length. If amount should still represent the sum of the demand, the scalar value should be 1/n_periods.

@SabineHaas SabineHaas removed their assignment Jan 26, 2022
@jnnr jnnr self-assigned this Feb 2, 2022
@jnnr
Copy link
Collaborator

jnnr commented Feb 23, 2022

Update: You can remove the entry profile under foreign keys in component_attrs.yml to avoid the empty profile being created. Then you can set 1/n_periods as the value for profile in the elements.

@SabineHaas
Copy link
Collaborator Author

When setting 1/n_periods as the value for profile in the elements we have the problem that a leap year needs another value than a non-leap year.

options

  • adapt periods in build_datapackage.py when elements are composed and saved
  • small script saving time series with all values being 1/n_periods

@SabineHaas
Copy link
Collaborator Author

We voted for option 1: adapting elements.

This means we remove profile from foreign_keys for those components that have constant profiles and add profile to scalars.
The adaption should take place after time series were selected by filter in .yml files.

@jnnr jnnr modified the milestones: v0.01, v0.02 Mar 1, 2022
@jnnr jnnr modified the milestones: v0.0.2, v0.0.3 Sep 13, 2022
@jnnr jnnr removed their assignment Feb 16, 2023
@MaGering MaGering modified the milestones: v0.0.3, v0.0.4 Aug 17, 2023
@MaGering MaGering modified the milestones: v0.0.4, v0.0.5 Nov 21, 2023
@MaGering MaGering modified the milestones: v0.0.5, v0.0.6 Mar 1, 2024
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

No branches or pull requests

3 participants