mirror of
https://github.com/Akkudoktor-EOS/EOS.git
synced 2025-08-25 15:01:14 +00:00
Json configuration (#141)
* Add json config * Adjust code to new config --------- Co-authored-by: Chris <git@nootch.de>
This commit is contained in:
@@ -3,10 +3,21 @@ import os
|
||||
import subprocess
|
||||
import sys
|
||||
import time
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from xprocess import ProcessStarter
|
||||
|
||||
from akkudoktoreos.config import EOS_DIR, AppConfig, load_config
|
||||
|
||||
|
||||
@pytest.fixture(name="tmp_config")
|
||||
def load_config_tmp(tmp_path: Path) -> AppConfig:
|
||||
"""Creates an AppConfig from default.config.json with a tmp output directory."""
|
||||
config = load_config(tmp_path)
|
||||
config.directories.output = tmp_path
|
||||
return config
|
||||
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def disable_debug_logging():
|
||||
@@ -29,7 +40,7 @@ def is_full_run(request):
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def server(xprocess):
|
||||
def server(xprocess, tmp_path: Path):
|
||||
"""Fixture to start the server.
|
||||
|
||||
Provides URL of the server.
|
||||
@@ -45,8 +56,7 @@ def server(xprocess):
|
||||
stderr=subprocess.PIPE,
|
||||
)
|
||||
except subprocess.CalledProcessError:
|
||||
test_dir = os.path.dirname(os.path.realpath(__file__))
|
||||
project_dir = os.path.abspath(os.path.join(test_dir, ".."))
|
||||
project_dir = Path(__file__).parent.parent
|
||||
subprocess.run(
|
||||
[sys.executable, "-m", "pip", "install", "-e", project_dir],
|
||||
check=True,
|
||||
@@ -56,14 +66,15 @@ def server(xprocess):
|
||||
|
||||
# command to start server process
|
||||
args = [sys.executable, "-m", "akkudoktoreosserver.flask_server"]
|
||||
env = {EOS_DIR: f"{tmp_path}", **os.environ.copy()}
|
||||
|
||||
# startup pattern
|
||||
pattern = "Debugger PIN:"
|
||||
# search the first 12 lines for the startup pattern, if not found
|
||||
# search the first 30 lines for the startup pattern, if not found
|
||||
# a RuntimeError will be raised informing the user
|
||||
max_read_lines = 12
|
||||
max_read_lines = 30
|
||||
|
||||
# will wait for 10 seconds before timing out
|
||||
# will wait for 30 seconds before timing out
|
||||
timeout = 30
|
||||
|
||||
# xprocess will now attempt to clean up upon interruptions
|
||||
|
@@ -4,7 +4,8 @@ import pytest
|
||||
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.class_inverter import Wechselrichter
|
||||
from akkudoktoreos.config import AppConfig
|
||||
|
||||
prediction_hours = 48
|
||||
optimization_hours = 24
|
||||
@@ -13,7 +14,7 @@ start_hour = 1
|
||||
|
||||
# Example initialization of necessary components
|
||||
@pytest.fixture
|
||||
def create_ems_instance():
|
||||
def create_ems_instance(tmp_config: AppConfig) -> EnergieManagementSystem:
|
||||
"""Fixture to create an EnergieManagementSystem instance with given test parameters."""
|
||||
# Initialize the battery and the inverter
|
||||
akku = PVAkku(kapazitaet_wh=5000, start_soc_prozent=80, hours=48, min_soc_prozent=10)
|
||||
@@ -189,6 +190,7 @@ def create_ems_instance():
|
||||
|
||||
# Initialize the energy management system with the respective parameters
|
||||
ems = EnergieManagementSystem(
|
||||
config=tmp_config.eos,
|
||||
pv_prognose_wh=pv_prognose_wh,
|
||||
strompreis_euro_pro_wh=strompreis_euro_pro_wh,
|
||||
einspeiseverguetung_euro_pro_wh=einspeiseverguetung_euro_pro_wh,
|
||||
|
@@ -4,7 +4,8 @@ import pytest
|
||||
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.class_inverter import Wechselrichter
|
||||
from akkudoktoreos.config import AppConfig
|
||||
|
||||
prediction_hours = 48
|
||||
optimization_hours = 24
|
||||
@@ -13,7 +14,7 @@ start_hour = 0
|
||||
|
||||
# Example initialization of necessary components
|
||||
@pytest.fixture
|
||||
def create_ems_instance():
|
||||
def create_ems_instance(tmp_config: AppConfig) -> EnergieManagementSystem:
|
||||
"""Fixture to create an EnergieManagementSystem instance with given test parameters."""
|
||||
# Initialize the battery and the inverter
|
||||
akku = PVAkku(kapazitaet_wh=5000, start_soc_prozent=80, hours=48, min_soc_prozent=10)
|
||||
@@ -96,6 +97,7 @@ def create_ems_instance():
|
||||
|
||||
# Initialize the energy management system with the respective parameters
|
||||
ems = EnergieManagementSystem(
|
||||
config=tmp_config.eos,
|
||||
pv_prognose_wh=pv_prognose_wh,
|
||||
strompreis_euro_pro_wh=strompreis_euro_pro_wh,
|
||||
einspeiseverguetung_euro_pro_wh=einspeiseverguetung_euro_pro_wh,
|
||||
|
@@ -6,6 +6,7 @@ from unittest.mock import patch
|
||||
import pytest
|
||||
|
||||
from akkudoktoreos.class_optimize import optimization_problem
|
||||
from akkudoktoreos.config import AppConfig
|
||||
|
||||
DIR_TESTDATA = Path(__file__).parent / "testdata"
|
||||
|
||||
@@ -33,17 +34,25 @@ def compare_dict(actual: dict[str, Any], expected: dict[str, Any]):
|
||||
],
|
||||
)
|
||||
@patch("akkudoktoreos.class_optimize.visualisiere_ergebnisse")
|
||||
def test_optimize(visualisiere_ergebnisse_patch, fn_in: str, fn_out: str, ngen: int, is_full_run):
|
||||
def test_optimize(
|
||||
visualisiere_ergebnisse_patch,
|
||||
fn_in: str,
|
||||
fn_out: str,
|
||||
ngen: int,
|
||||
is_full_run: bool,
|
||||
tmp_config: AppConfig,
|
||||
):
|
||||
"""Test optimierung_ems."""
|
||||
# Load input and output data
|
||||
with open(DIR_TESTDATA / fn_in, "r") as f_in:
|
||||
file = DIR_TESTDATA / fn_in
|
||||
with file.open("r") as f_in:
|
||||
input_data = json.load(f_in)
|
||||
|
||||
with open(DIR_TESTDATA / fn_out, "r") as f_out:
|
||||
file = DIR_TESTDATA / fn_out
|
||||
with file.open("r") as f_out:
|
||||
expected_output_data = json.load(f_out)
|
||||
|
||||
opt_class = optimization_problem(
|
||||
prediction_hours=48, strafe=10, optimization_hours=24, fixed_seed=42
|
||||
)
|
||||
opt_class = optimization_problem(tmp_config, fixed_seed=42)
|
||||
start_hour = 10
|
||||
|
||||
if ngen > 10 and not is_full_run:
|
||||
|
71
tests/test_config.py
Normal file
71
tests/test_config.py
Normal file
@@ -0,0 +1,71 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from pydantic import ValidationError
|
||||
|
||||
from akkudoktoreos.config import (
|
||||
CONFIG_FILE_NAME,
|
||||
DEFAULT_CONFIG_FILE,
|
||||
get_config_file,
|
||||
load_config,
|
||||
)
|
||||
|
||||
|
||||
def test_config() -> None:
|
||||
"""Test the default config file."""
|
||||
try:
|
||||
load_config(Path.cwd())
|
||||
except ValidationError as exc:
|
||||
pytest.fail(f"Default configuration is not valid: {exc}")
|
||||
|
||||
|
||||
def test_config_copy(tmp_path: Path) -> None:
|
||||
"""Test if the config is copied to the provided path."""
|
||||
assert DEFAULT_CONFIG_FILE == get_config_file(Path("does", "not", "exist"), False)
|
||||
|
||||
load_config(tmp_path, True)
|
||||
expected_config = tmp_path.joinpath(CONFIG_FILE_NAME)
|
||||
|
||||
assert expected_config == get_config_file(tmp_path, False)
|
||||
assert expected_config.is_file()
|
||||
|
||||
|
||||
def test_config_merge(tmp_path: Path) -> None:
|
||||
"""Test if config is merged and updated correctly."""
|
||||
config_file = tmp_path.joinpath(CONFIG_FILE_NAME)
|
||||
custom_config = {
|
||||
"eos": {
|
||||
"optimization_hours": 30,
|
||||
"penalty": 21,
|
||||
"does_not_exist": "nope",
|
||||
"available_charging_rates_in_percentage": "False entry",
|
||||
}
|
||||
}
|
||||
with config_file.open("w") as f_out:
|
||||
json.dump(custom_config, f_out)
|
||||
|
||||
assert config_file.exists()
|
||||
|
||||
with pytest.raises(ValueError):
|
||||
# custom configuration is broken but not updated.
|
||||
load_config(tmp_path, tmp_path, False)
|
||||
|
||||
with config_file.open("r") as f_in:
|
||||
# custom configuration is not changed.
|
||||
assert json.load(f_in) == custom_config
|
||||
|
||||
config = load_config(tmp_path)
|
||||
|
||||
assert config.eos.optimization_hours == 30
|
||||
assert config.eos.penalty == 21
|
||||
|
||||
|
||||
def test_setup(tmp_path: Path) -> None:
|
||||
"""Test setup."""
|
||||
config = load_config(tmp_path, True)
|
||||
config.run_setup()
|
||||
|
||||
assert tmp_path.joinpath(CONFIG_FILE_NAME).is_file()
|
||||
assert tmp_path.joinpath(config.directories.cache).is_dir()
|
||||
assert tmp_path.joinpath(config.directories.output).is_dir()
|
@@ -1,10 +1,24 @@
|
||||
from http import HTTPStatus
|
||||
from pathlib import Path
|
||||
|
||||
import requests
|
||||
|
||||
from akkudoktoreos.config import prediction_hours
|
||||
from akkudoktoreos.config import CONFIG_FILE_NAME, load_config
|
||||
|
||||
|
||||
def test_server(server):
|
||||
def test_fixture_setup(server, tmp_path: Path) -> None:
|
||||
"""Test if the fixture sets up the server with the env var."""
|
||||
# validate correct path in server
|
||||
config = load_config(tmp_path, False)
|
||||
assert tmp_path.joinpath(CONFIG_FILE_NAME).is_file()
|
||||
cache = tmp_path / config.directories.cache
|
||||
assert cache.is_dir()
|
||||
|
||||
|
||||
def test_server(server, tmp_path: Path):
|
||||
"""Test the server."""
|
||||
result = requests.get(f"{server}/gesamtlast_simple?year_energy=2000&")
|
||||
assert result.status_code == 200
|
||||
assert len(result.json()) == prediction_hours
|
||||
assert result.status_code == HTTPStatus.OK
|
||||
|
||||
config = load_config(tmp_path, False)
|
||||
assert len(result.json()) == config.eos.prediction_hours
|
||||
|
@@ -1,10 +1,10 @@
|
||||
import json
|
||||
from pathlib import Path
|
||||
from unittest.mock import patch
|
||||
|
||||
import pytest
|
||||
from matplotlib.testing.compare import compare_images
|
||||
|
||||
from akkudoktoreos.config import AppConfig
|
||||
from akkudoktoreos.visualize import visualisiere_ergebnisse
|
||||
|
||||
DIR_TESTDATA = Path(__file__).parent / "testdata"
|
||||
@@ -15,14 +15,16 @@ DIR_IMAGEDATA = DIR_TESTDATA / "images"
|
||||
"fn_in, fn_out, fn_out_base",
|
||||
[("visualize_input_1.json", "visualize_output_1.pdf", "visualize_base_output_1.pdf")],
|
||||
)
|
||||
@patch("akkudoktoreos.visualize.output_dir", DIR_IMAGEDATA)
|
||||
def test_visualisiere_ergebnisse(fn_in, fn_out, fn_out_base):
|
||||
def test_visualisiere_ergebnisse(fn_in, fn_out, fn_out_base, tmp_config: AppConfig):
|
||||
with open(DIR_TESTDATA / fn_in, "r") as f:
|
||||
input_data = json.load(f)
|
||||
visualisiere_ergebnisse(**input_data)
|
||||
visualisiere_ergebnisse(config=tmp_config, **input_data)
|
||||
output_file: Path = tmp_config.working_dir / tmp_config.directories.output / fn_out
|
||||
|
||||
assert output_file.is_file()
|
||||
assert (
|
||||
compare_images(
|
||||
str(DIR_IMAGEDATA / fn_out),
|
||||
str(output_file),
|
||||
str(DIR_IMAGEDATA / fn_out_base),
|
||||
0,
|
||||
)
|
||||
|
148
tests/testdata/visualize_input_1.json
vendored
148
tests/testdata/visualize_input_1.json
vendored
@@ -1,62 +1,174 @@
|
||||
{
|
||||
"gesamtlast": [
|
||||
676.71, 876.19, 527.13, 468.88, 531.38, 517.95, 483.15, 472.28, 1011.68, 995.0, 1053.07, 1063.91, 1320.56, 1132.03, 1163.67, 1176.82, 1216.22, 1103.78, 1129.12, 1178.71, 1050.98, 988.56, 912.38, 704.61, 516.37, 868.05, 694.34, 608.79, 556.31, 488.89, 506.91, 804.89, 1141.98, 1056.97, 992.46, 1155.99, 827.01, 1257.98, 1232.67, 871.26, 860.88, 1158.03, 1222.72, 1221.04, 949.99, 987.01, 733.99, 592.97
|
||||
676.71, 876.19, 527.13, 468.88, 531.38, 517.95, 483.15, 472.28, 1011.68,
|
||||
995.0, 1053.07, 1063.91, 1320.56, 1132.03, 1163.67, 1176.82, 1216.22,
|
||||
1103.78, 1129.12, 1178.71, 1050.98, 988.56, 912.38, 704.61, 516.37, 868.05,
|
||||
694.34, 608.79, 556.31, 488.89, 506.91, 804.89, 1141.98, 1056.97, 992.46,
|
||||
1155.99, 827.01, 1257.98, 1232.67, 871.26, 860.88, 1158.03, 1222.72,
|
||||
1221.04, 949.99, 987.01, 733.99, 592.97
|
||||
],
|
||||
"pv_forecast": [
|
||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5000.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
|
||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 5000.0, 0.0,
|
||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
0.0, 0.0, 0.0, 0.0
|
||||
],
|
||||
"strompreise": [
|
||||
0.00001, 0.00001, 0.00001, 0.00001, 0.00001, 0.00001, 0.00001, 0.00001, 0.00001, 0.00001, 0.001, 0.00005, 0.00005, 0.00005, 0.00005, 0.001, 0.001, 0.001, 0.001, 0.001, 0.00001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001
|
||||
0.00001, 0.00001, 0.00001, 0.00001, 0.00001, 0.00001, 0.00001, 0.00001,
|
||||
0.00001, 0.00001, 0.001, 0.00005, 0.00005, 0.00005, 0.00005, 0.001, 0.001,
|
||||
0.001, 0.001, 0.001, 0.00001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001,
|
||||
0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001,
|
||||
0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001, 0.001
|
||||
],
|
||||
"ergebnisse": {
|
||||
"Last_Wh_pro_Stunde": [
|
||||
12493.71, 10502.19, 12775.13, 15356.88, 11468.38, 4037.95, 6047.15, 3112.2799999999997, 3211.68, 995.0, 1053.07, 1063.91, 1320.56, 1132.03, 1163.67, 1176.82, 1216.22, 1103.78, 1129.12, 1178.71, 1050.98, 988.56, 2035.7436363636361, 704.61, 516.37, 868.05, 694.34, 608.79, 556.31, 488.89, 506.91, 804.89, 1141.98, 1056.97, 992.46, 1155.99, 827.01, 1257.98, 1232.67, 871.26, 860.88, 1158.03, 1222.72, 1221.04, 949.99, 987.01, 733.99, 592.97
|
||||
12493.71, 10502.19, 12775.13, 15356.88, 11468.38, 4037.95, 6047.15,
|
||||
3112.2799999999997, 3211.68, 995.0, 1053.07, 1063.91, 1320.56, 1132.03,
|
||||
1163.67, 1176.82, 1216.22, 1103.78, 1129.12, 1178.71, 1050.98, 988.56,
|
||||
2035.7436363636361, 704.61, 516.37, 868.05, 694.34, 608.79, 556.31,
|
||||
488.89, 506.91, 804.89, 1141.98, 1056.97, 992.46, 1155.99, 827.01,
|
||||
1257.98, 1232.67, 871.26, 860.88, 1158.03, 1222.72, 1221.04, 949.99,
|
||||
987.01, 733.99, 592.97
|
||||
],
|
||||
"Netzeinspeisung_Wh_pro_Stunde": [
|
||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3679.44, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
|
||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 3679.44, 0.0,
|
||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
0.0, 0.0, 0.0, 0.0
|
||||
],
|
||||
"Netzbezug_Wh_pro_Stunde": [
|
||||
12493.71, 10502.19, 12775.13, 15356.88, 11468.38, 4037.95, 6047.15, 3112.2799999999997, 3211.68, 995.0, 1053.07, 1063.91, 0.0, 1132.03, 1163.67, 1176.82, 1216.22, 1103.78, 1129.12, 1178.71, 1050.98, 0.0, 2035.7436363636361, 704.61, 516.37, 868.05, 694.34, 608.79, 556.31, 488.89, 506.91, 804.89, 1141.98, 1056.97, 992.46, 1155.99, 827.01, 1257.98, 1232.67, 871.26, 860.88, 1158.03, 0.0, 1221.04, 0.0, 0.0, 0.0, 592.97
|
||||
12493.71, 10502.19, 12775.13, 15356.88, 11468.38, 4037.95, 6047.15,
|
||||
3112.2799999999997, 3211.68, 995.0, 1053.07, 1063.91, 0.0, 1132.03,
|
||||
1163.67, 1176.82, 1216.22, 1103.78, 1129.12, 1178.71, 1050.98, 0.0,
|
||||
2035.7436363636361, 704.61, 516.37, 868.05, 694.34, 608.79, 556.31,
|
||||
488.89, 506.91, 804.89, 1141.98, 1056.97, 992.46, 1155.99, 827.01,
|
||||
1257.98, 1232.67, 871.26, 860.88, 1158.03, 0.0, 1221.04, 0.0, 0.0, 0.0,
|
||||
592.97
|
||||
],
|
||||
"Kosten_Euro_pro_Stunde": [
|
||||
0.1249371, 0.10502190000000002, 0.1277513, 0.1535688, 0.1146838, 0.0403795, 0.060471500000000004, 0.0311228, 0.0321168, 0.00995, 1.05307, 0.05319550000000001, 0.0, 0.0566015, 0.058183500000000006, 1.17682, 1.21622, 1.10378, 1.12912, 1.1787100000000001, 0.010509800000000001, 0.0, 2.035743636363636, 0.7046100000000001, 0.51637, 0.86805, 0.6943400000000001, 0.6087899999999999, 0.55631, 0.48889, 0.5069100000000001, 0.80489, 1.14198, 1.05697, 0.99246, 1.15599, 0.82701, 1.25798, 1.2326700000000002, 0.87126, 0.86088, 1.15803, 0.0, 1.22104, 0.0, 0.0, 0.0, 0.59297
|
||||
0.1249371, 0.10502190000000002, 0.1277513, 0.1535688, 0.1146838,
|
||||
0.0403795, 0.060471500000000004, 0.0311228, 0.0321168, 0.00995, 1.05307,
|
||||
0.05319550000000001, 0.0, 0.0566015, 0.058183500000000006, 1.17682,
|
||||
1.21622, 1.10378, 1.12912, 1.1787100000000001, 0.010509800000000001, 0.0,
|
||||
2.035743636363636, 0.7046100000000001, 0.51637, 0.86805,
|
||||
0.6943400000000001, 0.6087899999999999, 0.55631, 0.48889,
|
||||
0.5069100000000001, 0.80489, 1.14198, 1.05697, 0.99246, 1.15599, 0.82701,
|
||||
1.25798, 1.2326700000000002, 0.87126, 0.86088, 1.15803, 0.0, 1.22104, 0.0,
|
||||
0.0, 0.0, 0.59297
|
||||
],
|
||||
"akku_soc_pro_stunde": [
|
||||
25.0, 31.666666666666664, 38.333333333333336, 55.00000000000001, 61.66666666666667, 75.0, 81.66666666666667, 91.66666666666666, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 95.7448347107438, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 94.73691460055097, 94.73691460055097, 90.64777031680441, 86.39927685950414, 83.23988464187329, 83.23988464187329
|
||||
25.0, 31.666666666666664, 38.333333333333336, 55.00000000000001,
|
||||
61.66666666666667, 75.0, 81.66666666666667, 91.66666666666666, 100.0,
|
||||
100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0,
|
||||
100.0, 100.0, 95.7448347107438, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0,
|
||||
100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0,
|
||||
100.0, 100.0, 100.0, 100.0, 94.73691460055097, 94.73691460055097,
|
||||
90.64777031680441, 86.39927685950414, 83.23988464187329, 83.23988464187329
|
||||
],
|
||||
"Einnahmen_Euro_pro_Stunde": [
|
||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2575608, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
|
||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.2575608,
|
||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
0.0, 0.0, 0.0, 0.0, 0.0
|
||||
],
|
||||
"Gesamtbilanz_Euro": 27.732796636363638,
|
||||
"E-Auto_SoC_pro_Stunde": [
|
||||
30.294999999999998, 43.405, 60.885, 78.365, 93.66, 93.66, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0
|
||||
30.294999999999998, 43.405, 60.885, 78.365, 93.66, 93.66, 100.0, 100.0,
|
||||
100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0,
|
||||
100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0,
|
||||
100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0,
|
||||
100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0
|
||||
],
|
||||
"Gesamteinnahmen_Euro": 0.2575608,
|
||||
"Gesamtkosten_Euro": 27.990357436363638,
|
||||
"Verluste_Pro_Stunde": [
|
||||
843.0, 654.0, 792.0, 1152.0, 723.0, 480.0, 440.2105263157896, 360.0, 300.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 134.80363636363631, 153.18595041322305, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 166.73454545454547, 0.0, 129.54409090909098, 134.59227272727276, 100.08954545454549, 0.0
|
||||
843.0, 654.0, 792.0, 1152.0, 723.0, 480.0, 440.2105263157896, 360.0,
|
||||
300.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
134.80363636363631, 153.18595041322305, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0,
|
||||
166.73454545454547, 0.0, 129.54409090909098, 134.59227272727276,
|
||||
100.08954545454549, 0.0
|
||||
],
|
||||
"Gesamt_Verluste": 6563.160567638104,
|
||||
"Haushaltsgeraet_wh_pro_stunde": [
|
||||
null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null, null
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
null
|
||||
]
|
||||
},
|
||||
"ac": [
|
||||
0.6, 0.4, 0.4, 1.0, 0.4, 0.8, 0.4, 0.6, 1.0, 0.2, 0.2, 0.2, 0.6, 0.0, 0.2, 0.6, 0.0, 0.0, 0.8, 0.8, 0.4, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.2, 0.8, 0.2, 0.4, 0.6, 1.0, 0.0, 1.0, 0.8, 0.4, 0.4, 1.0, 0.2, 0.6, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
|
||||
0.6, 0.4, 0.4, 1.0, 0.4, 0.8, 0.4, 0.6, 1.0, 0.2, 0.2, 0.2, 0.6, 0.0, 0.2,
|
||||
0.6, 0.0, 0.0, 0.8, 0.8, 0.4, 0.0, 1.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.2, 0.8,
|
||||
0.2, 0.4, 0.6, 1.0, 0.0, 1.0, 0.8, 0.4, 0.4, 1.0, 0.2, 0.6, 0.0, 0.0, 0.0,
|
||||
0.0, 0.0, 0.0
|
||||
],
|
||||
"dc": [
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,
|
||||
1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1
|
||||
],
|
||||
"discharge": [
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0,
|
||||
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 1, 1, 1, 0
|
||||
],
|
||||
"temperature": [
|
||||
18.3, 17.8, 16.9, 16.2, 15.6, 15.1, 14.6, 14.2, 14.3, 14.8, 15.7, 16.7, 17.4, 18.0, 18.6, 19.2, 19.1, 18.7, 18.5, 17.7, 16.2, 14.6, 13.6, 13.0, 12.6, 12.2, 11.7, 11.6, 11.3, 11.0, 10.7, 10.2, 11.4, 14.4, 16.4, 18.3, 19.5, 20.7, 21.9, 22.7, 23.1, 23.1, 22.8, 21.8, 20.2, 19.1, 18.0, 17.4
|
||||
18.3, 17.8, 16.9, 16.2, 15.6, 15.1, 14.6, 14.2, 14.3, 14.8, 15.7, 16.7,
|
||||
17.4, 18.0, 18.6, 19.2, 19.1, 18.7, 18.5, 17.7, 16.2, 14.6, 13.6, 13.0,
|
||||
12.6, 12.2, 11.7, 11.6, 11.3, 11.0, 10.7, 10.2, 11.4, 14.4, 16.4, 18.3,
|
||||
19.5, 20.7, 21.9, 22.7, 23.1, 23.1, 22.8, 21.8, 20.2, 19.1, 18.0, 17.4
|
||||
],
|
||||
"start_hour": 0,
|
||||
"prediction_hours": 48,
|
||||
"einspeiseverguetung_euro_pro_wh": [
|
||||
0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007
|
||||
0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007,
|
||||
0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007,
|
||||
0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007,
|
||||
0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007,
|
||||
0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007,
|
||||
0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007, 0.00007
|
||||
],
|
||||
"filename": "visualize_output_1.pdf",
|
||||
"extra_data": null
|
||||
|
Reference in New Issue
Block a user