:py:mod:`eelib.data.dataclass.tariff` ===================================== .. py:module:: eelib.data.dataclass.tariff .. autoapi-nested-parse:: Dataclasses for tariffs and market data used in eELib. | 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 --------------- Classes ~~~~~~~ .. autoapisummary:: eelib.data.dataclass.tariff.TariffData Attributes ~~~~~~~~~~ .. autoapisummary:: eelib.data.dataclass.tariff._logger .. py:data:: _logger .. py:class:: TariffData Bases: :py:obj:`eelib.data.dataclass.BaseData` Dataclass for Tariff data. .. attribute:: start_timestep The start sim step for the data. :type: int | None .. attribute:: n_steps The number of steps in the data. :type: int | None .. attribute:: resolution The resolution of the tariff data in seconds. :type: int | None .. attribute:: price A list of int | float values. :type: list[int | float] | int | float | None .. attribute:: feed_in_tariff Feed-in tariff in EUR/kWh. If provided as dict, each key specifies a lower bound of DER power, and the corresponding value is the applicable tariff. If provided as list, it represents a time-variable feed-in-tariff. The ``feed_in_tariff`` as floats for each timestep. Defaults to 0.0. :type: float | list[float] | dict[float, float] .. attribute:: price_components_net A dictionary of price components without tax. The keys are the names of the price components. The values are a list of values if the price component is time-dependent, or a single value if it is constant. :type: dict[str, list[int | float] | int | float] .. attribute:: tariff_additionals A dictionary of additional tariff parts like base price or capacity fees. :type: dict[str, list[int | float] | int | float] .. attribute:: tax_rate The tax rate for the tariff. This is used to calculate the tax part of the tariff. The tax part is calculated as the sum of all price components multiplied by the tax rate. If None, the price is net. :type: float | None .. py:method:: __post_init__() -> None Post-init, it ensures ``feed_in_tariff`` contains the correct data types for HEMS. .. py:method:: get_index(timestep: int, sim_resolution: int) -> int | None Get the index of the given timestep in the series data. :param timestep: The timestep to find in the series data. :type timestep: int :param sim_resolution: The resolution of the simulation in seconds. :type sim_resolution: int :returns: The index of the timestep in the series data. :rtype: int | None .. py:method:: reduce(timestep: int, sim_resolution: int) -> None Reduce the tariff data to the given time. :param timestep: The timestep to reduce the series data to. :type timestep: int :param sim_resolution: The resolution of the simulation in seconds. :type sim_resolution: int .. py:method:: resample(target_resolution: int) -> None Resample the tariff to fit target_resolution Limited to mean agg function -> power, prices Not suitable for energy. :param target_resolution: the target resolution for resampling :type target_resolution: int :raises NotImplementedError: fractional resampling factors not supported