244 Commits

Author SHA1 Message Date
Dominique Lasserre
a0872deede
Cleanup: Fix violin chart labels, remove debug code (#167) 2024-10-31 11:17:45 +01:00
Andreas
cdf4d074e2 Hopefully the last precommit fix 2024-10-22 10:39:10 +02:00
Andreas
6848babef1 PreCommit Fixed 2024-10-22 10:39:10 +02:00
Andreas
bcdddd1d23 PreCommit Fixed 2024-10-22 10:39:10 +02:00
Andreas
55950a93eb PreCommit Fixed 2024-10-22 10:39:10 +02:00
Andreas
5d51d0a676 Tests fixed 2024-10-22 10:39:10 +02:00
Andreas
8d3eb96a0b Time problems in EMS / Optimization 2024-10-22 10:39:10 +02:00
Andreas
fca2338bd7 AC Charge Bug, Price Cache On/Off 2024-10-22 10:39:10 +02:00
Andreas
b925ef45cc AC /DC / Discharge optimzation - First try (not finished yet) 2024-10-22 10:39:10 +02:00
Andreas
e455e9a18a class_ems: AC / DC Charging
class_optimize: Timing Bugs fixed
class_numpy_encoder: JSON Encoder with Numpy support
visualize: AC / DC / Discharge
test_class_ems_2: New Test for AC / DC charging decision
2024-10-22 10:39:10 +02:00
Andreas
6238ba4daa EV Bugs 2024-10-22 10:39:10 +02:00
Andreas
55842dba1d EV Charge Parameters optional + AC Charge first try (Parameter Reduction) 2024-10-22 10:39:10 +02:00
Andreas
2807ec7978 EV possible currents -> Work now (new Mutate Function)
-> Some Penalties are removed (deprecated)
AC Charge -> Parameter in Optimization -1,0,1
-> Missing integration in class_ems
2024-10-22 10:39:10 +02:00
Chris
141257f514 Ruff format 2024-10-11 09:07:53 +02:00
Chris
b8e7612bde Extend line length 2024-10-11 09:07:53 +02:00
Dominique Lasserre
b620250536 Streamline Dockerfile, remove unused deps
* Dockerfile: Use non-root user, buildx cache, setup for readonly
   container, remove unused apt deps.
   For now don't install pip package and keep development flask server
   as this will be replaced in the future (fastapi). Then a proper
   webserver (e.g. nginx) should be used and the pip package can be
   created and deployed just to the run-stage (with the webserver).
 * docker-compose: Set to readonly (anonymous volumes declared in
   Dockerfile should maintain all writable data).
   Mount config.py for easier development. Should be replaced by
   environment support for all config file variables.
 * Remove unused runtime dependencies: mariadb, joblib, pytest,
   pytest-cov.
 * Move pytest-cov to dev dependencies.
 * Add output_dir to config.py.
 * Fix visualization_results.pdf endpoint.
 * Update docs.
2024-10-11 08:39:14 +02:00
Bobby Noelte
59dcf8c459 Add documentation infrastructure
Add documentation infrastructure and some sample content.

Documentation is generated by sphinx using extensions to support
Markdown an restructuredText for simple documentation writing.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2024-10-10 15:22:34 +02:00
Dominique Lasserre
73e537dabb Replace pytz with stdlib zoneinfo/timezone, Bump python to 3.10
* Timezone support comes with the standard lib since 3.9
 * Bump to 3.10 because typing.TypeGuard
2024-10-10 14:18:40 +02:00
Bobby Noelte
54347ee240 Fix test server startup detection.
Startup of the test server is detected by a scan on the server logging output to stdout.
Startup is now detected on the late log output.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2024-10-10 13:53:28 +02:00
Michael Osthege
05faf32fd3 Run tests after merging
Previously tests did not run after merging.

This lead to incompatible changes being merged right after one another.

By running tests on main we will notice breaks earlier.

Other options would be to require every PR to rebase on main before merging.
This is known as requiring linear history and can be changed in the project settings.
2024-10-10 13:52:45 +02:00
Dominique Lasserre
a41aea824c Fix test_server Closes #147
* Don´t rely on calculation per specific day, just verify length.
2024-10-10 07:41:42 +02:00
Bobby Noelte
03e9049835 Fix Adapt data to package directory structure
Due to .gitignore directive files in data/ were ignored. Thus data was not moved to correct location by pr #122.

Add load_profiles.npz and remove gitignore directive.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2024-10-09 18:18:35 +02:00
Michael Osthege
3c1482c2c0 Activate optimization test with 3 generations 2024-10-09 17:05:36 +02:00
Michael Osthege
b6d0ef22f3 Remove and ignore visualization side-effect outputs 2024-10-09 17:05:36 +02:00
Normann
929d7e0a75 JSON files for test_class_optimize.py
Update test_class_optimize.py

added Skipped per default

Fix optimization test

Fix optimization test
2024-10-09 17:05:36 +02:00
Michael Osthege
d804f5dc31 Fix matplotlib warning about xticklabels 2024-10-09 17:05:36 +02:00
Normann
6b545c501d Update README.md
clarify the None/Null/NaN values of the output.
2024-10-09 17:03:05 +02:00
BerndCzech
2882ca44d1 refactor: remove README-DE.md 2024-10-09 17:02:16 +02:00
Andreas
9e3dd27a7b Ruff 2024-10-09 16:59:50 +02:00
Andreas
565e721d68 [BUG]: class_ems nd_array not JSON serializable
Big Bugfix - not sure if everything works
2024-10-09 16:59:50 +02:00
Andreas
7b05fc04ce JSON Response fixed 2024-10-09 16:59:50 +02:00
Bobby Noelte
4284119352 Add test for server
A test fixture to start the server and a first test case is added.

The fixture tries to assure that the server is installed and running.
If it is not installed the fixture uses pip to install it.

The server and the installation by pip is run bei the same Python
executable that also runs pytest.

The github workflow for pytest is adapted to install akkudoktor-eos.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2024-10-08 19:22:16 +02:00
Normann
ac0eacb15e convert np arrys to lists before changing 2024-10-08 18:55:51 +02:00
Normann
a5a492b55e revert check in test for ems 2024-10-08 18:55:51 +02:00
Normann
14c33fd009 set current hour value None in class_ems.py 2024-10-08 18:55:51 +02:00
Normann
7a85117e10 remove unused function
replace_nan_with_none(data) is not needed anymore since we don't have any NaN values. Another 13% speed increase.
2024-10-08 18:55:51 +02:00
dependabot[bot]
d9521913c0 Bump numpy from 1.26.4 to 2.1.2
Bumps [numpy](https://github.com/numpy/numpy) from 1.26.4 to 2.1.2.
- [Release notes](https://github.com/numpy/numpy/releases)
- [Changelog](https://github.com/numpy/numpy/blob/main/doc/RELEASE_WALKTHROUGH.rst)
- [Commits](https://github.com/numpy/numpy/compare/v1.26.4...v2.1.2)

---
updated-dependencies:
- dependency-name: numpy
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2024-10-08 18:54:11 +02:00
Normann
bda6d240d1 TypeGuard[float] added to isfloat 2024-10-08 07:53:07 +02:00
Normann
bddf89b6ee README-DE Python req. pushed to 3.10 2024-10-08 07:53:07 +02:00
Normann
8d50168904 README.md Python req. pushed to 3.10 2024-10-08 07:53:07 +02:00
Normann
6a3964b47c empty line added 2024-10-08 07:53:07 +02:00
Normann
efb685d602 import sort#2 2024-10-08 07:53:07 +02:00
Normann
0339e5dc2e sort imports 2024-10-08 07:53:07 +02:00
Normann
c9db30859b moved isfloat(num)
improved isfloat for case "None" and strings with surrounding whitespace and special types like +-inf.
2024-10-08 07:53:07 +02:00
Normann
ae5ead0884 remove isfloat()
function is not used here
2024-10-08 07:53:07 +02:00
Bobby Noelte
52026fa36a Adapt data to package directory structure.
Move static data to server package directory.
Assure data/*.npz data is included in the server package.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2024-10-07 17:51:44 +02:00
Bobby Noelte
efd32b9185 Adapt Dockerfile to package directory structure.
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2024-10-07 08:12:33 +02:00
Bobby Noelte
95322e69ce Add packaging and use it.
Add packaging information and make it usable by Makefile.

Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2024-10-07 08:12:33 +02:00
Bobby Noelte
ba31734bd8 Adapt tests to package directory structure.
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2024-10-07 08:12:33 +02:00
Bobby Noelte
89fd1d4203 Adapt python sources to new package directory structure.
Signed-off-by: Bobby Noelte <b0661n0e17e@gmail.com>
2024-10-07 08:12:33 +02:00