Code Monkey home page Code Monkey logo

demandlib's Introduction

Open Energy Modelling Framework (oemof)

The Open Energy Modelling Framework (oemof) is a Python toolbox for energy system modelling and optimisation.

The oemof project aims to be a loose organisational frame for tools in the wide field of (energy) system modelling. Every project is managed by their own developer team but we share some developer and design rules to make it easier to understand each other's tools. All project libraries are free software licenced under the MIT license.

All projects are in different stages of implementation, some even may not have a stable release, but all projects are open to be joined by interested people. We do not belong to a specific institution and everybody is free to join the developer teams and will have the same rights. There is no higher decision level.

oemof community

This repository is also used to organise everything for the oemof community.

  • Webconference dates
  • Real life meetings
  • Website and Mailinglist
  • General communication

You can find recent topics of discussion in the issues.

Real life meetings

The oemof community meets in person on a regular basis. Find the latest information on the next meeting(s) on this wiki page: https://github.com/oemof/oemof/wiki

demandlib's People

Contributors

birgits avatar c-moeller avatar ddceruti avatar fwitte avatar gplssm avatar gregorbecker avatar henhuy avatar jnnr avatar magering avatar maurerle avatar p-snft avatar pajot avatar pyosch avatar uvchik avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

demandlib's Issues

Setup requirement of pandas

The requirement of demandlib for pandas is pandas >= 0.18.0, < 0.25.

I install the demandlib in a package that uses xarray, which is incompatible with demandlib as it requires pandas >= 0.25.

Do you see a problem in loosening the limit and allowing pandas < 1.1.0 or pandas >= 0.25.? I didn't have a problem with that creating power and heat demand profiles but as there are no tests of the demandlib, I cannot be sure, of course.

There are no unit tests

