The eDisGo workflow

eDisGo is a toolbox, so there is no single “run” function — you assemble a study from building blocks. Those blocks must be called in a particular order, because later steps consume data produced by earlier ones. This page gives the canonical order, the rules that must be respected, and the errors you get when they are not.

Canonical call order

A full study typically follows these stages (steps 2, 5 and 6 are optional depending on the scenario):

  1. Load the gridEDisGo from a ding0 grid, or import_edisgo_from_files() to reload a saved object.

  2. Import the generator parkimport_generators() (to adopt a future-scenario generator park; skip if you want to keep the status-quo park that every ding0 grid already ships with).

  3. Set the time index — pass timeindex to the constructor or call set_timeindex(). Required before any time-series import.

  4. Import flexible assetsimport_home_batteries(), import_heat_pumps(), import_dsm(), import_electromobility().

  5. Set active power time seriesset_time_series_active_power_predefined() (or worst_case / manual), then apply operation strategies (apply_charging_strategy(), apply_heat_pump_operating_strategy()).

  6. Set reactive power time seriesset_time_series_reactive_power_control(). Always last of the time-series steps.

  7. (Optional) optimise flexibilitiespm_optimize() (see Multi-period optimal power flow).

  8. Analyseanalyze() (power flow) and/or

  9. Reinforcereinforce().

  10. Inspect & save — read Results, plot, and save().

The eDisGo full workflow walkthrough notebook implements exactly this sequence, stage by stage.

At any point before analysing you can call check_integrity() to validate that the time series, components and flexibility data are mutually consistent — a quick way to catch the ordering mistakes described below.

Critical ordering rules

Warning

  • Time index first. Set the time index before importing any oedb/predefined time series — otherwise the imported series cannot be aligned.

  • All component imports before time series. Import generators and flexible assets before setting their time series.

  • Active power before reactive power. Reactive-power control derives Q from the active-power series.

  • Reactive power last. Call set_time_series_reactive_power_control() only after all active-power series and components are in place.

  • Import electromobility before the charging strategy. apply_charging_strategy() operates on the charging parks from import_electromobility() (it writes the charging-point series itself); run the import first, or it has nothing to do.

Common errors and how to fix them

Symptom

Cause / fix

Reactive power is empty / zero after set_time_series_reactive_power_control()

Reactive-power control was called before the active-power series existed (Q is derived from P). Set active power first; call reactive power last.

KeyError in pm_optimize() (missing q_set)

Reactive power was not set. Run set_time_series_reactive_power_control() after all active-power steps.

import_heat_pumps() imports the wrong technologies

By default all of individual_heat_pumps, central_heat_pumps and central_resistive_heaters are imported; pass import_types to restrict to a subset.

apply_charging_strategy() does nothing

No charging parks present; run import_electromobility() first.

Storage unit has no time series

Storage series are not auto-generated; set them manually (e.g. assign a DataFrame to edisgo.timeseries.storage_units_active_power) or use a worst-case analysis.

Power flow does not converge

Extreme voltages/loads. Use the troubleshooting_mode argument of analyze() ("lpf" or "iteration"), or let reinforce() handle it via catch_convergence_problems=True.

MemoryError on large grids / many time steps

Reduce the problem with spatial_complexity_reduction(), reduce_memory(), or a reduced/temporal analysis.

For the meaning of each step, continue with The data model, Time series and Analysis, results, plots and I/O; for the engineering behind analysis and reinforcement see Methodology & Physics.