mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-06-28 00:46:53 +00:00
PreCommit Fixed
This commit is contained in:
parent
c47f071f55
commit
cfbe7130e7
@ -5,7 +5,6 @@ from akkudoktoreos.class_akku import PVAkku
|
||||
from akkudoktoreos.class_ems import EnergieManagementSystem
|
||||
from akkudoktoreos.class_haushaltsgeraet import Haushaltsgeraet
|
||||
from akkudoktoreos.class_inverter import Wechselrichter # Example import
|
||||
from akkudoktoreos.visualize import *
|
||||
|
||||
prediction_hours = 48
|
||||
optimization_hours = 24
|
||||
@ -201,8 +200,6 @@ def create_ems_instance():
|
||||
wechselrichter=wechselrichter,
|
||||
)
|
||||
|
||||
|
||||
|
||||
return ems
|
||||
|
||||
|
||||
|
@ -1,6 +1,5 @@
|
||||
import numpy as np
|
||||
import pytest
|
||||
from akkudoktoreos.visualize import *
|
||||
|
||||
from akkudoktoreos.class_akku import PVAkku
|
||||
from akkudoktoreos.class_ems import EnergieManagementSystem
|
||||
@ -39,7 +38,6 @@ def create_ems_instance():
|
||||
pv_prognose_wh[10] = 5000.0
|
||||
pv_prognose_wh[11] = 5000.0
|
||||
|
||||
|
||||
strompreis_euro_pro_wh = np.full(48, 0.001)
|
||||
strompreis_euro_pro_wh[0:10] = 0.00001
|
||||
strompreis_euro_pro_wh[11:15] = 0.00005
|
||||
@ -109,7 +107,6 @@ def create_ems_instance():
|
||||
wechselrichter=wechselrichter,
|
||||
)
|
||||
|
||||
|
||||
ac = np.full(prediction_hours, 0)
|
||||
ac[20] = 1
|
||||
ems.set_akku_ac_charge_hours(ac)
|
||||
@ -213,12 +210,10 @@ def test_simulation(create_ems_instance):
|
||||
), "'Netzeinspeisung_Wh_pro_Stunde[11]' should be 0.0."
|
||||
|
||||
assert (
|
||||
abs(result["akku_soc_pro_stunde"][20] - 98
|
||||
) < 1e-5
|
||||
abs(result["akku_soc_pro_stunde"][20] - 98) < 1e-5
|
||||
), "'akku_soc_pro_stunde[11]' should be 98."
|
||||
assert (
|
||||
abs(result["Last_Wh_pro_Stunde"][20] - 5450.98) < 1e-3
|
||||
), "'Netzeinspeisung_Wh_pro_Stunde[11]' should be 0.0."
|
||||
|
||||
|
||||
print("All tests passed successfully.")
|
||||
|
Loading…
x
Reference in New Issue
Block a user