edisgo.io.dsm_import

Module Contents

Functions

oedb(edisgo_obj, scenario, engine[, timeindex])

Gets industrial and CTS DSM profiles from the

get_profiles_per_industrial_load(load_ids, scenario, ...)

Gets industrial DSM profiles per site and OSM area.

get_profile_cts(edisgo_obj, scenario, engine)

Gets CTS DSM profiles for all CTS loads in the MV grid.

edisgo.io.dsm_import.oedb(edisgo_obj: edisgo.EDisGo, scenario: str, engine: sqlalchemy.engine.base.Engine, timeindex=None)[source]

Gets industrial and CTS DSM profiles from the OpenEnergy DataBase.

Profiles comprise minimum and maximum load increase in MW as well as maximum energy pre- and postponing in MWh.

Parameters:
  • edisgo_object (EDisGo)

  • scenario (str) – Scenario for which to retrieve DSM data. Possible options are ‘eGon2035’ and ‘eGon100RE’.

  • engine (sqlalchemy.Engine) – Database engine.

  • timeindex (pandas.DatetimeIndex or None) – Specifies time steps for which to return data. Leap years can currently not be handled. In case the given timeindex contains a leap year, the data will be indexed using the default year (2035 in case of the ‘eGon2035’ and to 2045 in case of the ‘eGon100RE’ scenario) and returned for the whole year. If no timeindex is provided, the timeindex set in timeindex is used. If timeindex is not set, the data is indexed using the default year and returned for the whole year.

Returns:

Dictionary with DSM data with keys p_min, p_max, e_min and e_max (see DSM for more information). Values contain dataframes with DSM profiles per load for one year in an hourly resolution in MW. Index of the dataframes are time indices. Columns contain the load name the DSM profile is associated with as in index of loads_df.

Return type:

dict(str, pandas.DataFrame)

edisgo.io.dsm_import.get_profiles_per_industrial_load(load_ids, scenario: str, engine: sqlalchemy.engine.base.Engine)[source]

Gets industrial DSM profiles per site and OSM area.

Parameters:
  • load_ids (list(int)) – List of industrial site and OSM IDs to retrieve DSM profiles for.

  • scenario (str) – Scenario for which to retrieve DSM data. Possible options are ‘eGon2035’ and ‘eGon100RE’.

  • engine (sqlalchemy.Engine) – Database engine.

Returns:

Dictionary with DSM data with keys p_min, p_max, e_min and e_max. Values contain dataframes with DSM profiles per site and OSM area for one year in an hourly resolution in MW. Index contains hour of the year (from 0 to 8759) and column names are site ID as integer.

Return type:

dict(str, pandas.DataFrame)

edisgo.io.dsm_import.get_profile_cts(edisgo_obj: edisgo.EDisGo, scenario: str, engine: sqlalchemy.engine.base.Engine)[source]

Gets CTS DSM profiles for all CTS loads in the MV grid.

Parameters:
  • edisgo_object (EDisGo)

  • scenario (str) – Scenario for which to retrieve DSM data. Possible options are ‘eGon2035’ and ‘eGon100RE’.

  • engine (sqlalchemy.Engine) – Database engine.

Returns:

Dictionary with DSM data with keys p_min, p_max, e_min and e_max. Values contain dataframes with DSM profiles per CTS load for one year in an hourly resolution in MW. Index contains hour of the year (from 0 to 8759) and column names are site ID as integer.

Return type:

dict(str, pandas.DataFrame)

Notes

Be aware, that in this function the DSM time series are disaggregated to all CTS loads in the grid. In some cases, this can lead to an over- or underestimation of the DSM potential, as in egon_data buildings are mapped to a grid based on the zensus cell they are in whereas in ding0 buildings are mapped to a grid based on the geolocation. As it can happen that buildings lie outside an MV grid but within a zensus cell that is assigned to that MV grid, they are mapped differently in egon_data and ding0.