EOS/tests/testdata/optimize_result_2.json
Dominique Lasserre f61665669f Migrate from Flask to FastAPI (#163)
* Migrate from Flask to FastAPI

 * FastAPI migration:
    - Use pydantic model classes as input parameters to the
      data/calculation classes.
    - Interface field names changed to constructor parameter names (for
      simplicity only during transition, should be updated in a followup
      PR).
    - Add basic interface requirements (e.g. some values > 0, etc.).
 * Update tests for new data format.
 * Python requirement down to 3.9 (TypeGuard no longer needed)
 * Makefile: Add helpful targets (e.g. development server with reload)

* Move API doc from README to pydantic model classes (swagger)

 * Link to swagger.io with own openapi.yml.
 * Commit openapi.json and check with pytest for changes so the
   documentation is always up-to-date.

* Streamline docker

* FastAPI: Run startup action on dev server

 * Fix config for /strompreis, endpoint still broken however.

* test_openapi: Compare against docs/.../openapi.json

* Move fastapi to server/ submodule

 * See #187 for new repository structure.
2024-11-15 22:27:25 +01:00

66 lines
5.2 KiB
JSON

{
"ac_charge": [
0.0, 0.0, 0.6, 0.4, 0.0, 0.4, 0.0, 0.8, 1.0, 0.6, 0.0, 0.4, 1.0, 0.6, 1.0, 0.0, 1.0, 1.0, 0.0, 0.0, 0.4, 0.6, 0.0, 0.4, 0.2, 0.6, 0.6, 0.2, 0.4, 0.2, 0.0, 0.0, 0.2, 0.6, 0.0, 0.0, 1.0, 1.0, 0.2, 0.0, 0.6, 0.4, 0.4, 0.2, 1.0, 0.6, 0.0, 0.0
],
"dc_charge": [
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_allowed": [
0, 0, 0, 0, 1, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 1
],
"eautocharge_hours_float": [
0.0, 0.375, 0.875, 0.375, 0.5, 0.75, 1.0, 1.0, 0.875, 0.0, 0.5, 0.375, 1.0, 0.875, 1.0, 0.625, 0.5, 1.0, 1.0, 0.375, 0.375, 0.375, 0.0, 0.5, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
],
"result": {
"Last_Wh_pro_Stunde": [
6297.07, 6756.91, 16208.56, 15449.029999999999, 16313.488181818184, 7731.82, 6460.22, 6974.78, 1129.12, 1178.71, 1050.98, 988.56, 912.38, 1741.405454545456, 516.37, 868.05, 694.34, 608.79, 556.31, 488.89, 506.91, 804.89, 1718.014090909092, 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, 813.95, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 128.65999999999985, 448.79999999999995, 1330.3700000000001, 175.26999999999998, 4485.82, 3682.7, 2166.67, 1416.43, 497.68000000000006, 0.0, 0.0, 0.0, 0.0, 0.0
],
"Netzbezug_Wh_pro_Stunde": [
366.78999999999996, 5713.66, 15101.82, 14287.339999999998, 10294.668181818184, 2212.75, 2490.34, 3956.8199999999997, 0.0, 171.54000000000008, 731.31, 980.68, 0.0, 1741.405454545456, 516.37, 868.05, 694.34, 608.79, 556.31, 488.89, 0.0, 799.85, 1382.424090909092, 351.65, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 257.64, 566.69, 987.01, 0.0, 0.0
],
"Kosten_Euro_pro_Stunde": [
0.08362812, 1.263861592, 3.160810926, 2.6845911859999996, 1.8921600118181823, 0.44343509999999997, 0.547376732, 0.8981981399999999, 0.0, 0.05480703000000003, 0.225316611, 0.291163892, 0.0, 0.48411071636363673, 0.174739608, 0.28801899, 0.22802125600000003, 0.199865757, 0.182970359, 0.162995926, 0.0, 0.26411047, 0.42053340845454584, 0.08545095, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.08231598, 0.174597189, 0.293043269, 0.0, 0.0
],
"akku_soc_pro_stunde": [
58.47796143250689, 65.14462809917354, 81.81129476584022, 91.81129476584022, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 96.07274449035812, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 100.0, 97.8180526859504, 97.8180526859504, 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, 96.84060778236915, 94.28822314049587
],
"Einnahmen_Euro_pro_Stunde": [
0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0569765, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.009006199999999989, 0.03141599999999999, 0.0931259, 0.012268899999999998, 0.31400739999999994, 0.257789, 0.1516669, 0.09915009999999999, 0.0348376, 0.0, 0.0, 0.0, 0.0, 0.0
],
"Gesamtbilanz_Euro": 13.525878719636365,
"EAuto_SoC_pro_Stunde": [
13.74, 20.294999999999998, 37.775, 53.06999999999999, 70.55, 81.475, 90.215, 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": 1.0602444999999998,
"Gesamtkosten_Euro": 14.586123219636365,
"Verluste_Pro_Stunde": [
957.818181818182, 447.0, 1152.0, 843.0, 846.7933884297522, 345.0, 276.0, 309.0, 0.0, 0.0, 0.0, 0.0, 124.41545454545451, 141.38119834710756, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 69.12409090909085, 0.0, 78.55010330578523, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 100.08954545454549, 80.85954545454547
],
"Gesamt_Verluste": 5771.031508264463,
"Haushaltsgeraet_wh_pro_stunde": [
0.0, 0.0, 0.0, 2500.0, 2500.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0
]
},
"eauto_obj": {
"kapazitaet_wh": 60000,
"start_soc_prozent": 5,
"soc_wh": 60000.0,
"hours": 48,
"discharge_array": [
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
],
"charge_array": [
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
],
"lade_effizienz": 0.95,
"entlade_effizienz": 1.0,
"max_ladeleistung_w": 11040
},
"start_solution": [
0, 0, 4, 3, 1, 3, 1, 5, 6, 4, 1, 3, 6, 4, 6, 0, 6, 6, 0, 0, 3, 4, 1, 3, 2, 4, 4, 2, 3, 2, 1, 0, 2, 4, 1, 0, 6, 6, 2, 0, 4, 3, 3, 2, 6, 4, 1, 1, 0, 1, 5, 1, 2, 4, 6, 6, 5, 0, 2, 1, 6, 5, 6, 3, 2, 6, 6, 1, 1, 1, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 13
],
"spuelstart": 13
}