feedinlib.powerplants.Base

class feedinlib.powerplants.Base(**attributes)[source]

The base class of feedinlib power plants.

The class mainly serves as a data container for power plant attributes. Actual calculation of feed-in provided by the power plant is done by the chosen model. See model.py module for implemented models.

This base class is an abstract class serving as a blueprint for classes that implement weather dependent renewable energy power plants. It forces implementors to implement certain properties and methods.

Parameters:
  • model (A subclass or instance of subclass of Base) –

    The model parameter defines the feed-in model used to calculate the power plant feed-in.

    If a class (or in general, any instance of type) is provided, it is used to create the model instance encapsulating the actual mathematical model used to calculate the feed-in provided by this power plant.

    In any other case, the provided object is used directly. Note though, that a reference to this power plant is saved in the provided object, so sharing model instances between two power plant objects is not a good idea, as the second power plant will overwrite the reference to the first.

    The non-class version is only provided for users who need the extra flexibility of controlling model instantiation and who know what they are doing. In general, you’ll want to provide a class for this parameter or just go with the default for the specific subclass you are using.

  • **attributes – Besides model parameter provided attributes hold the technical specification used to define the power plant. See power_plant_parameters parameter in respective model’s feedin() method for further information on the model’s required and optional plant parameters.
Raises:

AttributeError – In case an attribute listed in the given model’s required parameters is not present in the parameters parameter.

Methods

__init__(**attributes)
feedin(weather, **kwargs) Calculates power plant feed-in in Watt.

Attributes

required The power plant parameters the specified model requires.
__init__(**attributes)[source]
feedin(weather, **kwargs)[source]

Calculates power plant feed-in in Watt.

This method delegates the actual computation to the model’s feedin() method while giving you the opportunity to override some of the inputs used to calculate the feed-in.

If the respective model does calculate AC and DC feed-in, AC feed-in is returned by default. See the model’s feedin() method for information on how to overwrite this default behaviour.

Parameters:
  • weather – Weather data to calculate feed-in. Check the weather parameter of the respective model’s feedin() method for required weather data parameters and format.
  • **kwargs – Keyword arguments for respective model’s feed-in calculation. Check the keyword arguments of the model’s feedin() for further information.
Returns:

feedin – Series with power plant feed-in in Watt.

Return type:

pandas.Series

required

The power plant parameters the specified model requires.

Check the model’s power_plant_requires attribute for further information.