oemof.demandlib package

Submodules

oemof.demandlib.bdew_heatprofile module

Implementation of the bdew heat load profiles

oemof.demandlib.bdew_heatprofile.create_bdew_profile(datapath, year, temperature, annual_heat_demand, shlp_type, wind_class, **kwargs)[source]

Calculation of the hourly heat demand using the bdew-equations

Parameters:
  • year (int) – year or which the profile is created
  • datapath (string) – path where csv-files with bdew data are located
  • annual_heat_demand (float) – annual heat demand of building in kWh
  • building_class (int) – class of building according to bdew classification possible numbers are: 1 - 11
  • shlp_type (string) – type of standardized heat load profile according to bdew possible types are: GMF, GPD, GHD, GWA, GGB, EFH, GKO, MFH, GBD, GBA, GMK, GBH, GGA, GHA
  • wind_class (int) – wind classification for building location (1 if windy, else 0)
oemof.demandlib.bdew_heatprofile.get_SF_values(df, datapath, filename='shlp_hour_factors.csv', building_class=None, shlp_type=None)[source]

Determine the h-values

Parameters:
  • datapath (string) – path where csv files are located
  • filename (string) – name of file where sigmoid factors are stored
  • building_class (int) – class of building according to bdew classification
oemof.demandlib.bdew_heatprofile.get_sigmoid_parameters(datapath, building_class=None, shlp_type=None, wind_class=None, ww_incl=True, filename='shlp_sigmoid_factors.csv')[source]

Retrieve the sigmoid parameters from csv-files

Parameters:
  • datapath (string) – path where csv files are located
  • filename (string) – name of file where sigmoid factors are stored
  • building_class (int) – class of building according to bdew classification
  • shlp_type (string) – type of standard heat load profile according to bdew
  • wind_class (int) – wind classification for building location (0=not windy or 1=windy)
  • ww_incl (boolean) – decider whether warm water load is included in the heat load profile
oemof.demandlib.bdew_heatprofile.get_temperature_interval(df)[source]

Appoints the corresponding temperature interval to each temperature in the temperature vector.

Parameters:df (pandas.DataFrame) – dataframe containing informations on temperature in column “temperature”
oemof.demandlib.bdew_heatprofile.get_weekday_parameters(df, datapath, filename='shlp_weekday_factors.csv', shlp_type=None)[source]

Retrieve the weekday parameter from csv-file

Parameters:
  • df (pandas.DataFrame) – dataframe containing informations on temperature and date/time
  • datapath (string) – path where csv files are located
  • filename (string) – name of file where sigmoid factors are stored
  • shlp_type (string) – type of standard heat load profile according to bdew
oemof.demandlib.bdew_heatprofile.weighted_temperature(df, how='geometric_series')[source]

A new temperature vector is generated containing a multi-day average temperature as needed in the load profile function.

Parameters:
  • df (pandas.DataFrame) – dataframe containing hourly temperature data in column with label “temperature”
  • how (string) – string which type to return (“geometric_series” or “mean”)

Notes

Equation for the mathematical series of the average tempaerature [1]:

T=\frac{T_{D}+0.5\cdot T_{D-1}+0.25\cdot T_{D-2}+
        0.125\cdot T_{D-3}}{1+0.5+0.25+0.125}

with T_D = Average temperature on the present day
T_{D-i} = Average temperature on the day - i

References

[1]BDEW, BDEW Documentation for heat profiles.

oemof.demandlib.demand module

Created on Fri Jul 24 19:11:38 2015

@author: caro

class oemof.demandlib.demand.electrical_demand(method, **kwargs)[source]

Bases: object

Calculate the electrical demand for a region with different methods.

This class calculates the electrical demand for a region. Therefore several different methods can be applied.

Parameters:

method ({'scale_profile_csv', 'scale_profile_db', 'scale_entsoe', 'calculate_profile'}) –

Method to calculate the demand for your region. Explanation:

‘scale_profile_csv’:

read only profile from csv and scale it with given or calculated demand

‘scale_profile_db’:

read only profile from database and scale it with given or calculated demand

‘scale_entsoe’:

read entsoe profile from database and scale it with given or calculated demand

‘calculate_profile:

Calculate profile from the standard load profiles of the three demand sectors (households, service, industry) and the corresponding annual electric demand.

Depending on which of these values is chosen, additional parameters might be required, as detailed below.

