edisgo.io.pypsa_io
¶
This module provides tools to convert eDisGo representation of the network
topology to PyPSA data model. Call to_pypsa()
to retrieve the PyPSA network
container.
Module Contents¶
Functions¶

Convert grid to PyPSA.Network representation. 

Set initial guess for the NewtonRaphson algorithm. 

Passing power flow results from PyPSA to 
 edisgo.io.pypsa_io.to_pypsa(edisgo_object, mode=None, timesteps=None, **kwargs)[source]¶
Convert grid to PyPSA.Network representation.
You can choose between translation of the MV and all underlying LV grids (mode=None (default)), the MV network only (mode=’mv’ or mode=’mvlv’) or a single LV network (mode=’lv’).
 Parameters
edisgo_object (
EDisGo
) – EDisGo object containing grid topology and time series information.mode (str) – Determines network levels that are translated to PyPSA.Network. See mode parameter in
to_pypsa
for more information.timesteps (pandas.DatetimeIndex or pandas.Timestamp) – See timesteps parameter in
to_pypsa
for more information.
:param See other parameters in
to_pypsa
for more: :param information.: Returns
PyPSA.Network representation.
 Return type
 edisgo.io.pypsa_io.set_seed(edisgo_obj, pypsa_network)[source]¶
Set initial guess for the NewtonRaphson algorithm.
In PyPSA an initial guess for the NewtonRaphson algorithm used in the power flow analysis can be provided to speed up calculations. For PQ buses, which besides the slack bus, is the only bus type in edisgo, voltage magnitude and angle need to be guessed. If the power flow was already conducted for the required time steps and buses, the voltage magnitude and angle results from previously conducted power flows stored in
pfa_v_mag_pu_seed
andpfa_v_ang_seed
are used as the initial guess. Always the latest power flow calculation is used and only results from power flow analyses including the MV level are considered, as analysing single LV grids is currently not in the focus of edisgo and does not require as much speeding up, as analysing single LV grids is usually already quite quick. If for some buses or time steps no power flow results are available, default values are used. For the voltage magnitude the default value is 1 and for the voltage angle 0. Parameters
edisgo_obj (
EDisGo
) –pypsa_network (pypsa.Network) – Pypsa network in which seed is set.
 edisgo.io.pypsa_io.process_pfa_results(edisgo, pypsa, timesteps, dtype='float')[source]¶
Passing power flow results from PyPSA to
Results
. Parameters
edisgo (
EDisGo
) –pypsa (pypsa.Network) – The PyPSA network to retrieve results from.
timesteps (pandas.DatetimeIndex or pandas.Timestamp) – Time steps for which latest power flow analysis was conducted and for which to retrieve pypsa results.
Notes
P and Q are returned from the line ending/transformer side with highest apparent power S, exemplary written as
See also
Results
,analysis