[BUG] PowerModels export: wrong `s_base` scaling, `to_powermodels` mutates its input, `from_powermodels` fails for a JSON path
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 3/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 54/100
Direzione di ricerca
Start with edisgo/io/powermodels_io.py at the listed _build_branch, to_powermodels and from_powermodels locations, then read the four strict xfail tests in tests/properties/test_properties_io.py. Check the unit conversions, repeatability, and JSON-path behavior against the passing scaling tests in the same classes. Done means all four xfail cases pass and the existing scaling checks remain passing.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
Summary
With the default s_base = 1 the first two errors cancel out; they show as soon as another s_base is used.
_build_branchmultipliesbandgbys_base. The admittance base isS_base / U², so they must be divided.- The initial and final storage states are not divided by
s_base, while the capacities are:- batteries:
soc_initial/soc_endin MWh vs.energy_rating - thermal storage:
soc_initial/soc_endvs.capacity - charging points: initial
energyvs.e_min/e_max
- batteries:
to_powermodelsoverwritesoverlying_grid.storage_units_socandheat_storage_units_socwith energies in MWh (SoC · capacity). A second call on the same object multiplies by the capacity again, sosoc_initialchanges between calls.from_powermodelsreadspm_results["nw"]instead of the parsed dict whenpm_resultsis a path to a JSON file →TypeError: string indices must be integers.
Where
edisgo/io/powermodels_io.py:874_build_branch.edisgo/io/powermodels_io.py:1128-1148(overwrite ofstorage_units_soc), storage and charging point builders in the same module.edisgo/io/powermodels_io.py:317from_powermodels.
How to reproduce
Tests (strict xfail, added in #856):
tests/properties/test_properties_io.py::TestPowerModelsUnits::test_line_susceptance_in_siemens[10]tests/properties/test_properties_io.py::TestPowerModelsUnits::test_s_base_rescales_storage_states[storage|heat_storage|electromobility]tests/properties/test_properties_io.py::TestPowerModelsMapping::test_to_powermodels_is_repeatabletests/properties/test_properties_io.py::TestFromPowerModels::test_json_path_equals_dict
The passing tests in the same classes check that powers, impedances of lines and single transformers and time series scale correctly with s_base.
Proposed fix
- Divide
b,gby the admittance base. - Divide all energies by
s_base. - Work on a copy of the SoC series in
to_powermodels. - Use the parsed dict in
from_powermodels.
Related
#822 (to_powermodels passes wrong flexibility data), #753 (battery storage overlying-grid requirement).
- Lingua principale
- Python
- Stelle
- 48
- Fork
- 22
- Merge medio
- 1g 16h
- PR unite (30g)
- 36
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Ha un modello di pull request
- Nessuna guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di openego/eDisGo
-
area: database bug priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
-
bug correctness priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 80/100
I maintainer di solito rispondono entro 1 giorno
-
[BUG] Spatial complexity reduction merges MV and LV buses when an LV grid has the ID of the MV gridApertabug correctness priority: high
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno
-
bug correctness priority: medium
Difficoltà 2/5 1-3 ore Idoneità per principianti 82/100
I maintainer di solito rispondono entro 1 giorno
-
OPF docs: explain where the curtailment request comes from and how versions 3 and 4 handle itApertaarea: opf documentation priority: low
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di openego/eDisGo
Issue simili
-
[MOVIE]: Airport '77 (1977)Apertarequest-theme
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 78/100
LizardByte/ThemerrDB#9883 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 84/100
Project-MONAI/MONAI#9258 ·
I maintainer di solito rispondono entro 3 giorni
-
catalog:deprecation
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 88/100
surendranb/free-inference#31 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
fritzprix/libr-agent#2612 ·
I maintainer di solito rispondono entro 1 giorno
-
needs-triage presubmit-gate
Difficoltà 2/5 1-3 ore Idoneità per principianti 76/100
gke-labs/kube-agents#5001 ·
I maintainer di solito rispondono entro 1 giorno