Inverter v2 (#245)

* inverter class rewritten second try
* cleanup
* inverter section of decives.py translation
* open api fix
* fix openapi v2
* renamed the class itself
* ruff fix
* Update genetic.py
* cleanup
* reverted indent
This commit is contained in:
Normann
2024-12-16 15:33:00 +01:00
committed by GitHub
parent 763926d8e8
commit 810cc17c0b
9 changed files with 381 additions and 174 deletions

View File

@@ -19,7 +19,7 @@ from akkudoktoreos.devices.battery import (
PVAkkuParameters,
)
from akkudoktoreos.devices.generic import HomeAppliance, HomeApplianceParameters
from akkudoktoreos.devices.inverter import Wechselrichter, WechselrichterParameters
from akkudoktoreos.devices.inverter import Inverter, InverterParameters
from akkudoktoreos.utils.utils import NumpyEncoder
from akkudoktoreos.visualize import visualisiere_ergebnisse
@@ -27,7 +27,7 @@ from akkudoktoreos.visualize import visualisiere_ergebnisse
class OptimizationParameters(BaseModel):
ems: EnergieManagementSystemParameters
pv_akku: PVAkkuParameters
wechselrichter: WechselrichterParameters = WechselrichterParameters()
inverter: InverterParameters = InverterParameters()
eauto: Optional[EAutoParameters]
dishwasher: Optional[HomeApplianceParameters] = None
temperature_forecast: Optional[list[float]] = Field(
@@ -488,10 +488,9 @@ class optimization_problem(ConfigMixin, DevicesMixin, EnergyManagementSystemMixi
)
# Initialize the inverter and energy management system
wr = Wechselrichter(parameters.wechselrichter, akku)
self.ems.set_parameters(
parameters.ems,
wechselrichter=wr,
inverter=Inverter(parameters.inverter, akku),
eauto=eauto,
home_appliance=dishwasher,
)