Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve Configuration and Prediction Usability #220

Open
wants to merge 19 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4,856 changes: 4,492 additions & 364 deletions docs/akkudoktoreos/openapi.json

Large diffs are not rendered by default.

11 changes: 9 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -51,9 +51,16 @@ select = [
# Google convention via `convention = "google"`, below.
]
ignore = [
# On top of `Pyflakes (F)` to prevent errors for existing sources. Should be removed!!!
# Prevent errors due to ruff false positives
# ------------------------------------------
# On top of `Pyflakes (F)` to allow numpydantic Shape forward annotation
"F722", # forward-annotation-syntax-error: forward annotations that include invalid syntax.

# Prevent errors for existing sources. Should be removed!!!
# ---------------------------------------------------------
# On top of `Pyflakes (F)`
"F841", # unused-variable: Local variable {name} is assigned to but never used
# On top of `pydocstyle (D)` to prevent errors for existing sources. Should be removed!!!
# On top of `pydocstyle (D)`
"D100", # undocumented-public-module: Missing docstring in public module
"D101", # undocumented-public-class: Missing docstring in public class
"D102", # undocumented-public-method: Missing docstring in public method
Expand Down
6 changes: 5 additions & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,15 @@
numpy==2.1.3
numpydantic==1.6.4
matplotlib==3.9.2
fastapi[standard]==0.115.5
python-fasthtml==0.9.1
uvicorn==0.32.1
pydantic==2.10.1
scikit-learn==1.5.2
timezonefinder==6.5.5
deap==1.4.1
requests==2.32.3
pandas==2.2.3
pendulum==3.0.0
platformdirs==4.3.6
pvlib==0.11.1
pydantic==2.10.1
8 changes: 4 additions & 4 deletions single_test_optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import numpy as np

from akkudoktoreos.config import get_working_dir, load_config
from akkudoktoreos.config.config import get_config
from akkudoktoreos.optimization.genetic import (
OptimizationParameters,
optimization_problem,
Expand Down Expand Up @@ -281,9 +281,9 @@
start_time = time.time()

# Initialize the optimization problem using the default configuration
working_dir = get_working_dir()
config = load_config(working_dir)
opt_class = optimization_problem(config, verbose=True, fixed_seed=42)
config_eos = get_config()
config_eos.merge_settings_from_dict({"prediction_hours": 48, "optimization_hours": 24})
opt_class = optimization_problem(verbose=True, fixed_seed=42)

# Perform the optimisation based on the provided parameters and start hour
ergebnis = opt_class.optimierung_ems(parameters=parameters, start_hour=start_hour)
Expand Down
292 changes: 0 additions & 292 deletions src/akkudoktoreos/config.py

This file was deleted.

Empty file.
Loading
Loading