mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-04-19 08:55:15 +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_ems import EnergieManagementSystem
|
||||||
from akkudoktoreos.class_haushaltsgeraet import Haushaltsgeraet
|
from akkudoktoreos.class_haushaltsgeraet import Haushaltsgeraet
|
||||||
from akkudoktoreos.class_inverter import Wechselrichter # Example import
|
from akkudoktoreos.class_inverter import Wechselrichter # Example import
|
||||||
from akkudoktoreos.visualize import *
|
|
||||||
|
|
||||||
prediction_hours = 48
|
prediction_hours = 48
|
||||||
optimization_hours = 24
|
optimization_hours = 24
|
||||||
@ -201,8 +200,6 @@ def create_ems_instance():
|
|||||||
wechselrichter=wechselrichter,
|
wechselrichter=wechselrichter,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
return ems
|
return ems
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,6 +1,5 @@
|
|||||||
import numpy as np
|
import numpy as np
|
||||||
import pytest
|
import pytest
|
||||||
from akkudoktoreos.visualize import *
|
|
||||||
|
|
||||||
from akkudoktoreos.class_akku import PVAkku
|
from akkudoktoreos.class_akku import PVAkku
|
||||||
from akkudoktoreos.class_ems import EnergieManagementSystem
|
from akkudoktoreos.class_ems import EnergieManagementSystem
|
||||||
@ -39,7 +38,6 @@ def create_ems_instance():
|
|||||||
pv_prognose_wh[10] = 5000.0
|
pv_prognose_wh[10] = 5000.0
|
||||||
pv_prognose_wh[11] = 5000.0
|
pv_prognose_wh[11] = 5000.0
|
||||||
|
|
||||||
|
|
||||||
strompreis_euro_pro_wh = np.full(48, 0.001)
|
strompreis_euro_pro_wh = np.full(48, 0.001)
|
||||||
strompreis_euro_pro_wh[0:10] = 0.00001
|
strompreis_euro_pro_wh[0:10] = 0.00001
|
||||||
strompreis_euro_pro_wh[11:15] = 0.00005
|
strompreis_euro_pro_wh[11:15] = 0.00005
|
||||||
@ -109,7 +107,6 @@ def create_ems_instance():
|
|||||||
wechselrichter=wechselrichter,
|
wechselrichter=wechselrichter,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|
||||||
ac = np.full(prediction_hours, 0)
|
ac = np.full(prediction_hours, 0)
|
||||||
ac[20] = 1
|
ac[20] = 1
|
||||||
ems.set_akku_ac_charge_hours(ac)
|
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."
|
), "'Netzeinspeisung_Wh_pro_Stunde[11]' should be 0.0."
|
||||||
|
|
||||||
assert (
|
assert (
|
||||||
abs(result["akku_soc_pro_stunde"][20] - 98
|
abs(result["akku_soc_pro_stunde"][20] - 98) < 1e-5
|
||||||
) < 1e-5
|
|
||||||
), "'akku_soc_pro_stunde[11]' should be 98."
|
), "'akku_soc_pro_stunde[11]' should be 98."
|
||||||
assert (
|
assert (
|
||||||
abs(result["Last_Wh_pro_Stunde"][20] - 5450.98) < 1e-3
|
abs(result["Last_Wh_pro_Stunde"][20] - 5450.98) < 1e-3
|
||||||
), "'Netzeinspeisung_Wh_pro_Stunde[11]' should be 0.0."
|
), "'Netzeinspeisung_Wh_pro_Stunde[11]' should be 0.0."
|
||||||
|
|
||||||
|
|
||||||
print("All tests passed successfully.")
|
print("All tests passed successfully.")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user