### Install oemof.demand Source: https://github.com/oemof/oemof-demand/blob/dev/README.rst Install the package using pip. For the in-development version, use the provided URL. ```bash pip install oemof-demand ``` ```bash pip install https://github.com/oemof/oemof-demand/archive/dev.zip ``` -------------------------------- ### Import BDEW Module Source: https://github.com/oemof/oemof-demand/blob/dev/docs/bdew.md Import the necessary BDEW module from the oemof.demand library to start generating load profiles. ```python from oemof.demand import bdew ... ``` -------------------------------- ### Initialize ElecSlp and Get Profile Names Source: https://github.com/oemof/oemof-demand/blob/dev/docs/bdew.md Initializes the `ElecSlp` class for a specific year and demonstrates how to retrieve the names of all available standard load profiles. ```python from oemof.demand import bdew e_slp = bdew.ElecSlp(year=2020) # get all available types print(e_slp.get_profiles().columns) ``` -------------------------------- ### Get Scaled BDEW Profiles by Energy Value Source: https://github.com/oemof/oemof-demand/blob/dev/docs/bdew.md Demonstrates how to obtain scaled standard load profiles based on provided annual energy consumption values (e.g., in kWh) for different profile types. ```python # get scaled profiles scaled_profiles = e_slp.get_scaled_profiles({"h0": 3000, "g0": 5000}) ``` -------------------------------- ### Get Scaled BDEW Profiles by Power Value Source: https://github.com/oemof/oemof-demand/blob/dev/docs/bdew.md Illustrates how to retrieve scaled standard load profiles, converting energy units to power units (e.g., Wh to W) using a conversion factor. ```python # get scaled profiles with power values instead of energy values # a conversion_factor of 4 will convert Wh, kWh etc. to W, kW e_slp.get_scaled_power_profiles({"h0": 3000, "g0": 5000}, conversion_factor=4) ``` -------------------------------- ### Get All and Selected Load Profiles Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Retrieves all available load profiles or a selection of specific profiles. The profiles are normalized to 1. Use this to inspect available profile types or get data for specific profiles. ```python >>> from oemof.demand import bdew >>> e_slp = bdew.ElecSlp(year=2020) >>> ", ".join(sorted(e_slp.get_profiles().columns)) 'g0, g1, g2, g3, g4, g5, g6, h0, h0_dyn, l0, l1, l2' >>> e_slp.get_profiles("h0", "g0").head() h0 g0 2020-01-01 00:00:00 0.000017 0.000016 2020-01-01 00:15:00 0.000015 0.000015 2020-01-01 00:30:00 0.000014 0.000015 2020-01-01 00:45:00 0.000012 0.000014 2020-01-01 01:00:00 0.000012 0.000013 ``` ```python >>> e_slp.get_profiles("h0", "g0").sum() h0 1.0 g0 1.0 dtype: float64 ``` -------------------------------- ### Get Scaled Energy Profiles Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Retrieves load profiles scaled by their annual energy demand. The sum of each profile column will equal the annual demand specified. Use this when working with energy units (e.g., MWh) and you need the profile to match a specific annual consumption. ```python >>> from oemof.demand import bdew >>> e_slp = bdew.ElecSlp(year=2020) >>> e_slp.get_scaled_profiles({"h0": 3000, "g0": 5000}).head() g0 h0 2020-01-01 00:00:00 0.080084 0.050657 2020-01-01 00:15:00 0.076466 0.045591 2020-01-01 00:30:00 0.072897 0.041125 2020-01-01 00:45:00 0.069671 0.037408 2020-01-01 01:00:00 0.067030 0.034650 ``` ```python >>> e_slp.get_scaled_profiles({"h0": 3000, "g0": 5000}).sum() g0 5000.0 h0 3000.0 dtype: float64 ``` -------------------------------- ### Get BDEW Heat Profile Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Calculates the hourly heat demand using the BDEW equations. This method is part of the HeatBuilding class. ```python hourly_profile = building.get_bdew_profile() ``` -------------------------------- ### Get Sigmoid Factors for Heat Profile Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Retrieves the sigmoid factors from a CSV file, used in the calculation of heat load profiles. The filename can be specified. ```python sigmoid_factors = building.get_sigmoid_parameters(filename='shlp_sigmoid_factors.csv') ``` -------------------------------- ### Get Weekday Factors for Heat Profile Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Retrieves the weekday parameters from a CSV file, used in the calculation of heat load profiles. The filename can be specified. ```python weekday_factors = building.get_weekday_parameters(filename='shlp_weekday_factors.csv') ``` -------------------------------- ### Get Normalized BDEW Heat Profile Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Calculates the normalized hourly heat demand using the BDEW equations. This method is part of the HeatBuilding class. ```python normalized_profile = building.get_normalized_bdew_profile() ``` -------------------------------- ### Industrial Load Profile Factors Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Defines the scaling factors for industrial load profiles, differentiating between weekdays, weekends, and holidays, as well as day and night periods. Ensure the structure matches this example. ```python { "week": {"day": 0.8, "night": 0.6}, "weekend": {"day": 0.9, "night": 0.7}, "holiday": {"day": 0.9, "night": 0.7}, } ``` -------------------------------- ### Get Scaled Power Profiles Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Calculates scaled power profiles based on annual energy demand for each sector. A conversion factor is used to convert energy units to power units, assuming a 15-minute interval. Use this when you need power values (e.g., kW, MW) for each time step. ```python >>> from oemof.demand import bdew >>> e_slp = bdew.ElecSlp(year=2020) >>> e_slp.get_scaled_power_profiles({"h0": 3000, "g0": 5000}).head() g0 h0 2020-01-01 00:00:00 0.320338 0.202627 2020-01-01 00:15:00 0.305866 0.182365 2020-01-01 00:30:00 0.291590 0.164500 2020-01-01 00:45:00 0.278682 0.149633 2020-01-01 01:00:00 0.268122 0.138602 ``` ```python >>> cf = 4 >>> spp = e_slp.get_scaled_power_profiles({"h0": 3000, "g0": 5000}, ... conversion_factor=cf) >>> spp.sum() g0 20000.0 h0 12000.0 dtype: float64 ``` ```python >>> spp.div(cf).sum() g0 5000.0 h0 3000.0 dtype: float64 ``` -------------------------------- ### Run All Checks and Docs Builder with Tox Source: https://github.com/oemof/oemof-demand/blob/dev/docs/contributing.md Execute all defined test environments and the documentation builder using tox. This ensures your changes meet project standards. ```bash tox ``` -------------------------------- ### Initialize HeatBuilding Class Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Initializes the HeatBuilding class for creating BDEW heat load profiles. Requires a DatetimeIndex and various parameters to define the building and its heat demand characteristics. ```python from oemof.demand.bdew.heat_building import HeatBuilding from pandas import DatetimeIndex timeindex = DatetimeIndex(start='2022-01-01', end='2022-12-31', freq='H') building = HeatBuilding(df_index=timeindex, year=2022, annual_heat_demand=10000, building_class=1, shlp_type='EFH', wind_class=0, ww_incl=True) ``` -------------------------------- ### Initialize ElecSlp with Custom Holidays Source: https://github.com/oemof/oemof-demand/blob/dev/docs/bdew.md Shows how to initialize the `ElecSlp` class with a custom set of holidays, which are treated as Sundays for load profile calculations. ```python # add holidays, holidays are treated as Sundays holidays = { datetime.date(2010, 1, 1): "New year", datetime.date(2010, 10, 3): "Day of German Unity", } e_slp = bdew.ElecSlp(year=2010, holidays=holidays) ``` -------------------------------- ### Clone oemof-demand Repository Source: https://github.com/oemof/oemof-demand/blob/dev/docs/contributing.md Clone your forked repository locally to begin development. Replace YOURGITHUBNAME with your GitHub username. ```bash git clone git@github.com:YOURGITHUBNAME/oemof-demand.git ``` -------------------------------- ### Generate Residential Load Profiles with VDI4655 Source: https://github.com/oemof/oemof-demand/blob/dev/docs/vdi4655.md This snippet demonstrates how to define houses with their parameters and create a region to generate hourly load curves for heating, hot water, and electricity demand. ```python from oemof.demand import vdi # Define houses houses = [ { "name": "EFH_1", "house_type": "EFH", "N_Pers": 3, "N_WE": 1, "Q_Heiz_a": 6000, "Q_TWW_a": 1500, "W_a": 5250, "summer_temperature_limit": 15, "winter_temperature_limit": 5, } ] # Create region region = vdi.Region( 2017, climate=vdi.Climate().from_try_data(try_region=4), houses=houses, resample_rule="1h" ) # Generate load curves load_curves = region.get_load_curve_houses() ``` -------------------------------- ### Appoint Temperature Interval Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Appoints the corresponding temperature interval to each temperature in the temperature vector. This is used in the load profile calculations. ```python temperature_intervals = building.get_temperature_interval() ``` -------------------------------- ### Run All Test Environments in Parallel with Tox Source: https://github.com/oemof/oemof-demand/blob/dev/docs/contributing.md Utilize tox's parallel execution feature to speed up testing by running all defined test environments concurrently. ```bash tox -p auto ``` -------------------------------- ### Retrieve Specific BDEW Profiles Source: https://github.com/oemof/oemof-demand/blob/dev/docs/bdew.md Shows how to fetch specific BDEW standard load profiles, such as 'h0' (household) and 'g0' (general business), from the `ElecSlp` object. ```python # get the "h0" and "g0" profile profiles = e_slp.get_profiles("h0", "g0") ``` -------------------------------- ### oemof.demand.bdew.elec_slp.ElecSlp.create_bdew_load_profiles Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Creates BDEW electrical load profiles based on specified parameters. ```APIDOC ## ElecSlp.create_bdew_load_profiles() ### Description Creates BDEW electrical load profiles. This method allows for the generation of various load profiles according to the BDEW standard. ### Method `ElecSlp.create_bdew_load_profiles()` ### Returns - pandas.DataFrame: A DataFrame containing the generated load profiles. ``` -------------------------------- ### oemof.demand.bdew.elec_slp.ElecSlp.create_dynamic_h0_profile Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Creates a dynamic H0 electrical load profile. ```APIDOC ## ElecSlp.create_dynamic_h0_profile() ### Description Generates a dynamic H0 electrical load profile. This profile is suitable for simulating household electricity consumption. ### Method `ElecSlp.create_dynamic_h0_profile()` ### Returns - pandas.DataFrame: A DataFrame representing the dynamic H0 load profile. ``` -------------------------------- ### Commit and Push Changes Source: https://github.com/oemof/oemof-demand/blob/dev/docs/contributing.md Stage all changes, commit them with a descriptive message, and push your branch to GitHub to prepare for a pull request. ```bash git add . git commit -m "Your detailed description of your changes." git push origin name-of-your-bugfix-or-feature ``` -------------------------------- ### IndustrialLoadProfile.simple_profile Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Generates an industrial step load profile based on annual demand and various time-based factors. ```APIDOC ## IndustrialLoadProfile.simple_profile ### Description Create industrial step load profile. ### Method This is a method of the `IndustrialLoadProfile` class. ### Parameters #### Parameters - **annual_demand** (float) - Total demand over the period given upon initialisation of IndustrialLoadProfile through parameter dt_index. This is actually only the annual demand, if an entire year was given. - **am** (datetime.time) - Defines the beginning of the workday. Default: 7 a.m. - **pm** (datetime.time) - Defines the end of the workday. Default: 11:30 p.m. - **week** (list(int)) - List of weekdays, where 1 corresponds to Monday, 2 to Tuesday, etc. Default: [1, 2, 3, 4, 5]. - **weekend** (list(int)) - List of weekend days, where 1 corresponds to Monday, 2 to Tuesday, etc. Default: [6, 7]. - **holiday** (list(int)) - List of holiday days. Default: [0]. - **profile_factors** (dict) - Dictionary with load profile scaling factors for night and day of weekdays, weekend days and holidays. Default: ```python { "week": {"day": 0.8, "night": 0.6}, "weekend": {"day": 0.9, "night": 0.7}, "holiday": {"day": 0.9, "night": 0.7}, } ``` ### Returns *pd.Series* – Series with demand per time step (unit depends on the unit the annual_demand was provided with). Index is a DatetimeIndex containing all time steps the IndustrialLoadProfile was initialised with. ``` -------------------------------- ### Climate.from_try_data Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Creates a Climate object using data from TRY (The German Weather Data Service). ```APIDOC ## Climate.from_try_data ### Description Creates a Climate object using data from TRY (The German Weather Data Service). ### Method This is a static method of the `Climate` class. ### Parameters #### Parameters - **try_region** (str) - The region identifier for TRY data. - **hoy** (int) - Number of hours in the year. Default: 8760. ``` -------------------------------- ### Run all tests with tox Source: https://github.com/oemof/oemof-demand/blob/dev/README.rst Execute all tests using the tox command. To combine coverage data from multiple tox environments, set the PYTEST_ADDOPTS environment variable. ```bash tox ``` ```bash set PYTEST_ADDOPTS=--cov-append tox ``` ```bash PYTEST_ADDOPTS=--cov-append tox ``` -------------------------------- ### oemof.demand.vdi.regions.Region.get_daily_energy_demand_houses Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Calculates the daily energy demand for houses in a region. ```APIDOC ## Region.get_daily_energy_demand_houses() ### Description Computes the daily energy demand for all houses within a region, considering their types and parameters. ### Method `Region.get_daily_energy_demand_houses(climate: Climate, year: int)` ### Parameters #### Path Parameters - **climate** (Climate) - Required - A Climate object providing weather data. - **year** (int) - Required - The year for which to calculate the demand. ### Returns - pandas.DataFrame: A DataFrame containing the daily energy demand for each house type. ``` -------------------------------- ### ElecSlp.get_profiles Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Retrieves all or selected normalized load profiles. The profiles are normalized to 1. Use `e_slp.get_profiles().columns` to see all available profile types. ```APIDOC ## ElecSlp.get_profiles ### Description Get all or the selected profiles. To select profiles you can pass the name of the types as strings. The profiles are normalised to 1. ### Method GET (conceptual) ### Parameters #### Path Parameters None #### Query Parameters * **profile_names** (list of strings) - Optional - Names of the profile types to retrieve. ### Response #### Success Response (200) - **pandas.DataFrame** - Table with all or the selected profiles. ### Request Example ```python from oemof.demand import bdew e_slp = bdew.ElecSlp(year=2020) print(e_slp.get_profiles()) print(e_slp.get_profiles("h0", "g0")) ``` ### Response Example ```json { "example": "pandas.DataFrame output showing normalized profiles" } ``` ``` -------------------------------- ### oemof.demand.bdew.elec_slp.ElecSlp.get_scaled_profiles Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Generates scaled electrical load profiles. ```APIDOC ## ElecSlp.get_scaled_profiles() ### Description Generates scaled electrical load profiles. This function allows for scaling existing profiles to match different consumption levels. ### Method `ElecSlp.get_scaled_profiles()` ### Returns - pandas.DataFrame: A DataFrame containing scaled electrical load profiles. ``` -------------------------------- ### oemof.demand.bdew.elec_slp.ElecSlp.all_load_profiles Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Retrieves all available BDEW electrical load profiles. ```APIDOC ## ElecSlp.all_load_profiles() ### Description Returns a list of all available BDEW electrical load profiles. ### Method `ElecSlp.all_load_profiles()` ### Returns - list: A list of strings, where each string is the name of a load profile. ``` -------------------------------- ### oemof.demand.bdew.elec_slp.ElecSlp.get_scaled_power_profiles Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Generates scaled electrical power profiles. ```APIDOC ## ElecSlp.get_scaled_power_profiles() ### Description Calculates and returns scaled electrical power profiles. This is useful for adjusting load profiles to specific power demands. ### Method `ElecSlp.get_scaled_power_profiles()` ### Returns - pandas.DataFrame: A DataFrame with scaled power profiles. ``` -------------------------------- ### oemof.demand.bdew.heat_building.HeatBuilding.get_sigmoid_parameters Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Retrieves sigmoid parameters for heat demand modeling. ```APIDOC ## HeatBuilding.get_sigmoid_parameters() ### Description Retrieves the parameters for the sigmoid function used in modeling heat demand. These parameters influence the shape of the demand curve. ### Method `HeatBuilding.get_sigmoid_parameters(building_type: str)` ### Parameters #### Path Parameters - **building_type** (str) - Required - The type of building. ### Returns - dict: A dictionary containing sigmoid parameters. ``` -------------------------------- ### oemof.demand.particular_profiles.IndustrialLoadProfile.simple_profile Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Generates a simple industrial electrical load profile. ```APIDOC ## IndustrialLoadProfile.simple_profile() ### Description Creates a simplified industrial electrical load profile. This is a basic representation of industrial electricity consumption. ### Method `IndustrialLoadProfile.simple_profile(peak_load: float, duration: int)` ### Parameters #### Path Parameters - **peak_load** (float) - Required - The peak electrical load for the profile. - **duration** (int) - Required - The duration of the profile in hours. ### Returns - pandas.DataFrame: A DataFrame representing the simple industrial load profile. ``` -------------------------------- ### oemof.demand.bdew.elec_slp.ElecSlp.get_profiles Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Retrieves multiple BDEW electrical load profiles. ```APIDOC ## ElecSlp.get_profiles() ### Description Retrieves multiple BDEW electrical load profiles based on a list of profile names. ### Method `ElecSlp.get_profiles(profile_names: list[str])` ### Parameters #### Path Parameters - **profile_names** (list[str]) - Required - A list of names of the load profiles to retrieve. ### Returns - pandas.DataFrame: A DataFrame containing the requested load profiles. ``` -------------------------------- ### ElecSlp.get_scaled_profiles Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Generates profiles scaled by their annual energy demand. The sum of the returned profiles equals the annual demand. ```APIDOC ## ElecSlp.get_scaled_profiles ### Description Get profiles scaled by there annual value. The sum of the returned profiles equals the annual demand. ### Method GET (conceptual) ### Parameters #### Path Parameters None #### Query Parameters * **ann_el_demand_per_sector** (dict) - Required - The annual demand in an energy unit for each type. ### Response #### Success Response (200) - **pandas.DataFrame** - Table with scaled profiles. ### Request Example ```python from oemof.demand import bdew e_slp = bdew.ElecSlp(year=2020) scaled_profiles = e_slp.get_scaled_profiles({"h0": 3000, "g0": 5000}) print(scaled_profiles) ``` ### Response Example ```json { "example": "pandas.DataFrame output showing scaled profiles" } ``` ``` -------------------------------- ### oemof.demand.bdew.heat_building.HeatBuilding.get_bdew_profile Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Retrieves a BDEW heat profile for a building. ```APIDOC ## HeatBuilding.get_bdew_profile() ### Description Fetches the BDEW heat profile for a specific building type. This profile represents the typical heat demand of a building. ### Method `HeatBuilding.get_bdew_profile(building_type: str, year: int)` ### Parameters #### Path Parameters - **building_type** (str) - Required - The type of building (e.g., 'H0', 'R1'). - **year** (int) - Required - The year for which to retrieve the profile. ### Returns - pandas.DataFrame: The BDEW heat profile for the specified building and year. ``` -------------------------------- ### Create a New Branch for Development Source: https://github.com/oemof/oemof-demand/blob/dev/docs/contributing.md Create a new branch for your bugfix or feature development. This isolates your changes and makes them easier to manage. ```bash git checkout -b name-of-your-bugfix-or-feature ``` -------------------------------- ### oemof.demand.vdi.regions.Climate.from_try_data Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Creates a Climate object from TRY weather data. ```APIDOC ## Climate.from_try_data() ### Description Initializes a Climate object using data from the Test Reference Year (TRY) weather dataset. ### Method `Climate.from_try_data(location: str, year: int)` ### Parameters #### Path Parameters - **location** (str) - Required - The geographical location for the weather data. - **year** (int) - Required - The specific TRY year to use. ### Returns - Climate: An initialized Climate object. ``` -------------------------------- ### oemof.demand.bdew.heat_building.HeatBuilding.get_weekday_parameters Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Retrieves weekday-specific parameters for heat demand. ```APIDOC ## HeatBuilding.get_weekday_parameters() ### Description Fetches parameters that define heat demand variations across different weekdays. ### Method `HeatBuilding.get_weekday_parameters(building_type: str)` ### Parameters #### Path Parameters - **building_type** (str) - Required - The type of building. ### Returns - dict: A dictionary containing weekday-specific parameters. ``` -------------------------------- ### read_dwd_weather_file Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Reads and parses DWD test reference year (TRY) weather data files, extracting temperature and cloud cover data. The function supports DWD weather files from 2010 or 2016. If no file path is provided, a default file for the specified region will be used. ```APIDOC ## read_dwd_weather_file(weather_file_path) ### Description Reads and parses DWD test reference year (TRY) weather data files. This function reads TRY weather data files published by the German Weather Service (Deutscher Wetterdienst, DWD) and extracts temperature and cloud cover data. The 2016 DWD weather files can be obtained from: [https://kunden.dwd.de/obt/](https://kunden.dwd.de/obt/) (registration required) ### Parameters #### Path Parameters - **weather_file_path** (str, optional) - Path to a TRY weather file. The file must follow the DWD format from 2010 or 2016. If None, a default file for the given try_region will be used. ### Returns *pandas.DataFrame* – DataFrame with hourly weather data ### Raises * **TypeError** – If the weather file does not follow the expected DWD format * **FileNotFoundError** – If the weather file cannot be found ``` -------------------------------- ### Run a Subset of Tests with Tox and Pytest Source: https://github.com/oemof/oemof-demand/blob/dev/docs/contributing.md Execute a specific subset of tests by targeting a particular tox environment and using pytest's -k flag to filter tests by name. ```bash tox -e envname -- pytest -k test_myfeature ``` -------------------------------- ### oemof.demand.vdi.dwd_try.read_dwd_weather_file Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Reads weather data from a DWD TRY file. ```APIDOC ## read_dwd_weather_file() ### Description Parses and reads weather data from a file provided by the German Weather Service (DWD) for the Test Reference Year (TRY). ### Method `read_dwd_weather_file(filepath: str)` ### Parameters #### Path Parameters - **filepath** (str) - Required - The path to the DWD TRY weather data file. ### Returns - pandas.DataFrame: A DataFrame containing the weather data. ``` -------------------------------- ### oemof.demand.vdi.regions.Region.get_load_curve_houses Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Generates the hourly load curve for houses in a region. ```APIDOC ## Region.get_load_curve_houses() ### Description Generates the hourly load curve for all houses in a region based on the provided climate data and year. ### Method `Region.get_load_curve_houses(climate: Climate, year: int)` ### Parameters #### Path Parameters - **climate** (Climate) - Required - A Climate object with weather data. - **year** (int) - Required - The year for which to generate the load curve. ### Returns - pandas.DataFrame: A DataFrame representing the hourly load curve for the region. ``` -------------------------------- ### oemof.demand.bdew.elec_slp.dynamisation_function Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Applies a dynamisation function to a load profile. ```APIDOC ## dynamisation_function() ### Description Applies a dynamisation function to a given load profile, typically used for adjusting profiles over time or under specific conditions. ### Method `dynamisation_function(profile: pandas.DataFrame, params: dict)` ### Parameters #### Path Parameters - **profile** (pandas.DataFrame) - Required - The load profile to be dynamised. - **params** (dict) - Required - A dictionary containing parameters for the dynamisation function. ### Returns - pandas.DataFrame: The dynamised load profile. ``` -------------------------------- ### Industrial Electrical Profile Generation Source: https://github.com/oemof/oemof-demand/blob/dev/docs/further_profiles.md Generates an industrial electrical demand profile using a step function. Requires defining holidays and scaling factors for different periods. The `dt_index` parameter specifies the time resolution and duration. ```python import datetime import oemof.demand.particular_profiles as profiles import pandas as pd holidays = { datetime.date(2018, 1, 1): "New year", } # Set up IndustrialLoadProfile ilp = profiles.IndustrialLoadProfile( dt_index=pd.date_range("01-01-2018", "01-01-2019", freq="15min"), holidays=holidays ) # Get step load profile with own scaling factors and definition of # beginning of workday ind_elec_demand = ilp.simple_profile( annual_demand=1e4, am=datetime.time(9, 0, 0), profile_factors={ "week": {"day": 1.0, "night": 0.8}, "weekend": {"day": 0.8, "night": 0.6}, "holiday": {"day": 0.2, "night": 0.2}, }, ) ``` -------------------------------- ### Determine Heat Load Profile Factors Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Determines the h-values (hourly factors) for the standardized heat load profile. The filename for these factors can be specified. ```python h_values = building.get_sf_values(filename='shlp_hour_factors.csv') ``` -------------------------------- ### oemof.demand.bdew.heat_building.HeatBuilding.get_normalized_bdew_profile Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Retrieves a normalized BDEW heat profile. ```APIDOC ## HeatBuilding.get_normalized_bdew_profile() ### Description Returns a normalized BDEW heat profile, typically scaled to a peak load of 1. ### Method `HeatBuilding.get_normalized_bdew_profile(building_type: str, year: int)` ### Parameters #### Path Parameters - **building_type** (str) - Required - The type of building. - **year** (int) - Required - The year for the profile. ### Returns - pandas.DataFrame: The normalized BDEW heat profile. ``` -------------------------------- ### oemof.demand.bdew.heat_building.HeatBuilding Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Class for implementing BDEW heat load profiles for buildings. It allows for the calculation of hourly heat demand based on various building and environmental parameters. ```APIDOC ## class HeatBuilding(df_index, **kwargs) ### Description Implementation of the bdew heat load profiles. ### Parameters #### Path Parameters - **df_index** (object) - Required - Index for the DataFrame. #### Keyword Arguments - **year** (int) - Required - year for which the profile is created ### Variables - **datapath** (string) - path to the bdew basic data files (csv) - **temperature** (pandas.Series) - Series containing hourly temperature data - **annual_heat_demand** (float) - annual heat demand of building in kWh - **building_class** (int) - class of building according to bdew classification: possible numbers for EFH and MFH are: 1 - 11. Possible numbers for non-residential buildings are: 0. - **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 (0=not windy or 1=windy) - **ww_incl** (boolean) - decider whether warm water load is included in the heat load profile - **ww_only** (boolean) - if true, only warm water load is included in the heat load profile ### Methods #### get_bdew_profile() Calculation of the hourly heat demand using the bdew-equations #### get_normalized_bdew_profile() Calculation of the normalized hourly heat demand #### get_sf_values(filename='shlp_hour_factors.csv') Determine the h-values ##### Parameters - **filename** (string) - Optional - name of file where sigmoid factors are stored #### get_sigmoid_parameters(filename='shlp_sigmoid_factors.csv') Retrieve the sigmoid parameters from csv-files ##### Parameters - **filename** (string) - Optional - name of file where sigmoid factors are stored #### get_temperature_interval() Appoints the corresponding temperature interval to each temperature in the temperature vector. #### get_weekday_parameters(filename='shlp_weekday_factors.csv') Retrieve the weekday parameter from csv-file ##### Parameters - **filename** (string) - Optional - name of file where sigmoid factors are stored #### weighted_temperature(how='geometric_series') A new temperature vector is generated containing a multi-day average temperature as needed in the load profile function. ##### Parameters - **how** (string) - Optional - string which type to return (“geometric_series” or “mean”) ``` -------------------------------- ### oemof.demand.bdew.heat_building.HeatBuilding.weighted_temperature Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Calculates a weighted temperature value. ```APIDOC ## HeatBuilding.weighted_temperature() ### Description Computes a weighted temperature value, likely used in conjunction with other parameters to model heat demand accurately. ### Method `HeatBuilding.weighted_temperature(temperature: float, building_type: str)` ### Parameters #### Path Parameters - **temperature** (float) - Required - The ambient temperature. - **building_type** (str) - Required - The type of building. ### Returns - float: The calculated weighted temperature. ``` -------------------------------- ### Generate Weighted Temperature Vector Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Generates a new temperature vector containing a multi-day average temperature, as needed for the load profile function. Supports 'geometric_series' or 'mean' methods. ```python weighted_temp_series = building.weighted_temperature(how='geometric_series') ``` ```python weighted_temp_mean = building.weighted_temperature(how='mean') ``` -------------------------------- ### oemof.demand.bdew.heat_building.HeatBuilding.get_sf_values Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Retrieves specific heat demand parameters (SF values) for BDEW profiles. ```APIDOC ## HeatBuilding.get_sf_values() ### Description Fetches the specific heat (SF) values used in BDEW heat profile calculations. These values are characteristic for different building types. ### Method `HeatBuilding.get_sf_values(building_type: str)` ### Parameters #### Path Parameters - **building_type** (str) - Required - The type of building. ### Returns - dict: A dictionary containing SF values for the specified building type. ``` -------------------------------- ### oemof.demand.vdi.regions.Region.add_houses Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Adds houses with specified parameters to a region. ```APIDOC ## Region.add_houses() ### Description Adds one or more houses to a region object. Each house can have specific parameters defining its characteristics. ### Method `Region.add_houses(house_type: str, number: int, area: float, **kwargs)` ### Parameters #### Path Parameters - **house_type** (str) - Required - The type of house (e.g., 'single_family', 'multi_family'). - **number** (int) - Required - The number of houses of this type to add. - **area** (float) - Required - The average area of the houses in square meters. - **kwargs** - Optional - Additional parameters for the houses (e.g., heating system, insulation). ### Returns - None ``` -------------------------------- ### oemof.demand.bdew.elec_slp.ElecSlp.get_profile Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Retrieves a specific BDEW electrical load profile by name. ```APIDOC ## ElecSlp.get_profile() ### Description Fetches a specific BDEW electrical load profile by its name. ### Method `ElecSlp.get_profile(profile_name: str)` ### Parameters #### Path Parameters - **profile_name** (str) - Required - The name of the load profile to retrieve. ### Returns - pandas.DataFrame: The requested load profile. ``` -------------------------------- ### Calculate BDEW Dynamisation Function Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Calculates the dynamisation function of the BDEW to smoothen seasonal edges. The function's resolution is daily. ```python from oemof.demand.bdew.elec_slp import dynamisation_function from pandas import DatetimeIndex timeindex = DatetimeIndex(start='2022-01-01', end='2022-12-31', freq='D') dynamisation_function(timeindex) ``` -------------------------------- ### oemof.demand.bdew.heat_building.HeatBuilding.get_temperature_interval Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Determines the temperature interval for a given heat demand profile. ```APIDOC ## HeatBuilding.get_temperature_interval() ### Description Calculates the temperature interval associated with a specific BDEW heat profile, which is crucial for dynamic adjustments. ### Method `HeatBuilding.get_temperature_interval(building_type: str, year: int)` ### Parameters #### Path Parameters - **building_type** (str) - Required - The type of building. - **year** (int) - Required - The year for the profile. ### Returns - tuple: A tuple representing the temperature interval (min_temp, max_temp). ``` -------------------------------- ### ElecSlp.get_scaled_power_profiles Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Generates power profiles scaled by their annual energy demand. Each value represents the average power of an interval. A conversion factor is used to convert energy units to power units. ```APIDOC ## ElecSlp.get_scaled_power_profiles ### Description Get profiles scaled by their annual value. Each value represents the average power of an interval. Therefore, it is not possible to sum up the array. A conversion factor is used to calculate power units from energy units. By default the conversion factor is 4. As the interval of each profile is 15 minutes a conversion factor of 4 will convert energy units like Wh, kWh, MWh etc. to power units like W, kW, MW etc.. ### Method GET (conceptual) ### Parameters #### Path Parameters None #### Query Parameters * **ann_el_demand_per_sector** (dict) - Required - The annual demand in an energy unit for each type. * **conversion_factor** (float) - Optional - Factor to convert the energy unit of the annual value to the power unit of each interval. Defaults to 4. ### Response #### Success Response (200) - **pandas.DataFrame** - Table with scaled power profiles. ### Request Example ```python from oemof.demand import bdew e_slp = bdew.ElecSlp(year=2020) scaled_profiles = e_slp.get_scaled_power_profiles({"h0": 3000, "g0": 5000}, conversion_factor=4) print(scaled_profiles) ``` ### Response Example ```json { "example": "pandas.DataFrame output showing scaled power profiles" } ``` ``` -------------------------------- ### oemof.demand.vdi.dwd_try.find_try_region Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Finds the DWD TRY region based on provided geographical coordinates. ```APIDOC ## oemof.demand.vdi.dwd_try.find_try_region(longitude, latitude) ### Description Find the DWD TRY region by coordinates. ### NOTE - Latitude and longitude must be provided in the coordinate reference system `EPSG:4326`. - The packages geopandas and shapely need to be installed to use this function. ### Parameters * **longitude** (*float*) – Longitude coordinate. * **latitude** (*float*) – Latitude coordinate. ### Returns **DWD TRY region number** (*int*) – The identified DWD TRY region number. ### Raises **ImportError** – If geopandas or shapely are not installed. ``` -------------------------------- ### oemof.demand.vdi.regions.Region Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Defines region-dependent boundary conditions for load profiles. Allows for the addition of houses and generation of their load profiles. ```APIDOC ## class oemof.demand.vdi.regions.Region(year, climate, seasons=None, holidays=None, houses=None, resample_rule=None, zero_summer_heat_demand=False) ### Description Define region-dependent boundary conditions for the load profiles. After adding houses to the region, the load profiles for each house can be generated. ### Parameters * **year** (*int*) – Year of the profile. * **climate** (*object*) – Climate data object. * **seasons** (*dict (optional)*) – The times of the seasons if fixed seasons are used. In the VDI norm seasons are defined by the daily average temperature: Winter below 5 degree Celsius, Spring between 5 and 15 degree Celsius and summer above 15 degree Celsius. * **holidays** (*dict or list (optional)*) – In case of a dictionary the keys are datetime objects and the values are strings with the name of the holiday. Otherwise a list of datetime objects should be passed. * **houses** (*list (optional)*) – A list of dictionaries in which each house is defined the dictionary need to have the following keys. * **resample_rule** (*str (optional)*) – Time interval to resample the profile e.g. 1h (1 hour) or 15min. The value will be passed to the pandas resample method. * **zero_summer_heat_demand** (*bool (optional)*) – Set heat demand on all summer days to zero. Per default, multi-family houses have a small heat demand even in summer. (This is not part of VDI 4655) ``` ```APIDOC ## add_houses(houses) ### Description Add houses to the region object. ### Parameters * **houses** (*list*) – A list of dictionaries that describes the houses. Required parameters for each house: * `name`: Unique identifier for the house * `house_type`: Either “EFH” (single-family) or “MFH” (multi-family) * `N_Pers`: Number of persons, up to 12 (relevant for EFH) * `N_WE`: Number of apartments, up to 40 (relevant for MFH) * `Q_Heiz_a`: Annual heating demand in kWh * `Q_TWW_a`: Annual hot water demand in kWh * `W_a`: Annual electricity demand in kWh Optional: * `summer_temperature_limit`: Temperature threshold for summer season (default: 15°C) * `winter_temperature_limit`: Temperature threshold for winter season (default: 5°C) ``` ```APIDOC ## get_daily_energy_demand_houses(tl) ### Description Determine the houses’ energy demand values for each ‘typtag’. ### NOTE “The factors `F_el_TT` and `F_TWW_TT` are negative in some cases as they represent a variation from a one-year average. The values for the daily demand for electrical energy, `W_TT`, and DHW energy, `Q_TWW_TT`, usually remain positive. It is only in individual cases that the calculation for the typical-day category `SWX` can yield a negative value of the DHW demand. In that case, assume `F_TWW_SWX` = 0.” (VDI 4655, page 16) This occurs when `N_Pers` or `N_WE` are larger than their allowed maximum of 12 persons (for single-family houses) and 40 apartments (for multi-family houses). ``` ```APIDOC ## get_load_curve_houses() ### Description Generate time series of energy demand values for all houses. This method calculates the energy demands heating, hot water, and electricity for each house in the region based on the VDI 4655 typical day profiles. The calculation uses daily energy demands and typical load profiles, which are combined to create a full year time series for each house and energy type. The resulting time series are normalized to match the annual energy demands specified in the house parameters (Q_Heiz_a, Q_TWW_a, W_a). ### Returns *pandas.DataFrame* – MultiIndex DataFrame with the following structure: - Index: DatetimeIndex with the time steps - Columns: MultiIndex with levels - name: House identifier - house_type: Either “EFH” or “MFH” - energy: Energy type (“Q_Heiz_TT”, “Q_TWW_TT”, or “W_TT”) - Values: Energy demand in kWh per time step ``` -------------------------------- ### oemof.demand.vdi.dwd_try.find_try_region Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Finds the nearest TRY region for a given location. ```APIDOC ## find_try_region() ### Description Identifies the closest Test Reference Year (TRY) region based on geographical coordinates or a location name. ### Method `find_try_region(location: str)` ### Parameters #### Path Parameters - **location** (str) - Required - The name or coordinates of the location. ### Returns - str: The name of the nearest TRY region. ``` -------------------------------- ### oemof.demand.bdew.elec_slp.dynamisation_function Source: https://github.com/oemof/oemof-demand/blob/dev/docs/reference/index.md Applies the BDEW dynamisation function to smooth seasonal edges of electrical load profiles. The function operates on a daily resolution. ```APIDOC ## dynamisation_function(timeindex: DatetimeIndex) -> Series ### Description Use the dynamisation function of the BDEW to smoothen the seasonal edges. Functions resolution is daily. ### Parameters #### Path Parameters - **timeindex** (DatetimeIndex) - Required - The time index for which to calculate the dynamisation function. ### Response #### Success Response (Series) - **Series** - A pandas Series containing the dynamised values. ``` -------------------------------- ### oemof.demand.vdi.regions.Climate.check_attributes Source: https://github.com/oemof/oemof-demand/blob/dev/docs/index.md Validates the attributes of a Climate object. ```APIDOC ## Climate.check_attributes() ### Description Checks if the attributes of a Climate object are valid and complete for use in VDI load profile calculations. ### Method `Climate.check_attributes()` ### Returns - bool: True if attributes are valid, False otherwise. ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.