What is called "unit test", is actually an integration test calculating the sum. This does not find serious issues, e.g. if timestamps are shuffled in the profiles. (This happened in #34 but was is detected by the tests)

FutureWarning: Adjust float conversion to resolve deprecation warning in heat_building.py

During the run of the function get_sigmoid_parameters() in heating_building.py the following FutureWarning is raised:

FutureWarning: Calling float on a single element Series is deprecated and will raise a TypeError in the future. Use float(ser.iloc[0]) instead

The warning concerns the script between lines 271-275.

        a = float(sigmoid["parameter_a"])
        b = float(sigmoid["parameter_b"])
        c = float(sigmoid["parameter_c"])
        if self.ww_incl:
            d = float(sigmoid["parameter_d"])

I ran this script through the oemof-B3 model with a Windows 10 operating system and Python 3.10.12
This could be adapted to avoid TypeErrors.

Simple insulation based heat demand model

It might be a valuable addition to have a simple physical model for heating demand. One option would be, that you give insulating surfaces (areas with corresponding widths and u-values for the insulation) and two time series for temperatures. In the most simple case, we could just take the transmission as demands.

What do you think?

License of bdew_data unclear

SLP data is copyrighted. Currently, I cannot see a copyright note. (Examples I found are released under CC-by, so the copyright holder has to be named. At the moment, I cannot find an appropriate naming.)

Calculating COP for heatpump

Hello everybody,

I've been working on creating loadshapes as well when I found this very nice project. I would like to contribute parts of my work to the demandlib. As a first suggestion I have a few lines to calculate the coefficient of performance for air and ground heatpumps. The formulas can be found in this publication:
https://www.researchgate.net/publication/255759857_A_review_of_domestic_heat_pumps

Do you think this is an appropriate addition?
In which file should the code be added? In my Fork I wrote it into the bdew.py file as a function of the HeatBuilding class.

Greetings,
Pyosch

annual_heat_demand and sum of demand as result of bdew.HeatBuilding() differ slightly

If you check the result, which is returned by bdew.HeatBuilding(), you'll find that its sum differs slightly from your input in annual_heat_demand.

To reproduce this, you can add these two lines to heat_demand_example.py here after calling bdew.HeatBuilding() for a single family housing ('efh'):

    result_annual_heat_demand = sum(demand["efh"])
    print("Sum of heat demand 'efh': ", result_annual_heat_demand)

It seems the highes possible share of new buildings (Neubau) is 57%

Hi everyone,

I am new to the demandlib and the BDEW profiles.
Right know I am trying to figure out what kind of buildungs a certain set of arguments represent. As far as I understand it is not possible to create a profile for a stock of buildings that consists mainly (>60%) of new buildings (ger. "Neubauten").
Is that correct?
And does anyone of you know a way to do so, like using another set of sigmoid parameters?

Thanks!

Release v.0.1.1

Will be published on Friday 21st of October @oemof/demandlib

Still todo (feel free to add more)

  • version number update
  • release tag/message on github
  • add whats new
  • post at wordpress

Compilation of heat_demand_example fails

Hello,
I'm new to the demandlib package and wanted to figure out what the source of this error might be:

Compilation of the heat_demand_example always leads to the error
image

which I am not able to sort out alone. I updated the oemof, demandlib and pandas package. The power example instead works completely fine. I'm using Python 3.8.3 Would be really nice if someone could help me out with this.

Regards,
Benjamin

Documentation

@oemof/demandlib: We should write a documentation comparable to the one of the feedinlib (we can use the structure of the feedinlib documentation to start with).

  • Setup a sphinx documentation
  • Create a Readme file
  • Check Docstrings

Allow for stochastic demand profiles

(Copied from wrong lo cation at oemof/feedinlib#49.)

Standard lows profiles (SLP) are – by construction – static. This can be a problem especially for electric demands of small sites (like single family homes). Thus, I suggest to introduce an option to get some randomness:

  • Part of the SLP is considered base load (constant over time).
  • The rest is composed of a static and a dynamic part.
    • The static part scales with the original SLP. Thus, setting this to 1 will just reproduce the SLP.
    • The dynamic part is modelled by a Poisson distribution with an expectation value scaled with the original SLP.

So – by construction – the SLP is reconstructed on average. Of course, this simple model is not very realistic, as it does not allow correlations between following values. However, it should be better then plain SLP.

getting ww_incl values when set true

Hello,
I wanted to know if it is possible to get the hourly warm water load separetely. I want to do the sizing of a solar thermal field based on the warm water demand from July.

Best regards.
korcun

Release of v0.1.7

  • Optional: Open a release branch to avoid conflicts with other uses while the release progress.
  • Run examples and tests check the Travis-CI results
  • If you have failing test fix them or postpone the release.
  • Check the whatsnew-file.
  • Check if the latest documentation looks right at readthedocs.
  • Change the version number everywhere!!! [TODO] (e.g. from 0.2.1dev to 0.2.1)
  • If everything seems to work, merge the release branch into the master branch. (--no-ff)
  • Open a working python3 virtual environment.
  • Make sure that the release tools are up-to-date: pip install --upgrade setuptools wheel twine
  • Make sure you are on the commit you want to release and create the package: python3 setup.py sdist bdist_wheel
  • Check the package with twine: twine check dist/*
  • If errors occur fix them or postpone the release.
  • Set a release on github. Select the master branch (default: dev)! A label is set automatically.
  • Use git fetch to see the label in your local master branch.
  • If everything works as expected you can now upload the package version to PyPI: twine upload dist/*
  • Merge the release branch into the dev branch. (--no-ff)
  • Remove the obsolete release branch.
  • Prepare the dev branch for further development: Adapt the version number. Also add a link in the whatsnew.rst file. Open the file locally or use the RAW button to see the links.

Power Example not working?

I tried to replicate power_demand_example.py, but keep getting the error get_profile() got an unexpected keyword argument 'dyn_function_h0'

Code:

import datetime
import demandlib.bdew as bdew
import demandlib.particular_profiles as profiles
from datetime import time as settime
import matplotlib.pyplot as plt


holidays = {
    datetime.date(2010, 5, 24): 'Whit Monday',
    datetime.date(2010, 4, 5): 'Easter Monday',
    datetime.date(2010, 5, 13): 'Ascension Thursday',
    datetime.date(2010, 1, 1): 'New year',
    datetime.date(2010, 10, 3): 'Day of German Unity',
    datetime.date(2010, 12, 25): 'Christmas Day',
    datetime.date(2010, 5, 1): 'Labour Day',
    datetime.date(2010, 4, 2): 'Good Friday',
    datetime.date(2010, 12, 26): 'Second Christmas Day'}


def power_example(testmode=False):
    year = 2010

    ann_el_demand_per_sector = {
        'g0': 3000,
        'h0': 3000,
        'i0': 3000,
        'i1': 5000,
        'i2': 6000,
        'g6': 5000}

    # read standard load profiles
    e_slp = bdew.ElecSlp(year, holidays=holidays)

    # multiply given annual demand with timeseries
    elec_demand = e_slp.get_profile(ann_el_demand_per_sector,
                                    dyn_function_h0=True)


    [......]

Possibility to define seasons

Hi @ALL,

@TheOneAndra and I want to use the demandlib for estimating a demand profile in South America. Of course, for that we would have to tweak the profile in a way that their actual seasons are taken into account. We found something about seasons in the docstrings and a part of the code here:

class ElecSlp:

seasons : dictionary

if seasons is None:

However the function does not work and, indeed, there is no utilization of self.seasons anywhere else. Is this old code that should be deleted, or is this still in progress somewhere?

Extension for district heating systems

The SLPs by BDEW lead to erroneous results, when using them for district heating systems. In this publication we provide a set of SLPs to consider the influence of the district heating grid. Maybe this is of interest for the demandlib.

Add issues to the documentation

[ ] Add a paragraph about the limitations of the standardised load profiles
[ ] Fill usage section of the BDEW heat profiles
[ ] ...

Please add ToDos for the documentation here.

Missing dynamisation function for electric load profiles

I couldn't find the implementation of the BDEW dynamization function ("Dynamisierungsfunktion") to smoothen the seasonal edges of the H0 slp:

f(x) = -3,92 * 10^-10 * x^4 + 3,2 * 10^-7 * x³ - 7,02 * 10^-5 * x²+0,0021 * x +1,24

Figure_3

Did I miss this or is it missing?

Unclear understanding of the file shlp_hours_factors.csv

Hello everyone,

My name is Alexandre Jewell, and I work at a company focused on energy planning. We are currently working on the use of the BDEW hourly profiles for estimating the potential electricity flows within an energy community. To do so, I was thinking of using the standard load profiles from the BDEW, and I've got to thank you for how you structured them and made them so much clearer in your file shlp_hours_factors.csv contained within the folder bdew_data

However, after reading the documentation, I wasn't able to get a complete understanding of the structure of it. Here are my questions:

  1. What is the difference between the column building_class and the column shlp_type ?
  2. To which temperatures do the intervals temp_intervall_01, temp_intervall_02, etc. correspond to ?
image

Thank you very much for the help and the overall effort you've been putting into open source code so far !

Kind regards,

Alex

SigLinDe extension for the demand profile calcutation?

Hi,
after reviewing the calculation procedure of the demand profil, I was wondering why the demand profil in "get_normalized_bdew_profile" is calculated with a Sigmoid function. The BDEW guideline proposes an extension with a linear term, which in combination is called SigLinDe.

Did you already discuss this topic?

Demandlib usable?

Hi everybody,

is the demandlib fully usable and are you already building projects on it?

I am reading some papers about heat load modelling atm and might use it for our project, too. But so far the documentation still seems to be a bit sparse ;)

I presume it uses the BDEW logic to model different sectors (GHD, ...) and building types (EFH, MFH, ...)? Is this right? And is there any external document that documents the underlying logic?

Best
Cord

building_class

the building_class is not explained in the documentation, the issue has occurred before and the links provided were not to be found.

Citation for the demandlib

Dear @oemof/demandlib,

I would like to cite the demandlib in a paper that will be submitted soon. Therefore, I plan to retrieve a DOI via Zenodo.
As we agreed for oemof to have "oemof developer group" as author, I would apply same style here. Does anyone have objections with this? Otherwise I'll go for it at beginning of next week.

Error in HeatBuilding example of demandlib

Great, thanks for the first release of the demandlib. I tried to run the heat_demand example for the example directory and got the following error:

Traceback (most recent call last):
  File "/home/simon/uni/repos/demandlib/examples/heat_demand_example.py", line 37, in <module>
    name='EFH').get_bdew_profile()
  File "/home/simon/uni/repos/demandlib/demandlib/bdew.py", line 328, in get_bdew_profile
    how="geometric_series")
  File "/home/simon/uni/repos/demandlib/demandlib/bdew.py", line 207, in weighted_temperature
    temperature = self.df["temperature"].resample('D').mean().reindex(
AttributeError: 'numpy.float64' object has no attribute 'reindex'

Structure of the demandlib

You wanted to answer the following questions:

  • Which parts should the damandlib include: profiles; annual demand; GIS-analyses ...(?)
  • Who is the user - oemof or RLI?
  • Is it usefull to determine the application area? (only germany)
  • Are data included? How should they be stored? DB - Files - Links
  • is this a universal application? Are detailed; specified elements allowed?

Add ENTSO-E profiles?

Does anyone remember if and how we decided on this issue? Does it make sense to add the ENTSO-E profiles to the demandlib? At the moment it would be comfortable for me to have these profiles and I would like to add them, but I'm not sure if we have decided against this.

ToDo's for the documentation

  • Add a paragraph about the limitations of the standardised load profiles
  • Fill usage section of the BDEW heat profiles
  • Add details for the types of electrical profiles -> PR #44
  • ...

Please add ToDo's for the documentation here.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.