Source code for oemof.solph.network.energy_system

# -*- coding: utf-8 -*-

"""
solph version of oemof.network.energy_system

SPDX-FileCopyrightText: Uwe Krien <krien@uni-bremen.de>
SPDX-FileCopyrightText: Simon Hilpert
SPDX-FileCopyrightText: Cord Kaldemeyer
SPDX-FileCopyrightText: Stephan Günther
SPDX-FileCopyrightText: Birgit Schachler

SPDX-License-Identifier: MIT

"""

from oemof.network import energy_system as es


[docs]class EnergySystem(es.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. """ def __init__(self, **kwargs): # Doing imports at runtime is generally frowned upon, but should work # for now. See the TODO in :func:`constraint_grouping # <oemof.solph.groupings.constraint_grouping>` for more information. from oemof.solph.groupings import GROUPINGS kwargs["groupings"] = GROUPINGS + kwargs.get("groupings", []) super().__init__(**kwargs)