akkudoktoreos.prediction.interpolator.EOSLoadInterpolator

class akkudoktoreos.prediction.interpolator.EOSLoadInterpolator(*args: Any, **kwargs: Any)

Bases: SelfConsumptionProbabilityInterpolator, SingletonMixin

__init__() None

Initializes the singleton instance if it has not been initialized previously.

Further calls to __init__ are ignored for the singleton instance.

Parameters:
  • *args – Positional arguments for initialization.

  • **kwargs – Keyword arguments for initialization.

Methods

__init__()

Initializes the singleton instance if it has not been initialized previously.

calculate_self_consumption(load_1h_power, ...)

generate_points(load_1h_power, pv_power)

Generate the grid points for interpolation.

reset_instance()

Resets the singleton instance, forcing it to be recreated on next access.

__init__() None

Initializes the singleton instance if it has not been initialized previously.

Further calls to __init__ are ignored for the singleton instance.

Parameters:
  • *args – Positional arguments for initialization.

  • **kwargs – Keyword arguments for initialization.

static __new__(cls: Type[SingletonMixin], *args: Any, **kwargs: Any) SingletonMixin

Creates or returns the singleton instance of the class.

Ensures thread-safe instance creation by locking during the first instantiation.

Parameters:
  • *args – Positional arguments for instance creation (ignored if instance exists).

  • **kwargs – Keyword arguments for instance creation (ignored if instance exists).

Returns:

The singleton instance of the derived class.

Return type:

SingletonMixin

calculate_self_consumption(load_1h_power: float, pv_power: float) float
generate_points(load_1h_power: float, pv_power: float) tuple[ndarray, ndarray]

Generate the grid points for interpolation.

classmethod reset_instance() None

Resets the singleton instance, forcing it to be recreated on next access.