[BUG] Run pipeline: wrong generator scenario, undeclared time series changes, `copy_grid` and `base_reinforce` side effects

Aperta
#871 0 commenti 0 reazioni 0 assegnatari Vedi su GitHub

I maintainer di solito rispondono entro 1 giorno

Nessuno ha ancora preso questa issue.

Valutazione

Difficoltà
4/5
Tempo stimato
3-5 giorni
Idoneità per principianti
48/100
Tipo di issue
Bug
Chiarezza
Specificata chiaramente
Stato di attività
Attiva
Stack tecnologico
python
Ambito
backend

Direzione di ricerca

Start with the listed task entry points in edisgo/run/tasks/grid.py, analysis.py, and io.py, plus _resolve_extends in edisgo/run/config.py; use the named regression tests in tests/properties/test_properties_run.py to trace each failure. Check the task registration for the time series flags as well. Done means the regression tests pass and the worst_case preset matches the facade chain.

Scritto dal modello di indicizzazione a partire dal testo della issue.

Descrizione

area: runner bug priority: high

Summary

  1. setup_grid(import_generators=True) passes generator_scenario=None instead of falling back to ctx.scenario. The preset flex_opf relies on it.
  2. apply_heat_pump_strategy (alters loads_active_power) and import_overlying_grid_data (sets generator active power) are not registered with ts_altering=True, so the validator allows them after reactive_power and Q stays stale.
  3. Task reinforce with copy_grid=True returns the unchanged input and discards the reinforced copy (docstring: "return it as a new instance").
  4. base_reinforce resets equipment_changes but leaves grid_expansion_costs of the base reinforcement (199.3 kEUR in test grid 1).
  5. With an empty prior time index, base_reinforce keeps the 1970 worst-case time index and time series. In flex_opf, later imports (heat pumps, DSM) then fetch data for 1970.
  6. Task save builds the flag path with directory + str → TypeError for a pathlib.Path.
  7. A cyclic extends in the config is not detected; loading recurses until RecursionError.

Where

edisgo/run/tasks/grid.py:22 task_setup_grid, edisgo/run/tasks/analysis.py:124 task_reinforce and :196 task_base_reinforce, edisgo/run/tasks/io.py:19 task_save, task registration of the flex and io tasks (ts_altering), edisgo/run/config.py:99 (_resolve_extends).

How to reproduce

Tests (strict xfail, added in #856), in tests/properties/test_properties_run.py:

  • test_setup_grid_imports_generators_of_run_scenario
  • test_tasks_altering_active_power_are_declared[apply_heat_pump_strategy|import_overlying_grid_data] (runs the tasks and compares the time series before and after)
  • test_reinforce_task_copy_grid_returns_reinforced_copy
  • TestBaseReinforce::test_costs_consistent_with_reset_equipment_changes
  • TestBaseReinforce::test_prior_time_index_is_restored
  • test_save_task_accepts_path
  • TestConfigLoader::test_cyclic_extends_gives_clear_error

Passing: the preset worst_case gives the same result as the facade chain; loading the base artefact and reinforcing again gives no changes.

Related

#642 (fast test suite for run_edisgo), #773 (runner time step selection edge cases), #640.

Lingua principale
Python
Stelle
48
Fork
22
Merge medio
1g 8h
PR unite (30g)
37

Preparare l'ambiente

  • Nessun Dockerfile né file Docker Compose
  • Ha un modello di pull request
  • Nessuna guida per i contributori

Come iniziare

  1. Leggi tutta la issue e poi la guida ai contributi del progetto.
  2. Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
  3. Fai un fork del repository e lavora su un branch.
  4. Apri una pull request che faccia riferimento al numero della issue.

Altre issue di openego/eDisGo

Tutte le issue di openego/eDisGo

Issue simili

Altre issue su Python

Ricevi le nuove issue nella tua casella

Un breve riepilogo di issue GitHub adatte ai principianti.