:py:mod:`eelib.core.control.hems.schedule_helper` ================================================= .. py:module:: eelib.core.control.hems.schedule_helper .. autoapi-nested-parse:: Helper functions for the creation of schedules in EMS. Pyomo released under 3-clause BSD license | Author: elenia@TUBS | Copyright 2024 elenia | This file is part of eELib, which is free software under the terms of the GNU GPL Version 3. Module Contents --------------- Functions ~~~~~~~~~ .. autoapisummary:: eelib.core.control.hems.schedule_helper.calc_forecast_residual eelib.core.control.hems.schedule_helper.calc_forecast_thermal_residual eelib.core.control.hems.schedule_helper.bss_calc_schedule eelib.core.control.hems.schedule_helper.pv_calc_schedule eelib.core.control.hems.schedule_helper.hp_calc_schedule eelib.core.control.hems.schedule_helper.cs_calc_schedule_uncontrolled eelib.core.control.hems.schedule_helper.calc_schedule_opt Attributes ~~~~~~~~~~ .. autoapisummary:: eelib.core.control.hems.schedule_helper._logger .. py:data:: _logger .. py:function:: calc_forecast_residual(forecast: dict, forecast_horizon: int) -> numpy.ndarray Calculates the residual forecast for the "p"-values of all devices' forecasts. :param forecast: input forecasts to calculate schedule :type forecast: dict :param forecast_horizon: timesteps in which forecast is created :type forecast_horizon: int :returns: residual electrical power values from forecasts for attribute "p" for devices :rtype: np.ndarray .. py:function:: calc_forecast_thermal_residual(forecast: dict, forecast_horizon: int) -> numpy.ndarray Calculates the residual forecast for the thermal demand ("p_th"-values). :param forecast: input forecasts to calculate schedule :type forecast: dict :param forecast_horizon: timesteps in which forecast is created :type forecast_horizon: int :returns: residual thermal demand values from forecast :rtype: np.ndarray .. py:function:: bss_calc_schedule(step_size: int, schedule_p_res: list, bss_data: dict) -> dict Calculates the schedule for the p_set values of the bss. :param step_size: simulation step_size :type step_size: int :param schedule_p_res: Input schedule of residual load. :type schedule_p_res: list :param bss_data: battery information at start of forecast with structure {id: BSSData} :type bss_data: dict :returns: Schedule with ``p_set`` values of the bss in the forecast horizon. :rtype: dict .. py:function:: pv_calc_schedule(forecast: dict, pv_data: dict) -> dict Calculates the schedule for all pv systems using the forecast (maximum power). :param forecast: collected forecast from EMS :type forecast: dict :param pv_data: contains all information of pv systems with structure {id: PVData} :type pv_data: dict :returns: Schedule with power set values of the pv systems in the forecast horizon. :rtype: dict .. py:function:: hp_calc_schedule(step_size: int, th_demand_profile: list, energy_demand_th: float, hp_data: dict) -> dict Calculates the schedule for the thermal power set values of the heatpump. :param step_size: simulation step_size :type step_size: int :param th_demand_profile: input profile of the thermal power demand. :type th_demand_profile: list :param energy_demand_th: current thermic energy demand :type energy_demand_th: float :param hp_data: contains all information of heatpumps with structure {id: HPData} :type hp_data: dict :returns: Schedule with thermal and electrical set values of the hps in the forecast horizon. :rtype: dict .. py:function:: cs_calc_schedule_uncontrolled(step_size: int, forecast: dict, forecast_horizon: int, cs_data: dict) Calculates the schedule for all connected charging stations and its connected cars. Uses the forecast of the appereance and the cars consumption. NOTE: For this schedule the car is always charged with max. power. :param step_size: simulation step size in seconds :type step_size: int :param forecast: collected forecast from EMS :type forecast: dict :param forecast_horizon: length of the forecast period :type forecast_horizon: int :param cs_data: contains all information of charging stations with structure {id: CSData} :type cs_data: dict :returns: Schedule with power set values of the charging stations in the forecast horizon. :rtype: dict .. py:function:: calc_schedule_opt(step_size: int, forecast: dict, forecast_horizon: int, opt: eelib.data.OptimOptions = OptimOptions(), tariff: eelib.data.TariffSignal = TariffSignal(), cs_data: dict = {}, bss_data: dict = {}, pv_data: dict = {}, hp_data: dict = {}, control_signals: eelib.data.ControlSignalEMS = ControlSignalEMS()) -> dict Calculates an optimal schedule for all connected devices. :param step_size: simulation step_size :type step_size: int :param forecast: collected forecasts from EMS :type forecast: dict :param forecast_horizon: timesteps for which forecast should be calculated :type forecast_horizon: int :param opt: information about optimization setup (whats used and what not) :type opt: OptimOptions :param tariff: electricity price signal. Defaults to TariffSignal(). :type tariff: TariffSignal :param cs_data: info of charging stations, like {id: CSData}. Defaults to {}. :type cs_data: dict :param bss_data: info of battery storage systems, like {id: BSSData}. Defaults to {}. :type bss_data: dict :param pv_data: info of pv systems, like {id: PVData}. Defaults to {}. :type pv_data: dict :param hp_data: info of heatpumps, like {id: HPData}. Defaults to {}. :type hp_data: dict :param control_signals: Control signals sent to EMS with lists for power limits. :type control_signals: ControlSignalEMS :raises ValueError: constructed optimization problem could not be solved by solver :returns: Schedule with power set values of the connected devices in the forecast horizon. :rtype: dict