Other Parameters:
 
  • path (str) – Required for a method value of ‘scale_profile_csv’.

    Should be the ‘/path/to/the/csv/file’.

  • filename (str) – Required for a method value of ‘scale_profile_csv’.

    Should be the name of the file found under path.

  • conn – Required for method values of ‘scale_profile_db’ or ‘scale_profile_entsoe’.

  • annual_elec_demand (int) – Required for method values of ‘scale_profile_csv’, ‘scale_profile_db’ or ‘scale_profile_entsoe’.

    Annual demand of your region. Works so far only with a given value. Calculating the demand from statistic data for the whole region can be an option for further development.

  • ann_el_demand_per_sector (dictionary) – Required for a method value of ‘calculate_profile’.

    Specification of annual electric demand and the corresponding standard load profile type (selp_type) for every sector. Dictionary is structured as follows. Key defining the sector is followed by value that can be int, float, None or can be omitted, e.g.:

    ann_el_demand_per_sector = {
        'h0': int,
        'g0': float,
        'g1': None,
        ...
        'g6': int,
        'i0': int}
    

    If ann_el_demand is None, more parameters to calculate the demand are necessary: (works so far only if ann_el_demand for every or no sector is specified)

  • population (int) – Population of your region.

  • ann_el_demand_per_person (list of dictionaries) – Specification of the annual electric demand for one household according to the household type (from single to four-person households), e.g.:

    ann_el_demand_per_person = [
        {'ann_el_demand': int,
         'household_type': {'one', 'two', 'three', 'four'}},
         ...]
    
  • household_structure (list of dictionaries) – Number of people living in every household type. Specification for your region, e.g.:

    household_structure = [
        {household_members': int,
         'household_type': {'one', 'two', 'three', 'four'}},
         ...]
    
  • comm_ann_el_demand_state (int) – Annual electric demand of the service sector of the next bigger region, if not given for your region.

  • comm_number_of_employees_state (int) – Number of employees in the service sector of the next bigger region.

  • comm_number_of_employees_region (int) – Number of employees in the service sector of your region.

annual_demand

int

Included in **kwargs. Given with initialization or calculated or to be calculated within this class according to selected method.

dataframe

pandas dataframe

elec_demand

array_like

profile
e_slp

Notes

References

statistics ...

B. Schachler: Bewertung des Einsatzes von Kraft-Wärme-Kopplungsanlagen hinsichtlich der CO2-Emissionen bei wachsendem Anteil Erneuerbarer Energien, Masterarbeit, Technische Universität Berlin, 2014

Examples

These are written in doctest format, and should illustrate how to use the function.

    1. Summe bilden von elec_demand und abgleichen mit ann_el_demand
calculate_annual_demand_commerce(**kwargs)[source]
calculate_annual_demand_households(**kwargs)[source]
calculate_annual_demand_industry(**kwargs)[source]
calculate_annual_demand_region()[source]

calculate annual demand from statistic data

decider(method, **kwargs)[source]
read_entsoe()[source]
read_from_csv(**kwargs)[source]

read entire demand timeseries or only profile for further processing from csv

read_from_db()[source]

read entire demand timeseries or only profile for further processing from database

read_selp()[source]
scale_profile()[source]

scale a given profile to a given annual demand, which is the sum of the single profile values

class oemof.demandlib.demand.heat_demand[source]

Bases: object

oemof.demandlib.energy_buildings module

class oemof.demandlib.energy_buildings.Building(**kwargs)[source]

Bases: object

hourly_heat_demand(fun=None, **kwargs)[source]

Calculate hourly heat demand

Parameters:
  • self (building object) –
  • fun (python function) – function to use for heat demand calculation
  • kwargs (additional arguments) – arguments to use in fun
class oemof.demandlib.energy_buildings.IndustrialLoadProfile(method, **kwargs)[source]

Bases: object

Generate an industrial heat or electric load profile.

decider(method, **kwargs)[source]
simple_industrial_profile(**kwargs)[source]

Create industrial load profile

Parameters:
  • am (datetime.time) – beginning of workday
  • pm (datetime.time) – end of workday
  • week (list) – list of weekdays
  • weekend (list) – list of weekend days
  • profile_factors (dictionary) – dictionary with scaling factors for night and day of weekdays and weekend days
slp
class oemof.demandlib.energy_buildings.bdew_elec_slp(time_df, periods=None)[source]

Bases: object

Generate electrical standardized load profiles based on the BDEW method.

all_load_profiles(time_df)[source]
create_bdew_load_profiles(time_df, slp_types)[source]

Calculates the hourly electricity load profile in MWh/h of a region.

slp
year

Module contents