akkudoktoreos.devices.devicesabc.DeviceBase

class akkudoktoreos.devices.devicesabc.DeviceBase(parameters: DeviceParameters | None = None)

Bases: DevicesStartEndMixin, PredictionMixin, DevicesMixin

Base class for device simulations.

Enables access to EOS configuration data (attribute config), EOS prediction data (attribute prediction) and EOS device registry (attribute devices).

Behavior:
  • Several initialization phases (setup, post_setup):
    • setup: Initialize class attributes from DeviceParameters (pydantic input validation)

    • post_setup: Set connections between devices

  • NotImplemented:
    • hooks during optimization

Notes

  • This class is base to concrete devices like battery, inverter, etc. that are used in optimization.

  • Not a pydantic model for a low footprint during optimization.

__init__(parameters: DeviceParameters | None = None)

Methods

__init__([parameters])

post_setup()

setup(parameters)

Attributes

config

Convenience method/ attribute to retrieve the EOS configuration data.

devices

Convenience method/ attribute to retrieve the EOS devices simulation data.

ems

Convenience method/ attribute to retrieve the EOS energy management system.

end_datetime

Compute the end datetime based on the start_datetime and hours.

prediction

Convenience method/ attribute to retrieve the EOS prediction data.

total_hours

Compute the hours from start_datetime to end_datetime.

__init__(parameters: DeviceParameters | None = None)
setup(parameters: DeviceParameters) None
post_setup() None
property config: Any

Convenience method/ attribute to retrieve the EOS configuration data.

Returns:

The configuration.

Return type:

ConfigEOS

property devices: Any

Convenience method/ attribute to retrieve the EOS devices simulation data.

Returns:

The devices simulation.

Return type:

Devices

property ems: Any

Convenience method/ attribute to retrieve the EOS energy management system.

Returns:

The energy management system.

Return type:

EnergyManagementSystem

property end_datetime: DateTime | None

Compute the end datetime based on the start_datetime and hours.

Ajusts the calculated end time if DST transitions occur within the prediction window.

Returns:

The calculated end datetime, or None if inputs are missing.

Return type:

Optional[DateTime]

property prediction: Any

Convenience method/ attribute to retrieve the EOS prediction data.

Returns:

The prediction.

Return type:

Prediction

property total_hours: int | None

Compute the hours from start_datetime to end_datetime.

Returns:

The duration hours, or None if either datetime is unavailable.

Return type:

Optional[pendulum.period]