oemof.solph.EnergySystem

solph version of oemof.network.energy_system

class oemof.solph._energy_system.EnergySystem(timeindex=None, timeincrement=None, infer_last_interval=False, periods=None, tsa_parameters=None, use_remaining_value=False, groupings=None)[source]

Bases: EnergySystem

A variant of the class EnergySystem from <oemof.network.network.energy_system.EnergySystem> specially tailored to solph.

In order to work in tandem with solph, instances of this class always use solph.GROUPINGS <oemof.solph.GROUPINGS>. If custom groupings are supplied via the groupings keyword argument, solph.GROUPINGS <oemof.solph.GROUPINGS> is prepended to those.

If you know what you are doing and want to use solph without solph.GROUPINGS <oemof.solph.GROUPINGS>, you can just use EnergySystem <oemof.network.network.energy_system.EnergySystem>` of oemof.network directly.

Parameters:
  • timeindex (sequence of ascending numeric values) – Typically a pandas.DatetimeIndex is used, but for example also a list of floats works.

  • infer_last_interval (bool) – Add an interval to the last time point. The end time of this interval is unknown so it does only work for an equidistant DatetimeIndex with a ‘freq’ attribute that is not None. The parameter has no effect on the timeincrement parameter.

  • periods (list or None) – The periods of a multi-period model. If this is explicitly specified, it leads to creating a multi-period model, providing a respective user warning as a feedback.

    list of pd.date_range objects carrying the timeindex for the respective period;

    For a standard model, periods are not (to be) declared, i.e. None. A list with one entry is derived, i.e. [0].

  • tsa_parameters (list of dicts, dict or None) – Parameter can be set in order to use aggregated timeseries from TSAM. If multi-period model is used, one dict per period has to be set. If no multi-period (aka single period) approach is selected, a single dict can be provided. If parameter is None, model is set up as usual.

    Dict must contain keys timesteps_per_period (from TSAMs hoursPerPeriod), order (from TSAMs clusterOrder) and occurrences (from TSAMs clusterPeriodNoOccur). When activated, storage equations and flow rules for full_load_time will be adapted. Note that timeseries for components have to be set up as already aggregated timeseries.

  • use_remaining_value (bool) – If True, compare the remaining value of an investment to the original value (only applicable for multi-period models)

  • kwargs

get_period_duration(period)[source]

Get duration of a period in full years

Parameters:

period (int) – Period for which the duration in years shall be obtained

Returns:

int – Duration of the period