Temporal Data

In Tessif temporal data is considered to be the timframe and the resolution of any given simulation task.

In theory there is no limit to either of these quantities. But since tessif aims primarily to be used for energy supply system simulation applications a default of yearly timeframes with hourly resolutions is assumed.

Following sections provide an overview and further references on how to supply temporal data, configure tessif’s temporal resolution as well as how to provide data bound to certain points in time.

Supply

Temporal data is supplied by using the timeframe key at the upper most level inside the provided energy system mapping.

The value stored behind this key can be

  1. A pandas.DatetimeIndex created by pandas.daterange() (when using a pure python mapping, as for example found here)

  2. A column of singular datetime stamps (when using a Spreadsheet, as for example found here)

  3. A mapping of respective values with which a pandas.DatetimeIndex can be created (when using another kind of mapping, as for example found here)

Configuration

When using temporal resolutions other than hourly tessif's default configuration needs to be altered as in:

>>> import tessif.frused.configurations as configurations
>>> from tessif.frused.resolutions import temporals
>>> configurations.temporal_resolution = temporals['s']

Timeseries Values

Throughout tessif timeseries values are considered externaly set constraints bound to a specific point in (simulated) time.

Providing timeseries values for energy system components prior to optimization is a common task when performing energy system simulations.

Following sections provide examples for how the different models support providing timeseries values prior to optimization.

tessif

To bind an energy system component’s parameter to a timeseries, the timeseries keyword is used in conjunction with the parameter that is to be bound (usually the flow_rate):

timeseries = {'input_bus': MinMax(min=0, max=[10, 42, 15, 42])}

Although a litte more verbose during initialization this solution offers convenient post processing of an optimized energy system in regard to figure out which values were set prior to optimization, even if the original input data was not accessible.

If - like in the example above - the parameter is represented as a NamedTuple then of course all of the tuple fields can be subject to timeseries bound values:

timeseries = {'input_bus': MinMax(
    min=[10, 42, 15, 42], max=[10, 42, 15, 42])}

If - not like in the example above - the min and max values would differ, the solver would try to find an optimum solution for the formulated problem, respecting the different min/max constraints at any given point in time.

Note

See this example for how the timeseries keyword can be utilized.

oemof

To bind an energy system component's parameter to a timeseries, the respecitve series is simply bound to the desired parameter (of oemof.solph.network.Flow):

solph.Flow(max=[10, 42, 15, 42])

To fix a value to a certain amount the oemof.solph.Flow.fix parameter has to be used:

renewable = solph.Source(
    label=nts.Uid('Renewable', 53, 10, 'Germany',
                  'Power', 'Electricity', 'Source'),
    outputs={power_line: solph.Flow(
        nominal_value=10, fix=[0.8, 0.2],
        variable_costs=9)})