edisgo.io.powermodels_io ======================== .. py:module:: edisgo.io.powermodels_io Functions --------- .. autoapisummary:: edisgo.io.powermodels_io.to_powermodels edisgo.io.powermodels_io.from_powermodels edisgo.io.powermodels_io.aggregate_parallel_transformers Module Contents --------------- .. py:function:: to_powermodels(edisgo_object, s_base=1, flexible_cps=None, flexible_hps=None, flexible_loads=None, flexible_storage_units=None, opf_version=1) Convert eDisGo representation of the network topology and timeseries to PowerModels network data format. :param edisgo_object: :type edisgo_object: :class:`~.EDisGo` :param s_base: Base value of apparent power for per unit system. Default: 1 MVA. :type s_base: int :param flexible_cps: Array containing all charging points that allow for flexible charging. :type flexible_cps: :numpy:`numpy.ndarray` or None :param flexible_hps: Array containing all heat pumps that allow for flexible operation due to an attached heat storage. :type flexible_hps: :numpy:`numpy.ndarray` or None :param flexible_loads: Array containing all flexible loads that allow for application of demand side management strategy. :type flexible_loads: :numpy:`numpy.ndarray` or None :param flexible_storage_units: Array containing all flexible storages. Non-flexible storage units operate to optimize self consumption. Default: None. :type flexible_storage_units: :numpy:`numpy.ndarray` or None :param opf_version: Version of optimization models to choose from. Must be one of [1, 2, 3, 4]. For more information see :func:`edisgo.opf.powermodels_opf.pm_optimize`. Default: 1. :type opf_version: int :returns: First dictionary contains all network data in PowerModels network data format. Second dictionary contains time series of HV requirement for each flexibility retrieved from overlying_grid component of edisgo object and reduced by non-flexible components. :rtype: (dict, dict) .. py:function:: from_powermodels(edisgo_object, pm_results, hv_flex_dict, s_base=1) Convert results from optimization in PowerModels network data format to eDisGo data format and updates timeseries values of flexibilities on eDisGo object. :param edisgo_object: :type edisgo_object: :class:`~.EDisGo` :param pm_results: Dictionary or path to json file that contains all optimization results in PowerModels network data format. :type pm_results: dict or str :param hv_flex_dict: Dictionary containing time series of HV requirement for each flexibility retrieved from overlying grid component of edisgo object. :type hv_flex_dict: dict :param s_base: Base value of apparent power for per unit system. Default: 1 MVA. :type s_base: int .. py:function:: aggregate_parallel_transformers(psa_net) Calculate impedance for parallel transformers and aggregate them. Replace psa_net.transformers dataframe by aggregated transformer dataframe. :param psa_net: :pypsa:`PyPSA.Network` representation of network. :type psa_net: :pypsa:`PyPSA.Network`