reV.losses.power_curve.AbstractPowerCurveTransformation

class AbstractPowerCurveTransformation(power_curve)[source]

Bases: ABC

Abstract base class for power curve transformations.

This class is not meant to be instantiated.

This class provides an interface for power curve transformations, which are meant to more realistically represent certain types of losses when compared to simple haircut losses (i.e. constant loss value applied at all points on the power curve).

If you would like to implement your own power curve transformation, you should subclass this class and implement the apply() method and the bounds property. See the documentation for each of these below for more details.

power_curve

The “original” input power curve.

Type:

PowerCurve

Abstract Power Curve Transformation class.

Parameters:

power_curve (PowerCurve) – The turbine power curve. This input is treated as the “original” power curve.

Methods

apply(transformation_var)

Apply a transformation to the original power curve.

Attributes

bounds

true Bounds on the transformation_var.

optm_bounds

Bounds for scipy optimization, sometimes more generous than the actual fit parameter bounds which are enforced after the optimization.

abstract apply(transformation_var)[source]

Apply a transformation to the original power curve.

Parameters:

transformation_var (: float) – A single variable controlling the “strength” of the transformation. The PowerCurveLosses object will run an optimization using this variable to fit the target annual losses incurred with the transformed power curve compared to the original power curve using the given wind resource distribution.

Returns:

PowerCurve – An new power curve containing the generation values from the transformed power curve.

Raises:

NotImplementedError – If the transformation implementation did not set the _transformed_generation attribute.

Notes

When implementing a new transformation, override this method and set the _transformed_generation protected attribute to be the generation corresponding to the transformed power curve. Then, call super().apply(transformation_var) in order to apply cutout speed curtailment and validation for the transformed power curve. For example, here is the implementation for a transformation that shifts the power curve horizontally:

self._transformed_generation = self.power_curve(
    self.power_curve.wind_speed - transformation_var
)
return super().apply(transformation_var)
abstract property bounds

true Bounds on the transformation_var.

Type:

tuple

property optm_bounds

Bounds for scipy optimization, sometimes more generous than the actual fit parameter bounds which are enforced after the optimization.