This repository features an Energy Optimization System (EOS) that optimizes energy distribution, usage for batteries, heat pumps& household devices. It includes predictive models for electricity prices (planned), load forecasting& dynamic optimization to maximize energy efficiency & minimize costs. Founder Dr. Andreas Schmitz (YouTube @akkudoktor)
Go to file
Bobby Noelte 34d8e88771
Rename FastAPI server to EOS. (#355)
Rename FastAPI server to `eos` and FastHTML server to `eosdash`.

Make an user easily identify what server is meant. FastAPI and FastHTML are
implementation details that may confuse the non-technical user.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2025-01-09 16:54:49 +01:00
.github Reasonable defaults, isolate tests, EOS_LOGGING_LEVEL, EOS_CONFIG_DIR 2024-12-30 13:41:39 +01:00
.vscode Add settings and extension recommendations (#139) 2024-11-10 23:00:16 +01:00
docs Rename FastAPI server to EOS. (#355) 2025-01-09 16:54:49 +01:00
scripts Rename FastAPI server to EOS. (#355) 2025-01-09 16:54:49 +01:00
src/akkudoktoreos Rename FastAPI server to EOS. (#355) 2025-01-09 16:54:49 +01:00
tests Rename FastAPI server to EOS. (#355) 2025-01-09 16:54:49 +01:00
.dockerignore Add docker multi-arch build with github package push and cleaned up Dockerfile for smaller builds 2024-10-05 08:53:14 +02:00
.env Migrate from Flask to FastAPI (#163) 2024-11-15 22:27:25 +01:00
.gitignore Adapt documentation generation to be compliant to ReadTheDocs and Windows. (#341) 2025-01-06 16:27:57 +01:00
.pre-commit-config.yaml pre-commit: Fix mypy hook (#233) 2024-12-11 00:21:07 +01:00
.readthedocs.yaml Initial readthedocs config (#339) 2025-01-06 19:34:15 +01:00
CONTRIBUTING.md Initial readthedocs config (#339) 2025-01-06 19:34:15 +01:00
docker-compose.yaml Fix2 electricity price prediction. (#296) 2024-12-30 21:29:50 +01:00
Dockerfile Reasonable defaults, isolate tests, EOS_LOGGING_LEVEL, EOS_CONFIG_DIR 2024-12-30 13:41:39 +01:00
LICENSE Apache 2.0 Lizenz 2024-05-03 10:43:31 +02:00
Makefile Rename FastAPI server to EOS. (#355) 2025-01-09 16:54:49 +01:00
NOTICE Migrate from Flask to FastAPI (#163) 2024-11-15 22:27:25 +01:00
openapi.json Rename FastAPI server to EOS. (#355) 2025-01-09 16:54:49 +01:00
pyproject.toml python version 3.10 for feature branch (#298) 2024-12-30 14:26:12 +01:00
README.md Rename FastAPI server to EOS. (#355) 2025-01-09 16:54:49 +01:00
requirements-dev.txt Adapt documentation generation to be compliant to ReadTheDocs and Windows. (#341) 2025-01-06 16:27:57 +01:00
requirements.txt mypy, req 2025-01-09 12:15:00 +01:00
single_test_optimization.py revert changes used for testing 2025-01-09 12:15:00 +01:00
single_test_prediction.py Fix2 config and predictions revamp. (#281) 2024-12-29 18:42:49 +01:00

Energy System Simulation and Optimization

This project provides a comprehensive solution for simulating and optimizing an energy system based on renewable energy sources. With a focus on photovoltaic (PV) systems, battery storage (batteries), load management (consumer requirements), heat pumps, electric vehicles, and consideration of electricity price data, this system enables forecasting and optimization of energy flow and costs over a specified period.

Documentation can be found at Akkudoktor-EOS.

Getting Involved

See CONTRIBUTING.md.

Installation

The project requires Python 3.10 or newer. Currently there are no official packages or images published.

Following sections describe how to locally start the EOS server on http://localhost:8503.

Run from source

Install dependencies in virtual environment:

Linux:

python -m venv .venv
.venv/bin/pip install -r requirements.txt

Windows:

python -m venv .venv
 .venv\Scripts\pip install -r requirements.txt

Finally, start EOS fastapi server:

Linux:

.venv/bin/fastapi run --port 8503 src/akkudoktoreos/server/eos.py

Windows:

 .venv\Scripts\fastapi run --port 8503 src/akkudoktoreos/server/eos.py

Docker

docker compose up --build

Configuration

This project uses the EOS.config.json file to manage configuration settings.

Default Configuration

A default configuration file default.config.json is provided. This file contains all the necessary configuration keys with their default values.

Custom Configuration

Users can specify a custom configuration directory by setting the environment variable EOS_DIR.

  • If the directory specified by EOS_DIR contains an existing config.json file, the application will use this configuration file.
  • If the EOS.config.json file does not exist in the specified directory, the default.config.json file will be copied to the directory as EOS.config.json.

Configuration Updates

If the configuration keys in the EOS.config.json file are missing or different from those in default.config.json, they will be automatically updated to match the default settings, ensuring that all required keys are present.

Classes and Functionalities

This project uses various classes to simulate and optimize the components of an energy system. Each class represents a specific aspect of the system, as described below:

  • Battery: Simulates a battery storage system, including capacity, state of charge, and now charge and discharge losses.

  • PVForecast: Provides forecast data for photovoltaic generation, based on weather data and historical generation data.

  • Load: Models the load requirements of a household or business, enabling the prediction of future energy demand.

  • Heatpump: Simulates a heat pump, including its energy consumption and efficiency under various operating conditions.

  • Strompreis: Provides information on electricity prices, enabling optimization of energy consumption and generation based on tariff information.

  • EMS: The Energy Management System (EMS) coordinates the interaction between the various components, performs optimization, and simulates the operation of the entire energy system.

These classes work together to enable a detailed simulation and optimization of the energy system. For each class, specific parameters and settings can be adjusted to test different scenarios and strategies.

Customization and Extension

Each class is designed to be easily customized and extended to integrate additional functions or improvements. For example, new methods can be added for more accurate modeling of PV system or battery behavior. Developers are invited to modify and extend the system according to their needs.

Server API

See the Swagger API documentation for detailed information: EOS OpenAPI Spec

Further resources